Commit 23acf4d4 by Tobias Schlüter Committed by Tobias Schlüter

re PR fortran/18869 (multiple common blocks in a single line rejected)

gcc/
PR fortran/18869
* match.c (gfc_match_common): Skip whitespace.

testsuite/
PR fortran/18869
* gfortran.dg/common_1.f90: New test.

From-SVN: r92064
parent c3d003d2
2004-12-12 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
PR fortran/18869
* match.c (gfc_match_common): Skip whitespace.
2004-12-12 Steven G. Kargl <kargls@comcast.net>
PR fortran/16581
......
......@@ -2306,12 +2306,14 @@ gfc_match_common (void)
as = NULL;
}
gfc_gobble_whitespace ();
if (gfc_match_eos () == MATCH_YES)
goto done;
if (gfc_peek_char () == '/')
break;
if (gfc_match_char (',') != MATCH_YES)
goto syntax;
gfc_gobble_whitespace ();
if (gfc_peek_char () == '/')
break;
}
......
2004-12-12 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
PR fortran/18869
* gfortran.dg/common_1.f90: New test.
2004-12-12 Steven G. Kargl <kargls@comcast.net>
Paul Brook <paul@codesourcery.com>
......
! { dg-do compile }
! tests various allowed variants of the common statement
! inspired by PR 18869
! blank common block
common x
common y, z
common // xx
! one named common block on a line
common /a/ e
! appending to a common block
common /a/ g
! several named common blocks on a line
common /foo/ a, /bar/ b ! note 'a' is also the name of the
! above common block
common /baz/ c /foobar/ d, /bazbar/ f
end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment