This is the mail archive of the gcc-patches@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]

Re: Symtab cleanup 10/17 remove unnecesary DECL_ARGUMENTS and DECL_RESULT


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


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