diff options
Diffstat (limited to 'gcc/testsuite/gfortran.dg/block_4.f08')
-rw-r--r-- | gcc/testsuite/gfortran.dg/block_4.f08 | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/gcc/testsuite/gfortran.dg/block_4.f08 b/gcc/testsuite/gfortran.dg/block_4.f08 new file mode 100644 index 000000000..4c63194c8 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/block_4.f08 @@ -0,0 +1,18 @@ +! { dg-do compile } +! { dg-options "-std=f2008" } + +! Check for label mismatch errors with BLOCK statements. + +PROGRAM main + IMPLICIT NONE + + BLOCK + END BLOCK wrongname ! { dg-error "Syntax error" } + + myname: BLOCK + END BLOCK wrongname ! { dg-error "Expected label 'myname'" } + + myname2: BLOCK + END BLOCK ! { dg-error "Expected block name of 'myname2'" } +END PROGRAM main ! { dg-error "Expecting END BLOCK" } +! { dg-excess-errors "Unexpected end of file" } |