gcc/testsuite/gfortran.dg/enum_7.f90
raw| 1 | ! { dg-do compile } |
| 2 | ! Program to test ENUM parsing errors |
| 3 | |
| 4 | program main |
| 5 | implicit none |
| 6 | |
| 7 | enum, bind (c) |
| 8 | enumerator :: sun, mon = 2 |
| 9 | enum, bind (c) ! { dg-error "Unexpected" } |
| 10 | enumerator :: apple, mango |
| 11 | end enum |
| 12 | enumerator :: wed = 1 ! { dg-error "ENUM definition statement expected" } |
| 13 | end enum ! { dg-error "Expecting END PROGRAM" } |
| 14 | |
| 15 | end program main |