gcc/testsuite/gfortran.dg/data_initialized_4.f90
raw| 1 | ! { dg-do compile } |
| 2 | ! { dg-additional-options "-std=legacy" } |
| 3 | ! |
| 4 | ! PR fortran/50410 |
| 5 | ! |
| 6 | ! Silently allow overlapping initialization in legacy mode (used to ICE) |
| 7 | |
| 8 | program p |
| 9 | implicit none |
| 10 | type t |
| 11 | integer :: g = 1 |
| 12 | end type t |
| 13 | type(t) :: u = t(2) |
| 14 | data u%g /3/ |
| 15 | print *, u ! this might print "2" |
| 16 | end |