PR fortran/15314
* gfortran.fortran-torture/execute/der_init_s.f90: New test.
From-SVN: r81818
-2004-05-13 Paul Brook <paul@codesourcery.com>
+2004-05-13 Victor Leikehman <lei@haifasphere.co.il>
PR fortran/15314
* trans-expr.c (gfc_conv_structure): Use field type, not expr type.
+2004-05-13 Paul Brook <paul@codesourcery.com>
+
+ PR fortran/15314
+ * gfortran.fortran-torture/execute/der_init_s.f90: New test.
+
2004-05-13 Andrew Pinski <pinskia@physics.uc.edu>
* gcc.dg/uninit-H.c: Test for __PPC__ and __ppc__
--- /dev/null
+! 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
+