diff options
Diffstat (limited to 'gcc/testsuite/gfortran.dg/goto_1.f')
-rw-r--r-- | gcc/testsuite/gfortran.dg/goto_1.f | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/gcc/testsuite/gfortran.dg/goto_1.f b/gcc/testsuite/gfortran.dg/goto_1.f new file mode 100644 index 000000000..11b7c535f --- /dev/null +++ b/gcc/testsuite/gfortran.dg/goto_1.f @@ -0,0 +1,15 @@ +! { dg-do run } +! { dg-options "-std=legacy" } +! PR 18540 +! Verify that old-style cross-block GOTOs work + I = 1 + GO TO 2 + IF (I .EQ. 0) THEN + 2 IF (I .NE. 1) CALL ABORT + I = 0 + GOTO 3 + ELSE + 3 I = 2 + END IF + IF (I .NE. 2) CALL ABORT + END |