gcc/testsuite/gfortran.fortran-torture/compile/emptyif.f90
raw| 1 | ! Program to test empty IF statements |
| 2 | program emptyif |
| 3 | implicit none |
| 4 | logical c |
| 5 | logical d |
| 6 | |
| 7 | if (c) then |
| 8 | c = .true. |
| 9 | end if |
| 10 | |
| 11 | if (c) then |
| 12 | else |
| 13 | c = .true. |
| 14 | end if |
| 15 | |
| 16 | if (c) then |
| 17 | c = .true. |
| 18 | else |
| 19 | end if |
| 20 | |
| 21 | if (c) then |
| 22 | c = .true. |
| 23 | elseif (d) then |
| 24 | c = .true. |
| 25 | else |
| 26 | end if |
| 27 | |
| 28 | if (c) then |
| 29 | c = .true. |
| 30 | elseif (d) then |
| 31 | else |
| 32 | c = .true. |
| 33 | end if |
| 34 | |
| 35 | if (c) then |
| 36 | elseif (d) then |
| 37 | c = .true. |
| 38 | else |
| 39 | c = .true. |
| 40 | end if |
| 41 | |
| 42 | end program |