From 10f499af34794b5b4c400c2f5d2cb05bd524b0ff Mon Sep 17 00:00:00 2001 From: "Steven G. Kargl" Date: Wed, 14 Mar 2018 00:45:45 +0000 Subject: [PATCH] re PR fortran/61775 (Allocatable array initialized by implied-do loop array constructor gives invalid memory reference) 2018-03-13 Steven G. Kargl PR fortran/61775 * gfortran.dg/pr61775.f90: New test. From-SVN: r258509 --- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/gfortran.dg/pr61775.f90 | 9 +++++++++ 2 files changed, 14 insertions(+) create mode 100644 gcc/testsuite/gfortran.dg/pr61775.f90 diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index a06dc24703a..bc31ea6a114 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2018-03-13 Steven G. Kargl + + PR fortran/61775 + * gfortran.dg/pr61775.f90: New test. + 2018-03-13 Jakub Jelinek PR c++/84843 diff --git a/gcc/testsuite/gfortran.dg/pr61775.f90 b/gcc/testsuite/gfortran.dg/pr61775.f90 new file mode 100644 index 00000000000..48ef3cbcbc3 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/pr61775.f90 @@ -0,0 +1,9 @@ +! { dg-do run } +! PR fortran/61775.f90 +program pi + real, allocatable :: x(:) + integer :: n + n = 10000 + x = [ (i,i=1,n) ] + if (x(n) /= 10000) stop 1 +end program pi -- 2.30.2