Commit 3c721513 by Tobias Burnus Committed by Tobias Burnus

re PR fortran/34557 (Rejects valid: EQUIVALENCE of character substrings)

2008-01-04  Tobias Burnus  <burnus@net-b.de>

       PR fortran/34557
       * primary.c (match_varspec): Gobble whitespace before
       checking for '('.

2008-01-04  Tobias Burnus  <burnus@net-b.de>

       PR fortran/34557
       * gfortran.dg/equiv_substr.f90: New.

From-SVN: r131317
parent 33af36f7
2008-01-04 Tobias Burnus <burnus@net-b.de>
PR fortran/34557
* primary.c (match_varspec): Gobble whitespace before
checking for '('.
...@@ -1679,6 +1679,7 @@ match_varspec (gfc_expr *primary, int equiv_flag) ...@@ -1679,6 +1679,7 @@ match_varspec (gfc_expr *primary, int equiv_flag)
tail = NULL; tail = NULL;
gfc_gobble_whitespace ();
if ((equiv_flag && gfc_peek_char () == '(') || sym->attr.dimension) if ((equiv_flag && gfc_peek_char () == '(') || sym->attr.dimension)
{ {
/* In EQUIVALENCE, we don't know yet whether we are seeing /* In EQUIVALENCE, we don't know yet whether we are seeing
...@@ -1692,6 +1693,7 @@ match_varspec (gfc_expr *primary, int equiv_flag) ...@@ -1692,6 +1693,7 @@ match_varspec (gfc_expr *primary, int equiv_flag)
if (m != MATCH_YES) if (m != MATCH_YES)
return m; return m;
gfc_gobble_whitespace ();
if (equiv_flag && gfc_peek_char () == '(') if (equiv_flag && gfc_peek_char () == '(')
{ {
tail = extend_ref (primary, tail); tail = extend_ref (primary, tail);
......
2008-01-04 Tobias Burnus <burnus@net-b.de>
PR fortran/34557
* gfortran.dg/equiv_substr.f90: New.
2008-01-03 Tom Tromey <tromey@redhat.com> 2008-01-03 Tom Tromey <tromey@redhat.com>
PR c/34457: PR c/34457:
! { dg-do compile }
!
! PR fortran/34557
!
! Substrings with space before '(' were not properly parsed.
!
implicit none
character :: A(2,2)*2, B(2)*3, C*5
equivalence (A (2,1) (1:1), B (1) (2:3), C (3:5))
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