view gcc/testsuite/gfortran.dg/pr46588.f90 @ 111:04ced10e8804

gcc 7
author kono
date Fri, 27 Oct 2017 22:46:09 +0900
parents
children 84e7813d76e9
line wrap: on
line source

! { 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