PR inline-asm/84742
[official-gcc.git] / gcc / testsuite / gfortran.dg / structure_constructor_14.f90
blob10626f2a12ae30ba7b9cc9e437c2bcea6b01ec49
1 ! { dg-do run }
2 ! PR 48890, PR 83823
3 ! Test fix for wrong length in parameters. Original test cases
4 ! by mhp77 (a) gmx.at and Harald Anlauf.
6 program gfcbug145
7 implicit none
8 type t_obstyp
9 character(len=8) :: name
10 end type t_obstyp
11 type (t_obstyp) ,parameter :: obstyp(*)= &
12 [ t_obstyp ('SYNOP' ), &
13 t_obstyp ('DRIBU' ), &
14 t_obstyp ('TEMP' ), &
15 t_obstyp ('RADAR' ) ]
16 logical :: mask(size(obstyp)) = .true.
17 character(len=100) :: line
18 type (t_obstyp), parameter :: x = t_obstyp('asdf')
20 write(line,'(20(a8,:,"|"))') pack (obstyp% name, mask)
21 if (line /= 'SYNOP |DRIBU |TEMP |RADAR') STOP 1
22 write (line,'("|",A,"|")') x
23 if (line /= "|asdf |") STOP 2
24 end program gfcbug145