From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28683 invoked by alias); 26 Jan 2008 19:24:31 -0000 Received: (qmail 28480 invoked by uid 48); 26 Jan 2008 19:23:47 -0000 Date: Sat, 26 Jan 2008 19:36:00 -0000 Message-ID: <20080126192347.28479.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug target/34982] [4.3 regression] calling a function with undefined parameters causes segmentation fault at -O1 or higher In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "rguenth at gcc dot gnu dot org" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2008-01/txt/msg03262.txt.bz2 ------- 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