This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/17741] ICE in gfc_free_namespace, at fortran/symbol.c:2208



------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]