From a982bcf962c4b72371642a9369d6dea4ac05a979 Mon Sep 17 00:00:00 2001 From: Francois-Xavier Coudert Date: Mon, 4 May 2015 14:27:14 +0000 Subject: [PATCH] re PR fortran/44735 (ICE on FORALL with character array pointer) PR fortran/44735 * gfortran.dg/pr44735.f90: New test. From-SVN: r222766 --- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/gfortran.dg/pr44735.f90 | 16 ++++++++++++++++ 2 files changed, 21 insertions(+) create mode 100644 gcc/testsuite/gfortran.dg/pr44735.f90 diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 58308186822..cb7bc61bb12 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2015-05-04 Francois-Xavier Coudert + + PR fortran/44735 + * gfortran.dg/pr44735.f90: New test. + 2015-05-04 Richard Biener PR tree-optimization/65965 diff --git a/gcc/testsuite/gfortran.dg/pr44735.f90 b/gcc/testsuite/gfortran.dg/pr44735.f90 new file mode 100644 index 00000000000..0c9b8dec18c --- /dev/null +++ b/gcc/testsuite/gfortran.dg/pr44735.f90 @@ -0,0 +1,16 @@ +! { dg-do run } + +program main + if (bug() /= "abcdefghij") call abort +contains + function bug() + character(len=10) :: bug + character(len=1), dimension(:), pointer :: p_chars + allocate(p_chars(10)) + p_chars = ['a','b','c','d','e','f','g','h','i','j'] + forall (i=1:len(bug)) + bug(i:i) = p_chars(i) + end forall + deallocate(p_chars) + end function bug +end program main -- 2.30.2