From: Paul Brook Date: Thu, 13 May 2004 23:22:13 +0000 (+0000) Subject: re PR fortran/15314 (ICE caused by array initializer in derived type definition) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c39373da4911f9246dec9b50011ed2aa9247c2c1;p=gcc.git re PR fortran/15314 (ICE caused by array initializer in derived type definition) PR fortran/15314 * gfortran.fortran-torture/execute/der_init_s.f90: New test. From-SVN: r81818 --- diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index e32d1885ed8..8939fc452d3 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,4 +1,4 @@ -2004-05-13 Paul Brook +2004-05-13 Victor Leikehman PR fortran/15314 * trans-expr.c (gfc_conv_structure): Use field type, not expr type. diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 65705ecedc9..4ac96daa562 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2004-05-13 Paul Brook + + PR fortran/15314 + * gfortran.fortran-torture/execute/der_init_s.f90: New test. + 2004-05-13 Andrew Pinski * gcc.dg/uninit-H.c: Test for __PPC__ and __ppc__ diff --git a/gcc/testsuite/gfortran.fortran-torture/execute/der_init_2.f90 b/gcc/testsuite/gfortran.fortran-torture/execute/der_init_2.f90 new file mode 100644 index 00000000000..d0448a55b67 --- /dev/null +++ b/gcc/testsuite/gfortran.fortran-torture/execute/der_init_2.f90 @@ -0,0 +1,15 @@ +! PR 15314 +! We were looking at the type of the initialization expression, not the type +! of the field. +program der_init_2 + implicit none + type foo + integer :: a(3) = 42 + integer :: b = 123 + end type + + type (foo) :: v + + if ((v%b .ne. 123) .or. any (v%a .ne. 42)) call abort (); +end program +