2009-10-05 Paul Thomas <pault@gcc.gnu.org>
[official-gcc.git] / gcc / testsuite / gfortran.dg / enum_4.f90
blob6cca2ebc64878850cd01b2b2fb865984e0dee091
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 = 2
8 enumerator :: blue = 1, red ! { dg-error "already has basic type" }
9 end enum
11 enum, bind (c)
12 enumerator :: r, b(10) = 2 ! { dg-error "Syntax error" }
13 enumerator , save :: g = 1 ! { dg-error "Syntax error" }
14 end ! { dg-error " END ENUM" }
16 end program main ! { dg-error "Expecting END ENUM statement" }
17 ! { dg-error "Unexpected end of file" "" { target "*-*-*" } 0 }