2017-12-08 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / gfortran.dg / alloc_comp_basics_4.f90
blob9877d3b7ec14fc9b5b7435462d1bdf246b0f5f22
1 ! { dg-do compile }
2 ! Tests the fix for PR30660 in which gfortran insisted that g_dest
3 ! should have the SAVE attribute because the hidden default
4 ! initializer for the allocatable component was being detected.
6 ! Contributed by Toon Moene <toon@moene.indiv.nluug.nl>
8 MODULE types_m
9 TYPE coord_t
10 INTEGER ncord
11 REAL,ALLOCATABLE,DIMENSION(:) :: x, y
12 END TYPE
14 TYPE grib_t
15 REAL,DIMENSION(:),ALLOCATABLE :: vdata
16 TYPE(coord_t) coords
17 END TYPE
18 END MODULE
20 MODULE globals_m
21 USE types_m
22 TYPE(grib_t) g_dest ! output field
23 END MODULE