Bug 16254 - [4.0 Regression] ICE in lower_stmt, at gimple-low.c:205
Summary: [4.0 Regression] ICE in lower_stmt, at gimple-low.c:205
Alias: None
Product: gcc
Classification: Unclassified
Component: c++ (show other bugs)
Version: 4.0.0
: P2 critical
Target Milestone: 4.0.0
Assignee: Richard Henderson
Keywords: ice-on-valid-code, monitored
: 17204 17354 (view as bug list)
Depends on:
Reported: 2004-06-29 01:23 UTC by Ferdinand
Modified: 2004-09-12 21:48 UTC (History)
6 users (show)

See Also:
Known to work: 3.4.0
Known to fail: 4.0.0
Last reconfirmed: 2004-06-29 01:56:23

Original preprocessed source (bzip2) (87.01 KB, application/x-bzip)
2004-07-06 20:10 UTC, Ferdinand

Note You need to log in before you can comment on or make changes to this bug.
Description Ferdinand 2004-06-29 01:23:06 UTC
/opt/gcc35/libexec/gcc/i686-pc-linux-gnu/3.5.0/cc1plus -fpreprocessed
nsNSSCallbacks.ii -quiet -dumpbase nsNSSCallbacks.ii -auxbase-strip
nsNSSCallbacks.o  -version -fno-rtti -fno-exceptions -o nsNSSCallbacks.s
GNU C++ version 3.5.0 20040629 (experimental) (i686-pc-linux-gnu)
        compiled by GNU C version 3.5.0 20040629 (experimental).
GGC heuristics: --param ggc-min-expand=64 --param ggc-min-heapsize=64442
 <with_cleanup_expr 0xf6f98814>nsNSSCallbacks.ii: In function `void foo(int)':
nsNSSCallbacks.ii:12: internal compiler error: in lower_stmt, at gimple-low.c:205

Configured with: ../configure --prefix=/opt/gcc35 --enable-shared
--enable-threads --enable-__cxa_atexit --enable-languages=c,c++
--enable-clocale=gnu --disable-nls --disable-checking --disable-libmudflap
Thread model: posix


struct A



int bar( const A& );

void foo(int i) {

  int format[1] = { bar( A(i) ) };


Comment 1 Andrew Pinski 2004-06-29 01:56:23 UTC
Who forgot to lower the WITH_CLEANUP_EXPR expression.
Comment 2 Ferdinand 2004-07-06 20:10:54 UTC
Created attachment 6702 [details]
Original preprocessed source (bzip2)

Since the testcase above no longer causes this ICE but the original source
does, I've attached it unreduced.

Result with command as above:
 <with_cleanup_expr 0xf5a34be0>nsNSSCallbacks.cpp: In function `char*
PK11PasswordPrompt(PK11SlotInfo*, PRBool, void*)':
nsNSSCallbacks.cpp:120: internal compiler error: in lower_stmt, at

Result with command as above but with -O2 or -Os:
 <with_cleanup_expr 0xf5b0ede8>nsNSSCallbacks.cpp: In function `void
HandshakeCallback(PRFileDesc*, void*)':
nsNSSCallbacks.cpp:201: internal compiler error: in lower_stmt, at
Comment 3 Volker Reichelt 2004-07-13 23:29:48 UTC
I still see the ICE with the small testcase.

It seems as if Richard Kenner's patch
is responsible for the regression.
Richard, could you please have a look?
Comment 4 Andrew Pinski 2004-07-17 18:31:22 UTC
: Search converges between 2004-06-27-trunk (#473) and 2004-06-28-trunk (#474).
Comment 5 Andrew Pinski 2004-08-26 20:29:59 UTC
*** Bug 17204 has been marked as a duplicate of this bug. ***
Comment 6 Andrew Pinski 2004-09-07 22:49:04 UTC
*** Bug 17354 has been marked as a duplicate of this bug. ***
Comment 7 Richard Henderson 2004-09-12 17:38:40 UTC
Looking at it.
Comment 9 CVS Commits 2004-09-12 21:40:36 UTC
Subject: Bug 16254

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	rth@gcc.gnu.org	2004-09-12 21:40:35

Added files:
	gcc/testsuite/g++.dg/eh: cleanup4.C 

Log message:
	Test case for PR 16254.


Comment 10 Richard Henderson 2004-09-12 21:48:37 UTC