diff mbox

Symtab cleanup 10/17 remove unnecesary DECL_ARGUMENTS and DECL_RESULT

Message ID 20130902160011.GA20699@kam.mff.cuni.cz
State New
Headers show

Commit Message

Jan Hubicka Sept. 2, 2013, 4 p.m. UTC
Hi,
also to avoid the ICE in the original testcase, we do not really need the
DECL_ARGUMENTS/RESULT_DECL lists.  All we need is RESULT_DECL in the global
stream.  The following one liner fixes the testcase and all variants of my
ulitimate death testcase that did not ICE in tree from beggining of August.

Bootstrapped/regtested x86_64-linux with default, running testing on
ppc64-linux including Ada. Does this seem resonable? (though still symptomatic
in my belief)

	* lto-streamer-out.c (tree_is_indexable): RESULT_DECL/PARM_DECL of
	variably modified types are global.
diff mbox

Patch

Index: lto-streamer-out.c
===================================================================
--- lto-streamer-out.c	(revision 202161)
+++ lto-streamer-out.c	(working copy)
@@ -124,8 +124,11 @@  output_type_ref (struct output_block *ob
 static bool
 tree_is_indexable (tree t)
 {
+  /* Parameters and return values of functions of variably modified types
+     must go to global stream, because they may be used in the type
+     definition.  */
   if (TREE_CODE (t) == PARM_DECL || TREE_CODE (t) == RESULT_DECL)
-    return false;
+    return variably_modified_type_p (TREE_TYPE (DECL_CONTEXT (t)), NULL_TREE);
   else if (TREE_CODE (t) == VAR_DECL && decl_function_context (t)
 	   && !TREE_STATIC (t))
     return false;