gcc/testsuite/gfortran.dg/pr26246_1.f90
raw| 1 | ! PR fortran/26246 |
| 2 | ! { dg-options "-fdump-tree-original" } |
| 3 | ! { dg-do compile } |
| 4 | |
| 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 |
| 16 | |
| 17 | ! { dg-final { scan-tree-dump-times "static int" 0 "original" } } |