Merge from mainline
[official-gcc.git] / gcc / testsuite / gfortran.dg / pr26246_1.f90
bloba1cb45535fe047f78c9c5ad36c3ff154dd50ef80
1 ! PR fortran/26246
2 ! { dg-options "-fdump-tree-original" }
3 ! { dg-do compile }
5 module pr26246_1
6 implicit none
7 contains
8 function foo(string)
9 character(*), intent(in) :: string
10 character(len=len(string)+2) :: foo
11 if (index(trim(string), '"').ne.0) then
12 foo = "'" // trim(string) // "'"
13 end if
14 end function foo
15 end module pr26246_1
17 ! { dg-final { scan-tree-dump-times "static int" 0 "original" } }
18 ! { dg-final { cleanup-tree-dump "original" } }