Remove old autovect-branch by moving to "dead" directory.
[official-gcc.git] / old-autovect-branch / gcc / testsuite / gfortran.fortran-torture / execute / integer_select.f90
blob765356d2610ffb3bd9c49d5c70ffbad70a589e88
1 PROGRAM Test_INTEGER_select
3 ! Every wrong branch leads to destruction.
5 INTEGER, PARAMETER :: maxI = HUGE (maxI)
6 INTEGER, PARAMETER :: minI = -1 * maxI
7 INTEGER :: I = 0
9 SELECT CASE (I)
10 CASE (:-1)
11 CALL abort
12 CASE (1:)
13 CALL abort
14 CASE DEFAULT
15 CONTINUE
16 END SELECT
18 SELECT CASE (I)
19 CASE (3,2,1)
20 CALL abort
21 CASE (0)
22 CONTINUE
23 CASE DEFAULT
24 call abort
25 END SELECT
27 ! Not aborted by here, so it worked
28 ! See about weird corner cases
30 I = maxI
32 SELECT CASE (I)
33 CASE (:-1)
34 CALL abort
35 CASE (1:)
36 CONTINUE
37 CASE DEFAULT
38 CALL abort
39 END SELECT
41 SELECT CASE (I)
42 CASE (3,2,1,:0)
43 CALL abort
44 CASE (maxI)
45 CONTINUE
46 CASE DEFAULT
47 call abort
48 END SELECT
50 I = minI
52 SELECT CASE (I)
53 CASE (:-1)
54 CONTINUE
55 CASE (1:)
56 CALL abort
57 CASE DEFAULT
58 CALL abort
59 END SELECT
61 SELECT CASE (I)
62 CASE (3:,2,1,0)
63 CALL abort
64 CASE (minI)
65 CONTINUE
66 CASE DEFAULT
67 call abort
68 END SELECT
70 END