OSDN Git Service

2010-07-24 Tobias Burnus <burnus@net-b.de>
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gfortran.dg / char_array_arg_1.f90
1 ! { dg-do compile }
2 ! Test the fix for pr41167, in which the first argument of 'pack', below,
3 ! was simplified incorrectly, with the results indicated.
4 !
5 ! Contributed by Harald Anlauf <anlauf@gmx.de>
6 !
7 program gfcbug88
8   implicit none
9   type t
10      character(len=8) :: name
11   end type t
12   type(t) ,parameter :: obstyp(2)= (/ t ('A'), t ('B') /)
13   character(9) :: chr(1)
14
15   print *, pack (" "//obstyp(:)% name, (/ .true., .false. /))  ! Used to ICE on compilation
16   chr = pack (" "//obstyp(:)% name, (/ .true., .false. /))  ! Used to give conversion error
17 end program gfcbug88