From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20261 invoked by alias); 14 May 2005 11:29:46 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 19847 invoked by uid 48); 14 May 2005 11:29:07 -0000 Date: Sat, 14 May 2005 11:29:00 -0000 From: "alexander_herrmann at yahoo dot com dot au" To: gcc-bugs@gcc.gnu.org Message-ID: <20050514112901.21567.alexander_herrmann@yahoo.com.au> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug c/21567] New: Segmentation fault of the compiler when compiling X-Bugzilla-Reason: CC X-SW-Source: 2005-05/txt/msg01896.txt.bz2 List-Id: The compiler get's a segmentation fault on this one :) The compiler 4.0.0 was configurated with --enable-languages=c,c++,java --enable-shared --enable-threads=posix --with-cpu=i686 and built with make CFLAGS='-O' LIBCFLAGS='-g -O2' \ LIBCXXFLAGS='-g -O2 -fno-implicit-templates' profiledbootstrap aie_sql_meta.c: In Funktion aie_sql_meta_create_indexซ: aie_sql_meta.c:23: interner Compiler-Fehler: Segmentation fault #include #include #include // reduced Testcase // compiled with // gcc -Wall -O3 aie_sql_meta.c // Alexander J. Herrmann 13.05.2005 webmaster@aiengine.org typedef int bool; bool aie_sql_meta_create_index(void); void aie_sql_meta_get_index_def_from_id(int indexid, int *tableid, int *index_typ); int main(void) { aie_sql_meta_create_index(); return(0); } bool aie_sql_meta_create_index(void) { bool rc = 1; int tableid; // Never gets initialized int index_typ = 1; int indexid = 0; aie_sql_meta_get_index_def_from_id(indexid, &tableid, &index_typ); if (__builtin_expect(((index_typ) || (tableid <= 0)),0)) { // error variables not set but also not used rc = 0; } else { // tableid was never initialized printf("%d %d\n", tableid, index_typ); } return(rc); } void aie_sql_meta_get_index_def_from_id(int indexid, int *tableid, int *index_typ) { if (indexid == 1) { // the Good case *tableid = 1; *index_typ = 0; } else { *index_typ = 0; } } -- Summary: Segmentation fault of the compiler when compiling Product: gcc Version: 4.0.0 Status: UNCONFIRMED Severity: normal Priority: P2 Component: c AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: alexander_herrmann at yahoo dot com dot au CC: gcc-bugs at gcc dot gnu dot org GCC build triplet: i686-pc-linux GCC host triplet: i686-pc-linux GCC target triplet: i686-pc-linux http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21567