gcc/testsuite/gfortran.dg/dec_union_10.f90
raw| 1 | ! { dg-do compile } |
| 2 | ! { dg-options "-fdec-structure" } |
| 3 | ! |
| 4 | ! Check for regression where gfc_compare_union_types wasn't properly guarded |
| 5 | ! against empty unions. |
| 6 | ! |
| 7 | |
| 8 | subroutine sub1(r) |
| 9 | structure /s/ |
| 10 | union |
| 11 | end union |
| 12 | end structure |
| 13 | record /s/ r |
| 14 | end subroutine |
| 15 | |
| 16 | subroutine sub2() |
| 17 | structure /s/ |
| 18 | union |
| 19 | end union |
| 20 | end structure |
| 21 | record /s/ r |
| 22 | call sub1(r) |
| 23 | end subroutine |
| 24 | |
| 25 | call sub2() |
| 26 | |
| 27 | end |