gcc/testsuite/gfortran.dg/dec_union_9.f90
raw| 1 | ! { dg-do compile } |
| 2 | ! { dg-options "-fdec-structure" } |
| 3 | ! |
| 4 | ! Test a regression where union components could compare equal to structure/map |
| 5 | ! components, causing an ICE in gfc_conv_component_ref. |
| 6 | ! |
| 7 | |
| 8 | implicit none |
| 9 | |
| 10 | structure /s1/ |
| 11 | integer(4) i |
| 12 | end structure |
| 13 | |
| 14 | structure /s2/ |
| 15 | union |
| 16 | map |
| 17 | record /s1/ r |
| 18 | end map |
| 19 | end union |
| 20 | end structure |
| 21 | |
| 22 | record /s2/ x |
| 23 | |
| 24 | x.r.i = 0 |
| 25 | |
| 26 | end |