| 1 |
! { dg-do run } |
| 2 |
! PR fortran/83874 |
| 3 |
! There was an ICE while initializing the character arrays |
| 4 |
! |
| 5 |
! Contributed by Harald Anlauf <[email protected]> |
| 6 |
! |
| 7 |
program charinit |
| 8 |
implicit none |
| 9 |
type t |
| 10 |
character(len=1) :: name |
| 11 |
end type t |
| 12 |
type(t), parameter :: z(2)= [ t ('a'), t ('b') ] |
| 13 |
character(len=1), parameter :: names1(*) = z% name |
| 14 |
character(len=*), parameter :: names2(2) = z% name |
| 15 |
character(len=*), parameter :: names3(*) = z% name |
| 16 |
if (.not. (names1(1) == "a" .and. names1(2) == "b")) STOP 1 |
| 17 |
if (.not. (names2(1) == "a" .and. names2(2) == "b")) STOP 2 |
| 18 |
if (.not. (names3(1) == "a" .and. names3(2) == "b")) STOP 3 |
| 19 |
end program charinit |