diff options
Diffstat (limited to 'gcc/testsuite/gfortran.dg/error_stop_2.f08')
-rw-r--r-- | gcc/testsuite/gfortran.dg/error_stop_2.f08 | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/gcc/testsuite/gfortran.dg/error_stop_2.f08 b/gcc/testsuite/gfortran.dg/error_stop_2.f08 new file mode 100644 index 000000000..8e3e71159 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/error_stop_2.f08 @@ -0,0 +1,11 @@ +! { dg-do compile } +! PR44371 STOP parsing rejects valid code. + real, dimension(5,5,5) :: i + character(1) c, y + y = 'y' + read(y,*) c + if (c=='x') stop; if (c=='X') stop + if (c=='x') stop size(i); if (c=='X') stop + + if (c=='y') stop size(i) if (c=='Y') stop ! { dg-error "Syntax error in STOP" } + end |