diff options
author | Tobias Burnus <burnus@net-b.de> | 2014-12-31 18:16:06 +0100 |
---|---|---|
committer | Tobias Burnus <burnus@gcc.gnu.org> | 2014-12-31 18:16:06 +0100 |
commit | 2e9cc48c28941114a7b05e42d1ab6abd6919ce62 (patch) | |
tree | c17275a2aa720df2f31c19545be1af6909c60919 /gcc/testsuite | |
parent | 1a33dc9ec24fed0406de07f54e0442915e3cfedb (diff) | |
download | gcc-2e9cc48c28941114a7b05e42d1ab6abd6919ce62.zip gcc-2e9cc48c28941114a7b05e42d1ab6abd6919ce62.tar.gz gcc-2e9cc48c28941114a7b05e42d1ab6abd6919ce62.tar.bz2 |
match.c (gfc_match_stopcode): Permit error stop in pure procedures with F2015.
gcc/fortran/
2014-12-31 Tobias Burnus <burnus@net-b.de>
* match.c (gfc_match_stopcode): Permit error stop in pure
procedures with F2015.
gcc/testsuite/
2014-12-31 Tobias Burnus <burnus@net-b.de>
* gfortran.dg/error_stop_3.f90: New.
* gfortran.dg/error_stop_4.f90: New.
* gfortran.dg/coarray_3.f90: Remove a dg-error.
From-SVN: r219127
Diffstat (limited to 'gcc/testsuite')
-rw-r--r-- | gcc/testsuite/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/testsuite/gfortran.dg/coarray_3.f90 | 2 | ||||
-rw-r--r-- | gcc/testsuite/gfortran.dg/error_stop_3.f90 | 9 | ||||
-rw-r--r-- | gcc/testsuite/gfortran.dg/error_stop_4.f90 | 9 |
4 files changed, 25 insertions, 1 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 03531d38..96ca314 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2014-12-31 Tobias Burnus <burnus@net-b.de> + + * gfortran.dg/error_stop_3.f90: New. + * gfortran.dg/error_stop_4.f90: New. + * gfortran.dg/coarray_3.f90: Remove a dg-error. + 2014-12-31 Iain Sandoe <iain@codesourcery.com> * obj-c++.dg/lambda-0.mm New. diff --git a/gcc/testsuite/gfortran.dg/coarray_3.f90 b/gcc/testsuite/gfortran.dg/coarray_3.f90 index 63c3bd3..aba4eb1 100644 --- a/gcc/testsuite/gfortran.dg/coarray_3.f90 +++ b/gcc/testsuite/gfortran.dg/coarray_3.f90 @@ -79,7 +79,7 @@ pure subroutine pureSub() critical ! { dg-error "Image control statement CRITICAL" } end critical ! { dg-error "Expecting END SUBROUTINE statement" } sync all ! { dg-error "Image control statement SYNC" } - error stop ! { dg-error "not allowed in PURE procedure" } + error stop end subroutine pureSub diff --git a/gcc/testsuite/gfortran.dg/error_stop_3.f90 b/gcc/testsuite/gfortran.dg/error_stop_3.f90 new file mode 100644 index 0000000..4374739 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/error_stop_3.f90 @@ -0,0 +1,9 @@ +! { dg-do compile } +! { dg-options "-std=gnu" } +! +! F2015 permits ERROR STOP in PURE procedures +! FIXME: Change to -std=f2015, when available +! +pure subroutine foo() + error stop "failed" +end diff --git a/gcc/testsuite/gfortran.dg/error_stop_4.f90 b/gcc/testsuite/gfortran.dg/error_stop_4.f90 new file mode 100644 index 0000000..a28aa37 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/error_stop_4.f90 @@ -0,0 +1,9 @@ +! { dg-do compile } +! { dg-options "-std=f2008ts" } +! +! F2015 permits ERROR STOP in PURE procedures +! FIXME: Change to error_stop_3.f90 to -std=f2015. +! +pure subroutine foo() + error stop "failed" ! { dg-error "GNU Extension: ERROR STOP statement at .1. in PURE procedure" } +end |