c: Fix up pointer types to may_alias structures [PR114493]
[official-gcc.git] / gcc / testsuite / gfortran.dg / pr106918.f90
blob25f72b360796f6f16023856c417bdaa7671c4274
1 ! { dg-do run }
3 ! Contributed by Lionel Guez <guez@lmd.ens.fr>
5 character(len = :), allocatable:: attr_name(:)
6 character(6) :: buffer
7 type coord_def
8 character(len = :), allocatable:: attr_name(:)
9 end type coord_def
10 type(coord_def) coordinates
11 attr_name = ["units"]
12 write (buffer, *) attr_name
13 if (buffer .ne. " units") stop 1
14 coordinates = coord_def(attr_name)
15 write (buffer, *) coordinates%attr_name
16 if (buffer .ne. " units") stop 2
17 deallocate (attr_name)
18 deallocate (coordinates%attr_name)
19 end