re PR fortran/51605 (internal compiler error gfc_trans_block_construct, at fortran/trans-stmt.c:984)

2011-12-19  Tobias Burnus  <burnus@net-b.de>

        PR fortran/51605
        * parse.c (gfc_fixup_sibling_symbols): Regard FL_LABEL as
        local symbol.

2011-12-19  Tobias Burnus  <burnus@net-b.de>

        PR fortran/51605
        * gfortran.dg/block_10.f90: New.

From-SVN: r182497
This commit is contained in:
Tobias Burnus 2011-12-19 21:18:18 +01:00 committed by Tobias Burnus
parent 11c71a22d9
commit 1e815d3221
4 changed files with 46 additions and 0 deletions

View File

@ -1,3 +1,9 @@
2011-12-19 Tobias Burnus <burnus@net-b.de>
PR fortran/51605
* parse.c (gfc_fixup_sibling_symbols): Regard FL_LABEL as
local symbol.
2011-12-19 Tobias Burnus <burnus@net-b.de>
PR fortran/51605

View File

@ -3908,6 +3908,7 @@ gfc_fixup_sibling_symbols (gfc_symbol *sym, gfc_namespace *siblings)
|| old_sym->attr.intrinsic
|| old_sym->attr.generic
|| old_sym->attr.flavor == FL_NAMELIST
|| old_sym->attr.flavor == FL_LABEL
|| old_sym->attr.proc == PROC_ST_FUNCTION))
{
/* Replace it with the symbol from the parent namespace. */

View File

@ -1,3 +1,8 @@
2011-12-19 Tobias Burnus <burnus@net-b.de>
PR fortran/51605
* gfortran.dg/block_10.f90: New.
2011-12-19 Jason Merrill <jason@redhat.com>
PR c++/51553

View File

@ -0,0 +1,34 @@
! { dg-do compile }
!
! PR fortran/51605
!
contains
subroutine foo
BLOCK_NAME: block
end block BLOCK_NAME
end subroutine foo
subroutine BLOCK_NAME()
end subroutine BLOCK_NAME
subroutine bar()
end subroutine bar
end
subroutine test()
contains
subroutine BLOCK_NAME()
end subroutine BLOCK_NAME
subroutine foobar()
end subroutine foobar
subroutine foo
BLOCK_NAME: block
end block BLOCK_NAME
end subroutine foo
subroutine bar()
end subroutine bar
end