I've committed a testcase for PR fortran/46588 to trunk. The patches for PR 67805 and 68108 fixed this 46588, but the testcase goes through a differenti compiler path. 2015-10-30 Steven G. Kargl <ka...@gcc.gnu.org>
PR fortran/46588 * gfortran.dg/pr46588.f90: New test. Index: gcc/testsuite/gfortran.dg/pr46588.f90 =================================================================== --- gcc/testsuite/gfortran.dg/pr46588.f90 (revision 0) +++ gcc/testsuite/gfortran.dg/pr46588.f90 (working copy) @@ -0,0 +1,21 @@ +! { dg-do run } +! { dg-options "-std=gnu" } +! PR fortran/46588 +! Original code contributed by Oleh Steblev <oleh dot steblev at gmail dot com> +! +! 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 -- Steve