g++ 3.4 ICEs on the code below, when compiled with -O2 or above. $ g++ -c -O2 x.cc x.cc: In function `void track_match()': x.cc:22: error: in basic block 1: x.cc:22: error: flow control insn inside a basic block (call_insn:HI 69 68 195 1 (set (reg:DF %st) (call (mem:QI (symbol_ref:SI ("_Z4ext1d") [flags 0x41] <function_decl 0x400f6dec ext1>) [0 S1 A8]) (const_int 8 [0x8]))) 489 {*call_value_0} (insn_list:REG_DEP_ANTI 56 (insn_list:REG_DEP_ANTI 164 (insn_list:REG_DEP_ANTI 57 (insn_list:REG_DEP_ANTI 67 (insn_list:REG_DEP_ANTI 68 (insn_list:REG_DEP_ANTI 163 (insn_list:REG_DEP_ANTI 61 (insn_list:REG_DEP_ANTI 160 (nil))))))))) (expr_list:REG_EH_REGION (const_int 2 [0x2]) (nil)) (nil)) x.cc:22: internal compiler error: in rtl_verify_flow_info_1, at cfgrtl.c:2055 Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://gcc.gnu.org/bugs.html> for instructions. $ Environment: System: Linux karma 2.4.19-emp_2419p5a829i #1 Tue Sep 3 17:42:17 EST 2002 i686 i686 i386 GNU/Linux Architecture: i686 <machine, os, target, libraries (multiple lines)> host: i686-pc-linux-gnu build: i686-pc-linux-gnu target: i686-pc-linux-gnu configured with: ../gcc/configure --prefix=/usr/local/gcc --enable-threads=posix --enable-long-long --enable-languages=c,c++,f77 How-To-Repeat: Compile with -O2. ------------------------------------------------------------------- struct array { double data; virtual ~array(); }; double glob; double ext1(double); int nmuons; void track_match() { array vecdca; if (glob < 10) return; double p = glob*5; double phi = vecdca.data; ext1 (vecdca.data-glob); ext1 (phi*2); if (1 < p) ++nmuons; } -------------------------------------------------------------------
Fix: <how to correct or work around the problem, if known (multiple lines)>
From Phil's regression hunter: (for -mtune=pentiumpro) : Search converges between 2003-09-21-trunk (#407) and 2003-09-22-trunk (#408).
Confirmed. A regression on mainline w.r.t. 3.3.2. W.
I want to say it is related to this patch <http://gcc.gnu.org/ml/gcc-patches/2003-09/ msg01313.html> as -fno-exceptions causes GCC not to ICE.
Not a chance: there is no delay slots on x86!
This is again: 2003-09-22 Olivier Hainque <hainque@act-europe.fr> PR target/9786 * reg-stack.c (convert_regs_1): Purge possible dead eh edges after potential deletion of trapping insn. Avoids later ICE from call to fixup_abnormal_edges. (convert_regs_2): Stack the current block successors before processing this block, that is, before the potential deletion of dead edges by convert_regs_1, because these edges have been used to initialize the predecessors count. As I installed the patch, I'll investigate.
I can also reproduce it on i686-apple-darwin6.8.
I'd rather have the 'Host' field populated for my bugs because Bugzilla displays it by default instead of the 'Target' field and I want to be able to quickly differentiate SPARC problems from other problems.
The regression is latent on the 3.3 branch.
Subject: Bug 12900 CVSROOT: /cvs/gcc Module name: gcc Changes by: ebotcazou@gcc.gnu.org 2003-11-27 06:36:52 Modified files: gcc : ChangeLog reg-stack.c gcc/testsuite : ChangeLog Added files: gcc/testsuite/g++.dg/opt: reg-stack4.C Log message: PR target/12900 * reg-stack (move_for_stack_reg): New prototype. Return whether a control flow insn was deleted. (subst_stack_regs_pat): Likewise, using the information provided by move_for_stack_reg. (subst_stack_regs): Likewise, using the information provided by subst_stack_regs_pat. (convert_regs_1): Record whether a control flow insn was deleted, using the information provided by subst_stack_regs. Purge dead edges only if a control flow insn was deleted. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.1833&r2=2.1834 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/reg-stack.c.diff?cvsroot=gcc&r1=1.137&r2=1.138 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.3206&r2=1.3207 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/opt/reg-stack4.C.diff?cvsroot=gcc&r1=NONE&r2=1.1
Subject: Bug 12900 CVSROOT: /cvs/gcc Module name: gcc Branch: gcc-3_3-branch Changes by: ebotcazou@gcc.gnu.org 2003-12-01 08:10:18 Modified files: gcc : ChangeLog reg-stack.c gcc/testsuite : ChangeLog Added files: gcc/testsuite/g++.dg/opt: reg-stack4.C Log message: Backport from mainline: 2003-11-27 Eric Botcazou <ebotcazou@libertysurf.fr> PR target/12900 * reg-stack (move_for_stack_reg): New prototype. Return whether a control flow insn was deleted. (subst_stack_regs_pat): Likewise, using the information provided by move_for_stack_reg. (subst_stack_regs): Likewise, using the information provided by subst_stack_regs_pat. (convert_regs_1): Record whether a control flow insn was deleted, using the information provided by subst_stack_regs. Purge dead edges only if a control flow insn was deleted. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.16114.2.811&r2=1.16114.2.812 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/reg-stack.c.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.117.2.5&r2=1.117.2.6 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.2261.2.318&r2=1.2261.2.319 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/opt/reg-stack4.C.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=NONE&r2=1.1.2.1
See http://gcc.gnu.org/ml/gcc-patches/2003-11/msg00342.html
*** Bug 13283 has been marked as a duplicate of this bug. ***