This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/66056] ICEs and endless compilation for lonely labels/numbers in type
- From: "lkrupp at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 26 Oct 2015 19:29:28 +0000
- Subject: [Bug fortran/66056] ICEs and endless compilation for lonely labels/numbers in type
- Auto-submitted: auto-generated
- References: <bug-66056-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66056
lkrupp at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
CC| |lkrupp at gcc dot gnu.org
Resolution|--- |FIXED
--- Comment #7 from lkrupp at gcc dot gnu.org ---
Fixed in revision 229390.
The problem: Statement labels within a type declaration are put in the
statement label tree belonging to the type declaration's namespace's (instead
of the current namespace). When the line is otherwise empty and an error is
issued, gfc_free_st_label tries to delete the label from the label tree
belonging to the current namespace and then frees the label structure, leaving
an invalid statement label pointer in the type declaration's namespace's label
tree. When that namespace is cleaned up, bad things can happen.
The attached patch stores a namespace pointer in the statement label structure
so that if a label is deleted early for some reason, it will be deleted from
the proper namespace.