gcc/testsuite/gfortran.dg/function_charlen_3.f
raw| 1 | C { dg-do compile } |
| 2 | C Tests the fix for the regression PR34872, in which the re-matching of |
| 3 | C the function declaration made a mess if the first executable statement |
| 4 | C had a label. |
| 5 | CHARACTER FUNCTION s() |
| 6 | 10 CONTINUE |
| 7 | GOTO 10 |
| 8 | s = ' ' |
| 9 | END FUNCTION s |
| 10 | |
| 11 | CHARACTER FUNCTION t() |
| 12 | 10 format ("q") |
| 13 | write (t, 10) |
| 14 | END FUNCTION t |
| 15 | |
| 16 | character t |
| 17 | if (t() .ne. "q") STOP 1 |
| 18 | end |