aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc')
-rw-r--r--gcc/fortran/ChangeLog2
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/gfortran.fortran-torture/execute/der_init_2.f9015
3 files changed, 21 insertions, 1 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog
index e32d188..8939fc4 100644
--- a/gcc/fortran/ChangeLog
+++ b/gcc/fortran/ChangeLog
@@ -1,4 +1,4 @@
-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.
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 65705ec..4ac96da 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+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__
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 0000000..d0448a5
--- /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
+