2014-07-12 Paul Thomas <pault@gcc.gnu.org>
[official-gcc.git] / gcc / testsuite / gfortran.dg / goto_6.f
blob5b054b636bcec412a27ab774fc3ca0225925ac0a
1 ! { dg-do run }
2 ! { dg-options "-w" }
4 ! PR fortran/41403
5 ! Assigned-goto with label list used to compare label addresses which
6 ! failed with optimization. Check this works correctly now.
7 ! This is the most reduced Fortran code from the PR.
9 IVFAIL=0
10 ASSIGN 1263 TO I
11 GO TO I, (1262,1263,1264)
12 1262 ICON01 = 1262
13 GO TO 1265
14 1263 ICON01 = 1263
15 GO TO 1265
16 1264 ICON01 = 1264
17 1265 CONTINUE
18 41260 IF ( ICON01 - 1263 ) 21260, 11260, 21260
19 11260 IVPASS = IVPASS + 1
20 GO TO 1271
21 21260 IVFAIL = IVFAIL + 1
22 1271 CONTINUE
23 IF (IVFAIL /= 0) CALL abort ()
24 END