gcc/testsuite/gfortran.fortran-torture/execute/enum_4.f90
raw| 1 | ! Program to test the default initialisation of enumerators inside different program unit |
| 2 | |
| 3 | module mod |
| 4 | implicit none |
| 5 | enum, bind (c) |
| 6 | enumerator :: red , yellow, blue |
| 7 | enumerator :: green |
| 8 | end enum |
| 9 | end module mod |
| 10 | |
| 11 | program main |
| 12 | use mod |
| 13 | implicit none |
| 14 | |
| 15 | if (red /= 0 ) STOP 1 |
| 16 | if (yellow /= 1) STOP 2 |
| 17 | if (blue /= 2) STOP 3 |
| 18 | if (green /= 3) STOP 4 |
| 19 | end program main |