Break circular dependency between FIR dialect and utilities
[llvm-project.git] / flang / test / Semantics / resolve60.f90
blobff988d54a8210ca6b61afc1537e65f8c27471f91
1 ! RUN: %python %S/test_errors.py %s %flang_fc1
2 ! Testing 7.6 enum
4 ! OK
5 enum, bind(C)
6 enumerator :: red, green
7 enumerator blue, pink
8 enumerator yellow
9 enumerator :: purple = 2
10 end enum
12 integer(yellow) anint4
14 enum, bind(C)
15 enumerator :: square, cicrle
16 !ERROR: 'square' is already declared in this scoping unit
17 enumerator square
18 end enum
20 dimension :: apple(4)
21 real :: peach
23 enum, bind(C)
24 !ERROR: 'apple' is already declared in this scoping unit
25 enumerator :: apple
26 enumerator :: pear
27 !ERROR: 'peach' is already declared in this scoping unit
28 enumerator :: peach
29 !ERROR: 'red' is already declared in this scoping unit
30 enumerator :: red
31 end enum
33 enum, bind(C)
34 !ERROR: Enumerator value could not be computed from the given expression
35 !WARNING: INTEGER(4) division by zero
36 !ERROR: Must be a constant value
37 enumerator :: wrong = 0/0
38 end enum
40 end