PR target/83368
[official-gcc.git] / gcc / testsuite / gfortran.dg / string_length_3.f90
blobe745eb9fdfac0a8795a4f3ffee853dcbbb0e584c
1 ! { dg-do run }
2 ! { dg-options "-ffrontend-optimize -fdump-tree-original" }
3 ! PR 78021 - calls to mylen were folded after shortening the
4 ! argument list.
6 PROGRAM test_o_char
7 implicit none
8 integer :: n
9 n = mylen('c') + mylen('c ')
10 if (n /= 5) call abort
11 CONTAINS
13 FUNCTION mylen(c)
14 CHARACTER(len=*),INTENT(in) :: c
15 INTEGER :: mylen
16 mylen=LEN(c)
17 END FUNCTION mylen
18 END PROGRAM test_o_char
19 ! { dg-final { scan-tree-dump-times "__var" 0 "original" } }