diff options
-rw-r--r-- | gcc/fortran/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/fortran/parse.c | 2 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/gfortran.dg/error_recovery_1.f90 | 15 |
4 files changed, 26 insertions, 1 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 1b456cdde42..05b55314f84 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,8 @@ +2006-05-10 Francois-Xavier Coudert <coudert@clipper.ens.fr> + + PR fortran/24549 + * parse.c (reject_statement): Clear gfc_new_block. + 2006-05-09 Steven G. Kargl <kargls@comcast.net> * invoke.texi: Missed file in previous commit. Update diff --git a/gcc/fortran/parse.c b/gcc/fortran/parse.c index 2b04904a77c..2f358e881be 100644 --- a/gcc/fortran/parse.c +++ b/gcc/fortran/parse.c @@ -1292,7 +1292,7 @@ accept_statement (gfc_statement st) static void reject_statement (void) { - + gfc_new_block = NULL; gfc_undo_symbols (); gfc_clear_warning (); undo_new_statement (); diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 7e7c9982e75..6bcb53e1062 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2006-05-10 Francois-Xavier Coudert <coudert@clipper.ens.fr> + + PR fortran/24549 + * gfortran.dg/error_recovery_1.f90: New test. + 2006-05-10 Richard Guenther <rguenther@suse.de> PR tree-optimization/27302 diff --git a/gcc/testsuite/gfortran.dg/error_recovery_1.f90 b/gcc/testsuite/gfortran.dg/error_recovery_1.f90 new file mode 100644 index 00000000000..8d4f65baff9 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/error_recovery_1.f90 @@ -0,0 +1,15 @@ +! { dg-do compile } +! PR fortran/24549 (and duplicate PR fortran/27487) +module gfcbug29_import + interface + subroutine foo (x) + something :: dp ! { dg-error "Unclassifiable statement" } + real (kind=dp) :: x ! { dg-error "has not been declared or is a variable, which does not reduce to a constant expression" } + end subroutine foo + end interface +end module gfcbug29_import + +subroutine FOO + X :: I ! { dg-error "Unclassifiable statement" } + equivalence (I,I) +end |