gcc/testsuite/gfortran.dg/dec_structure_12.f90
raw| 1 | ! { dg-do compile } |
| 2 | ! { dg-options "-fdec-structure" } |
| 3 | ! |
| 4 | ! Test a regression where multiple anonymous structures failed to |
| 5 | ! receive unique internal names. |
| 6 | ! |
| 7 | |
| 8 | implicit none |
| 9 | |
| 10 | structure /s/ |
| 11 | |
| 12 | structure record0 ! (2) |
| 13 | integer i |
| 14 | end structure |
| 15 | |
| 16 | structure record1 ! regression: Type definition was already defined at (2) |
| 17 | real r |
| 18 | end structure |
| 19 | |
| 20 | end structure |
| 21 | |
| 22 | record /s/ var |
| 23 | |
| 24 | var.record0.i = 0 |
| 25 | var.record1.r = 0.0 |
| 26 | |
| 27 | end |