This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/49945] [4.7 Regression] gcc.dg/guality/vla-1.c FAILs with -flto
- From: "rguenth at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 07 Dec 2011 14:59:52 +0000
- Subject: [Bug middle-end/49945] [4.7 Regression] gcc.dg/guality/vla-1.c FAILs with -flto
- Auto-submitted: auto-generated
- References: <bug-49945-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49945
--- Comment #6 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-12-07 14:59:52 UTC ---
Index: gcc/lto-streamer-out.c
===================================================================
--- gcc/lto-streamer-out.c (revision 182081)
+++ gcc/lto-streamer-out.c (working copy)
@@ -129,6 +129,19 @@ tree_is_indexable (tree t)
else if (TREE_CODE (t) == VAR_DECL && decl_function_context (t)
&& !TREE_STATIC (t))
return false;
+ else if (TYPE_P (t)
+ && variably_modified_type_p (t, NULL_TREE))
+ return false;
else
return (TYPE_P (t) || DECL_P (t) || TREE_CODE (t) == SSA_NAME);
}
fixes it.