This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/34982] [4.3 regression] calling a function with undefined parameters causes segmentation fault at -O1 or higher
- From: "rguenth at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 26 Jan 2008 19:23:47 -0000
- Subject: [Bug target/34982] [4.3 regression] calling a function with undefined parameters causes segmentation fault at -O1 or higher
- References: <bug-34982-5606@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #4 from rguenth at gcc dot gnu dot org 2008-01-26 19:23 -------
So we use the local info before it is available and thus the following will
ICE:
Index: config/i386/i386.c
===================================================================
--- config/i386/i386.c (revision 131861)
+++ config/i386/i386.c (working copy)
@@ -3199,6 +3199,7 @@ ix86_function_regparm (const_tree type,
{
/* FIXME: remove this CONST_CAST when cgraph.[ch] is constified. */
struct cgraph_local_info *i = cgraph_local_info (CONST_CAST_TREE(decl));
+ gcc_assert (cgraph_node (CONST_CAST_TREE(decl))->analyzed);
if (i && i->local)
{
int local_regparm, globals = 0, regno;
and if it is just not available (i == NULL) might give inconsistent
answers.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34982