| 1 |
! { dg-do compile } |
| 2 |
! |
| 3 |
! PR fortran/50071 |
| 4 |
! Duplicate statement labels should not be rejected if they appear in |
| 5 |
! different scoping units |
| 6 |
! |
| 7 |
! Contributed by Vittorio Zecca <[email protected]> |
| 8 |
|
| 9 |
c gfortran complains about duplicate statement labels |
| 10 |
c this is a legal program because types have their own scoping units |
| 11 |
c and you may have same labels in different scoping units, |
| 12 |
c as you may have same identifiers inside, like G. |
| 13 |
type t1 |
| 14 |
1 integer G |
| 15 |
end type |
| 16 |
type t2 |
| 17 |
1 integer G |
| 18 |
end type |
| 19 |
c this is legal |
| 20 |
goto 1 |
| 21 |
print *,'bad' |
| 22 |
1 continue |
| 23 |
print *,'good' |
| 24 |
end |
| 25 |
|