2017-02-20 Paul Thomas <pault@gcc.gnu.org>
[official-gcc.git] / gcc / testsuite / gfortran.dg / enum_2.f90
blob8f7aea1f02e7469c03231d9ab3687c5da405025a
1 ! { dg-do compile }
2 ! Program to test ENUM parsing errors
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
12 red = 42 ! { dg-error "variable definition context" }
14 enumerator :: sun ! { dg-error "ENUM" }
15 end program main