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/40005] segfault in gt_ggc_mx_lang_tree_node



------- Comment #32 from jv244 at cam dot ac dot uk  2009-07-24 17:00 -------
(In reply to comment #31)
> doesn't seem to happen on a clean trunk ( a few days more recent )

it is definitely caused by the current patch (i.e. reverting it fixes the
issue):

Index: trans-types.c
===================================================================
--- trans-types.c       (revision 149846)
+++ trans-types.c       (working copy)
@@ -1602,7 +1602,8 @@
   int n;

   base_type = gfc_get_array_descriptor_base (dimen);
-  fat_type = build_variant_type_copy (base_type);
+  fat_type = build_distinct_type_copy (base_type);
+  TYPE_CANONICAL (fat_type) = base_type;

   tmp = TYPE_NAME (etype);
   if (tmp && TREE_CODE (tmp) == TYPE_DECL)
Index: trans-decl.c
===================================================================
--- trans-decl.c        (revision 149846)
+++ trans-decl.c        (working copy)
@@ -2023,7 +2023,7 @@

       current_function_decl = NULL_TREE;

-      cgraph_finalize_function (thunk_fndecl, false);
+      cgraph_finalize_function (thunk_fndecl, true);

       /* We share the symbols in the formal argument list with other entry
         points and the master function.  Clear them so that they are
@@ -4104,7 +4104,7 @@
   /* Output the GENERIC tree.  */
   dump_function (TDI_original, ftn_main);

-  cgraph_finalize_function (ftn_main, false);
+  cgraph_finalize_function (ftn_main, true);

   if (old_context)
     {
@@ -4375,7 +4375,7 @@
        added to our parent's nested function list.  */
     (void) cgraph_node (fndecl);
   else
-    cgraph_finalize_function (fndecl, false);
+    cgraph_finalize_function (fndecl, true);

   gfc_trans_use_stmts (ns);
   gfc_traverse_ns (ns, gfc_emit_parameter_debug_info);


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40005


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