Debian Codegraph @

gcc/testsuite/gfortran.fortran-torture/execute/enum_1.f90

raw
1 ! Program to test the default initialisation of enumerators
2
3 program main
4 implicit none
5
6 enum, bind (c)
7 enumerator :: red , yellow, blue
8 enumerator :: green
9 end enum
10
11 enum, bind (c)
12 enumerator :: a , b , c = 10
13 enumerator :: d
14 end enum
15
16
17 if (red /= 0 ) STOP 1
18 if (yellow /= 1) STOP 2
19 if (blue /= 2) STOP 3
20 if (green /= 3) STOP 4
21
22 if (a /= 0 ) STOP 5
23 if (b /= 1) STOP 6
24 if (c /= 10) STOP 7
25 if (d /= 11) STOP 8
26
27
28 end program main