Merge from mainline (165734:167278).
[official-gcc/graphite-test-results.git] / gcc / testsuite / gfortran.dg / enum_6.f90
blob1c7c027a351b51e945b9711ba2cbf48944de304d
1 ! { dg-do compile }
2 ! Program to test ENUM parsing errors
4 program main
5 implicit none
6 integer :: i = 1
8 enum, bind (c)
9 enumerator :: sun, mon = 2
10 i = 2 ! { dg-error "Unexpected" }
11 enumerator :: wed = 1
12 end enum
14 i = 1
16 enum, bind (c) ! { dg-error "Unexpected" }
17 enumerator :: red, black = 2 ! { dg-error "ENUM definition statement expected" }
18 enumerator :: blue = 1 ! { dg-error "ENUM definition statement expected" }
19 end enum ! { dg-error "Expecting END PROGRAM" }
21 end program main