From: Francois-Xavier Coudert Date: Mon, 4 May 2015 14:27:14 +0000 (+0000) Subject: re PR fortran/44735 (ICE on FORALL with character array pointer) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=a982bcf962c4b72371642a9369d6dea4ac05a979;p=gcc.git re PR fortran/44735 (ICE on FORALL with character array pointer) PR fortran/44735 * gfortran.dg/pr44735.f90: New test. From-SVN: r222766 --- 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