summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/pr26246_1.f90
blob: 49f3f8cafdcafb95a2c1cbb64065633d767ebe3b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
! PR fortran/26246
! { dg-options "-fdump-tree-original" }
! { dg-do compile }

module pr26246_1
  implicit none
  contains
    function foo(string)
    character(*), intent(in) :: string
    character(len=len(string)+2) :: foo
    if (index(trim(string), '"').ne.0) then
      foo = "'" // trim(string) // "'"
    end if
  end function foo
end module pr26246_1

! { dg-final { scan-tree-dump-times "static int" 0 "original" } }