Commit 585ba38f by Tobias Burnus Committed by Tobias Burnus

re PR fortran/41755 (Segfault on invalid code)

2009-10-19  Tobias Burnus  <burnus@net-b.de>
            Steven G. Kargl  <kargl@gcc.gnu.org>

        PR fortran/41755
        * symbol.c (gfc_undo_symbols): Add NULL check.
        * match.c (gfc_match_equivalence): Add check for
        missing comma.

2009-10-19  Tobias Burnus  <burnus@net-b.de>

        PR fortran/41755
        * gfortran.dg/equiv_8.f90: New test.
        * gfortran.dg/class_allocate_1.f03: Remove obsolete FIXME.


Co-Authored-By: Steven G. Kargl <kargl@gcc.gnu.org>

From-SVN: r152983
parent 941e566a
2009-10-19 Tobias Burnus <burnus@net-b.de>
Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/41755
* symbol.c (gfc_undo_symbols): Add NULL check.
* match.c (gfc_match_equivalence): Add check for
missing comma.
2009-10-19 Richard Guenther <rguenther@suse.de> 2009-10-19 Richard Guenther <rguenther@suse.de>
PR fortran/41494 PR fortran/41494
......
...@@ -3750,7 +3750,10 @@ gfc_match_equivalence (void) ...@@ -3750,7 +3750,10 @@ gfc_match_equivalence (void)
if (gfc_match_eos () == MATCH_YES) if (gfc_match_eos () == MATCH_YES)
break; break;
if (gfc_match_char (',') != MATCH_YES) if (gfc_match_char (',') != MATCH_YES)
goto syntax; {
gfc_error ("Expecting a comma in EQUIVALENCE at %C");
goto cleanup;
}
} }
return MATCH_YES; return MATCH_YES;
......
...@@ -2741,7 +2741,7 @@ gfc_undo_symbols (void) ...@@ -2741,7 +2741,7 @@ gfc_undo_symbols (void)
if (p->gfc_new) if (p->gfc_new)
{ {
/* Symbol was new. */ /* Symbol was new. */
if (p->attr.in_common && p->common_block->head) if (p->attr.in_common && p->common_block && p->common_block->head)
{ {
/* If the symbol was added to any common block, it /* If the symbol was added to any common block, it
needs to be removed to stop the resolver looking needs to be removed to stop the resolver looking
......
2009-10-19 Tobias Burnus <burnus@net-b.de>
PR fortran/41755
* gfortran.dg/equiv_8.f90: New test.
* gfortran.dg/class_allocate_1.f03: Remove obsolete FIXME.
2009-10-19 Joseph Myers <joseph@codesourcery.com> 2009-10-19 Joseph Myers <joseph@codesourcery.com>
* gcc.target/arm/neon-thumb2-move.c: New test. * gcc.target/arm/neon-thumb2-move.c: New test.
......
...@@ -68,8 +68,7 @@ ...@@ -68,8 +68,7 @@
i = 0 i = 0
allocate(t2 :: cp2) allocate(t2 :: cp2)
! FIXME: Not yet supported: source=<class> allocate(cp, source = cp2)
! allocate(cp, source = cp2)
allocate(t2 :: cp3) allocate(t2 :: cp3)
allocate(cp, source=cp3) allocate(cp, source=cp3)
select type (cp) select type (cp)
......
! { dg-do compile }
!
! PR fortran/41755
!
common /uno/ aa
equivalence (aa,aaaaa) (bb,cc) ! { dg-error "Expecting a comma in EQUIVALENCE" }
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