gcc/testsuite/gfortran.dg/char_result_16.f90
raw| 1 | ! PR fortran/78757 |
| 2 | ! { dg-do compile } |
| 3 | ! { dg-options "-O1" } |
| 4 | |
| 5 | program pr78757 |
| 6 | implicit none |
| 7 | character (len = 30), target :: x |
| 8 | character (len = 30), pointer :: s |
| 9 | s => foo (30_8) |
| 10 | contains |
| 11 | function foo (i) |
| 12 | integer (8) :: i |
| 13 | character (len = i), pointer :: foo |
| 14 | foo => x |
| 15 | end function foo |
| 16 | end program pr78757 |