comparison flang/test/Semantics/resolve60.f90 @ 173:0572611fdcc8 llvm10 llvm12

reorgnization done
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Mon, 25 May 2020 11:55:54 +0900
parents
children 2e18cbf3894f
comparison
equal deleted inserted replaced
172:9fbae9c8bf63 173:0572611fdcc8
1 ! RUN: %S/test_errors.sh %s %t %f18
2 ! Testing 7.6 enum
3
4 ! OK
5 enum, bind(C)
6 enumerator :: red, green
7 enumerator blue, pink
8 enumerator yellow
9 enumerator :: purple = 2
10 end enum
11
12 integer(yellow) anint4
13
14 enum, bind(C)
15 enumerator :: square, cicrle
16 !ERROR: 'square' is already declared in this scoping unit
17 enumerator square
18 end enum
19
20 dimension :: apple(4)
21 real :: peach
22
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
32
33 enum, bind(C)
34 !ERROR: Enumerator value could not be computed from the given expression
35 !ERROR: Must be a constant value
36 enumerator :: wrong = 0/0
37 end enum
38
39 end