This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/17741] ICE in gfc_free_namespace, at fortran/symbol.c:2208
- From: "paul dot richard dot thomas at cea dot fr" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 10 May 2006 12:59:43 -0000
- Subject: [Bug fortran/17741] ICE in gfc_free_namespace, at fortran/symbol.c:2208
- References: <bug-17741-7427@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #3 from paul dot richard dot thomas at cea dot fr 2006-05-10 12:59 -------
I think that it is not correct to emit an ICE on this one. The patch below
emits an error and bails out.
I will submit in the next 24hours.
Paul
Index: gcc/fortran/symbol.c
===================================================================
--- gcc/fortran/symbol.c (r├®vision 113111)
+++ gcc/fortran/symbol.c (copie de travail)
@@ -2490,8 +2490,15 @@
ns->refs--;
if (ns->refs > 0)
return;
- gcc_assert (ns->refs == 0);
+ if (ns->refs != 0)
+ {
+ gfc_error_now ("namespace %s has %d references on being freed",
+ ns->proc_name->name ? ns->proc_name->name : "MAIN",
+ ns->refs + 1);
+ return;
+ }
+
gfc_free_statements (ns->code);
free_sym_tree (ns->sym_root);
--
paul dot richard dot thomas at cea dot fr changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |paul dot richard dot thomas
| |at cea dot fr
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17741