Debian Codegraph @

gcc/testsuite/gfortran.dg/enum_2.f90

raw
1 ! { dg-do compile }
2 ! Program to test ENUM parsing errors
3
4 program main
5 implicit none
6 enum, bind (c)
7 enumerator :: red, black
8 integer :: x ! { dg-error "Unexpected data declaration" }
9 enumerator blue = 1 ! { dg-error "Syntax error in ENUMERATOR definition" }
10 end enum
11
12 red = 42 ! { dg-error "variable definition context" }
13
14 enumerator :: sun ! { dg-error "ENUM" }
15 end program main