summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/pr46588.f90
blob: 420fb4b2e90036247a95d98b1491d619d604d92d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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