diff options
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/fortran/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/fortran/match.c | 6 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/gfortran.dg/common_6.f90 | 10 |
4 files changed, 21 insertions, 6 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 5005340..f1974a3 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,9 @@ +2005-09-08 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de> + + PR fortran/23765 + * match.c (gfc_match_common): Remove unnecessary / wrong special + cases for end-of-statement. + 2005-09-08 Janne Blomqvist <jblomqvi@cc.hut.fi> * gfortran.texi: Add section about implemented F2003 features. diff --git a/gcc/fortran/match.c b/gcc/fortran/match.c index 87737fc..67c7c96 100644 --- a/gcc/fortran/match.c +++ b/gcc/fortran/match.c @@ -2241,9 +2241,6 @@ gfc_match_common (void) as = NULL; - if (gfc_match_eos () == MATCH_YES) - goto syntax; - for (;;) { m = match_common_name (name); @@ -2273,9 +2270,6 @@ gfc_match_common (void) } /* Grab the list of symbols. */ - if (gfc_match_eos () == MATCH_YES) - goto done; - for (;;) { m = gfc_match_symbol (&sym, 0); diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 4fa4a7d..f6ab8fb 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2005-09-08 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de> + + PR fortran/23765 + * gfortran.dg/common_6.f90: New test. + 2005-09-08 Mark Mitchell <mark@codesourcery.com> PR c++/23691 diff --git a/gcc/testsuite/gfortran.dg/common_6.f90 b/gcc/testsuite/gfortran.dg/common_6.f90 new file mode 100644 index 0000000..8cef179 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/common_6.f90 @@ -0,0 +1,10 @@ +! { dg-do compile } +! PR 23765 : We used to incorrectly accept common blocks with no symbols +common ! { dg-error "Syntax error" } +common // ! { dg-error "Syntax error" } +common /a/ ! { dg-error "Syntax error" } +common /b/x/c/ ! { dg-error "Syntax error" } +common y/d/ ! { dg-error "Syntax error" } +common /e//f/ ! { dg-error "Syntax error" } +common ///g/ ! { dg-error "Syntax error" } +end |