summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/enum_5.f90
blob: 81a1dd5dfa4382f0193a7321e8bf96b2dc83a26d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
! { dg-do compile }
! Program to test ENUM parsing errors 

program main
  implicit none
  integer :: i = 1

  enum, bind (c)
    enumerator :: red, black = i  ! { dg-error "is a variable" }
    enumerator :: blue = 1  
  end enum junk  ! { dg-error "Syntax error" }

  blue = 10  ! { dg-error "Unexpected assignment" }

end program main  ! { dg-error "Expecting END ENUM" }
 ! { dg-error "Unexpected end of file" "" { target "*-*-*" } 0 }