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

program main
  implicit none
  enum, bind (c)
    enumerator :: red, black
    integer :: x  ! { dg-error "Unexpected data declaration" }
    enumerator blue = 1  ! { dg-error "Syntax error in ENUMERATOR definition" }
  end enum

  enumerator :: sun  ! { dg-error "ENUM" }
end program main