gcc/testsuite/gfortran.dg/error_stop_2.f08
raw| 1 | ! { dg-do compile } |
| 2 | ! PR44371 STOP parsing rejects valid code. |
| 3 | real, dimension(5,5,5) :: i |
| 4 | character(1) c, y |
| 5 | y = 'y' |
| 6 | read(y,*) c |
| 7 | if (c=='x') stop; if (c=='X') stop |
| 8 | if (c=='x') stop size(i); if (c=='X') stop |
| 9 | |
| 10 | if (c=='y') stop size(i) if (c=='Y') stop ! { dg-error "Syntax error in STOP" } |
| 11 | end |