From: Steven G. Kargl Date: Fri, 30 Oct 2015 19:20:36 +0000 (+0000) Subject: re PR fortran/46588 (ICE with assumed character length function) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=a6906c809772feaead79e533e79535bd03a49aa6;p=gcc.git re PR fortran/46588 (ICE with assumed character length function) 2015-10-30 Steven G. Kargl PR fortran/46588 * gfortran.dg/pr46588.f90: New test. From-SVN: r229606 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 32c6a904770..a82f4cb2f5e 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2015-10-30 Steven G. Kargl + + PR fortran/46588 + * gfortran.dg/pr46588.f90: New test. + 2015-10-30 Evgeny Stupachenko * gcc.dg/mvc1.c: New test for multiple targets cloning. @@ -12,7 +17,7 @@ * g++.dg/ext/mvc3.C: Ditto. * g++.dg/ext/mvc4.C: Ditto. -2015-10-15 Steven G. Kargl +2015-10-30 Steven G. Kargl PR fortran/51993 * gfortran.dg/pr51993.f90: New test. diff --git a/gcc/testsuite/gfortran.dg/pr46588.f90 b/gcc/testsuite/gfortran.dg/pr46588.f90 new file mode 100644 index 00000000000..420fb4b2e90 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/pr46588.f90 @@ -0,0 +1,21 @@ +! { dg-do run } +! { dg-options "-std=gnu" } +! PR fortran/46588 +! Original code contributed by Oleh Steblev +! +! Issue appears to be fixed by PR 67805/68108 +function aufun(pm) + character(len = *) pm + character(len = *) aufun + character(len = len(aufun)) temp + temp = pm + aufun = 'Oh' // trim(temp) +end function aufun + +program ds + implicit none + character(len = 4) :: ins = ' no!' + character(len = 20) st, aufun + st = aufun(ins) + if (trim(st) /= 'Oh no!') call abort +end