diff options
Diffstat (limited to 'gcc/testsuite/gfortran.dg/pr26246_1.f90')
-rw-r--r-- | gcc/testsuite/gfortran.dg/pr26246_1.f90 | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/gcc/testsuite/gfortran.dg/pr26246_1.f90 b/gcc/testsuite/gfortran.dg/pr26246_1.f90 new file mode 100644 index 000000000..e35bcaca3 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/pr26246_1.f90 @@ -0,0 +1,19 @@ +! 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" } } +! { dg-final { cleanup-tree-dump "original" } } +! { dg-final { cleanup-modules "pr26246_1" } } |