This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/50627] Error recovery: ICE in gfc_free_namespace after diagnosing missing end of construct
- From: "mikael at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sun, 09 Oct 2011 19:11:14 +0000
- Subject: [Bug fortran/50627] Error recovery: ICE in gfc_free_namespace after diagnosing missing end of construct
- Auto-submitted: auto-generated
- References: <bug-50627-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50627
Mikael Morin <mikael at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |mikael at gcc dot gnu.org
--- Comment #4 from Mikael Morin <mikael at gcc dot gnu.org> 2011-10-09 19:11:14 UTC ---
For the problem in comment #0:
As we parse select type, we create a new namespace.
The statement is (correctly) rejected, but we don't free the namespace.
Then we are back parsing module content, and the code doing that assumes that
gfc_current_namespace points to the module namespace, which is not the case
anymore (it points to the select namespace).
I assume that the problem in comment #3 is of the same kind:
We parse some block content, encounter end of file, then are back at parsing
the main program unit with gfc_current_ns still pointing to the block
namespace.