From c6c74708b0cc313c90ab5bffc0c2eaa6062827cb Mon Sep 17 00:00:00 2001 From: Thomas Koenig Date: Sun, 24 Sep 2017 14:26:55 +0000 Subject: [PATCH] re PR fortran/66328 (Wrong initialization of derived-type DATA) 2017-09-24 Thomas Koenig PR fortran/66328 * gfortran.dg/data_derived_1.f90: New test. From-SVN: r253126 --- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/gfortran.dg/data_derived_1.f90 | 13 +++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 gcc/testsuite/gfortran.dg/data_derived_1.f90 diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 3502b3a..21e6e2d 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,4 +1,9 @@ 2017-09-24 Thomas Koenig + PR fortran/66328 + + * gfortran.dg/data_derived_1.f90: New test. + +2017-09-24 Thomas Koenig PR fortran/54633 * gfortran.dg/intrinsic_bounds_1.f90: New test. diff --git a/gcc/testsuite/gfortran.dg/data_derived_1.f90 b/gcc/testsuite/gfortran.dg/data_derived_1.f90 new file mode 100644 index 0000000..3ec08e2 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/data_derived_1.f90 @@ -0,0 +1,13 @@ +! { dg-do run } +! PR 66328 - this used to give a wrong value for integer values for DATA +program main + TYPE t + REAL r + END TYPE t + TYPE (t) e1, e2 + + DATA e1 / t(1) / + DATA e2 / t(1.0) / + if (abs(e1%r - 1.0) > 1e-6) call abort + if (abs(e2%r - 1.0) > 1e-6) call abort +END -- 2.7.4