gcc/testsuite/gfortran.dg/assumed_charlen_arg_1.f90
raw| 1 | ! { dg-do run } |
| 2 | ! From PR 33881 |
| 3 | call create_watch_ss(" ") |
| 4 | contains |
| 5 | subroutine create_watch_actual(name) |
| 6 | character(len=1) :: name(1) |
| 7 | end subroutine create_watch_actual |
| 8 | |
| 9 | subroutine create_watch_ss(name,clock) |
| 10 | character(len=*) :: name |
| 11 | integer, optional :: clock |
| 12 | if (present(clock)) then |
| 13 | call create_watch_actual((/name/)) |
| 14 | else |
| 15 | call create_watch_actual((/name/)) |
| 16 | end if |
| 17 | end subroutine create_watch_ss |
| 18 | end |