hppa64: Fix fmt_f_default_field_width_3.f90 and fmt_g_default_field_width_3.f90
[official-gcc.git] / gcc / testsuite / gfortran.dg / dec_union_12.f90
blob26671230b05f58c8c39373620c7d5ec360b38304
1 ! { dg-do compile }
2 ! { dg-options "-std=legacy -ffree-form -finit-local-zero -finit-derived -fdec-structure" }
4 ! PR fortran/105310
6 ! Test that gfc_conv_union_initializer does not cause an ICE when called
7 ! to build the constructor for a field which triggers a vector resize.
10 program dec_union_12
11 implicit none
12 STRUCTURE /foo8u/
13 ! 8 fields
14 INTEGER(4) :: a,b,c,d,e,f,g,h
15 UNION
16 MAP
17 ENDMAP
18 ENDUNION
19 ENDSTRUCTURE
20 STRUCTURE /foo16u/
21 ! 16 fields
22 INTEGER(4) :: a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p
23 UNION
24 MAP
25 ENDMAP
26 ENDUNION
27 ENDSTRUCTURE
28 STRUCTURE /foo32u/
29 ! 32 fields
30 INTEGER(4) :: a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p
31 INTEGER(4) :: aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,al,am,an,ao,ap
32 UNION
33 MAP
34 ENDMAP
35 ENDUNION
36 ENDSTRUCTURE
37 record /foo8u/ bar8u
38 record /foo16u/ bar16u
39 record /foo32u/ bar32u
40 bar8u.a = 1
41 bar16u.a = 1
42 bar32u.a = 1
43 end