gcc/testsuite/gfortran.fortran-torture/execute/write_logical.f90
raw| 1 | ! PR 14334, L edit descriptor does not work |
| 2 | ! |
| 3 | ! this test uses L1 and L4 to print TRUE and FALSE |
| 4 | logical true,false |
| 5 | character*10 b |
| 6 | true = .TRUE. |
| 7 | false = .FALSE. |
| 8 | b = '' |
| 9 | write (b, '(L1)') true |
| 10 | if (b(1:1) .ne. 'T') STOP 1 |
| 11 | |
| 12 | b = '' |
| 13 | write (b, '(L1)') false |
| 14 | if (b(1:1) .ne. 'F') STOP 2 |
| 15 | |
| 16 | b = '' |
| 17 | write(b, '(L4)') true |
| 18 | if (b(1:4) .ne. ' T') STOP 3 |
| 19 | |
| 20 | b = '' |
| 21 | write(b, '(L4)') false |
| 22 | if (b(1:4) .ne. ' F') STOP 4 |
| 23 | end |