First Last Prev Next    No search results available      Search page      Enter new bug
Bug#: 13392
Product:  
Component:  
Status: RESOLVED
Resolution: FIXED
Assigned To: Not yet assigned to anyone <unassigned@gcc.gnu.org>
Host:
Reported against  
Priority:  
Severity:  
Target Milestone:  
 
 
Target:
Reporter: Benjamin Kosnik <bkoz@gcc.gnu.org>
Add CC:
CC:
Remove selected CCs
Build:
URL:
Summary:
Keywords:
Known to work:
Known to fail:

Attachment Description Type Created Size Actions
CommandLine.ii.bz2 pre-processed file from LLVM cvs application/x-tar 2003-12-13 01:40 100.50 KB Edit
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 13392 depends on: Show dependency tree
Show dependency graph
Bug 13392 blocks:

Additional Comments:






View Bug Activity   |   Format For Printing   |   Clone This Bug


Description:   Last confirmed: 2003-12-15 09:14 Opened: 2003-12-13 01:39
Trying to build LLVM with current mainline g++ fails. Interestingly, it only
fails at -O0, but at -O2 it works. Strange. 

%COMP.sh "--version"
g++ (GCC) 3.4 20031208 (experimental)

%COMP.sh "-c -O0" CommandLine.ii
/mnt/hd/src/llvm/lib/Support/CommandLine.cpp: In function `void
llvm::RemoveArgument(const char*, llvm::cl::Option*)':
/mnt/hd/src/llvm/lib/Support/CommandLine.cpp:77: internal compiler error: in
convert_from_eh_region_ranges_1, at except.c:1133
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.

vs.


<bkoz@roscoe> /home/bkoz %COMP.sh "-c -O2" CommandLine.ii
g++: -lv3test: linker input file unused because linking not done

------- Comment #1 From Benjamin Kosnik 2003-12-13 01:40 -------
Created an attachment (id=5325) [edit]
pre-processed file from LLVM cvs

------- Comment #2 From Wolfgang Bangerth 2003-12-15 09:14 -------
Confirmed. A regression in 3.3 and mainline from 3.2.3. Here is 
something smaller: 
---------------------- 
#include <string> 
 
bool foo(std::string s = std::string()) { 
  return false; 
} 
 
void RemoveArgument() { 
  (__builtin_expect (foo() && true, 1) ? 0 : (abort(), 0)); 
} 
---------------------- 
 
g/x> /home/bangerth/bin/gcc-3.4-pre/bin/c++ -c x.cc 
x.cc: In function `void RemoveArgument()': 
x.cc:9: internal compiler error: in convert_from_eh_region_ranges_1, at 
except.c:1133 
Please submit a full bug report, 
with preprocessed source if appropriate. 
See <URL:http://gcc.gnu.org/bugs.html> for instructions. 
g/x>  
g/x>  
g/x>  
g/x>  
g/x> /home/bangerth/bin/gcc-3.3.3-pre/bin/c++ -c x.cc 
x.cc: In function `void RemoveArgument()': 
x.cc:9: internal compiler error: in convert_from_eh_region_ranges_1, at  
   except.c:1159 
Please submit a full bug report, 
with preprocessed source if appropriate. 
See <URL:http://gcc.gnu.org/bugs.html> for instructions. 
 
I'll work on something self-contained. 
 
W. 

------- Comment #3 From Wolfgang Bangerth 2003-12-15 09:22 -------
So here we go: 
--------------------- 
extern void abort (void) throw () __attribute__ ((__noreturn__)); 
 
struct X { 
    ~X () throw() {} 
}; 
 
bool foo(X s = X()) { return false; } 
 
void bar() { 
  (__builtin_expect (foo() && true, 1) ? 0 : (abort(), 0)); 
} 
----------------------------- 
 
g/x> /home/bangerth/bin/gcc-3.4-pre/bin/c++ -c x.cc 
x.cc: In function `void bar()': 
x.cc:11: internal compiler error: in convert_from_eh_region_ranges_1, at 
except.c:1133 
Please submit a full bug report, 
 

------- Comment #4 From Benjamin Kosnik 2003-12-15 16:14 -------
Subject: Re:  ICE in convert_from_eh_region_ranges_1, at
 except.c:1133


>Confirmed. A regression in 3.3 and mainline from 3.2.3. Here is 
>something smaller: 
>---------------------- 
>#include <string> 
> 
>bool foo(std::string s = std::string()) { 
>  return false; 
>} 
> 
>void RemoveArgument() { 
>  (__builtin_expect (foo() && true, 1) ? 0 : (abort(), 0)); 
>} 
>---------------------- 

Wow, this reduction is pretty impressive. You went from 856k to 5 lines! Awesome. 

-benjamin

------- Comment #5 From Wolfgang Bangerth 2003-12-15 17:22 -------
:-) And this one was even one of the simpler ones and took me less than 10 
minutes. I've learned to find the cut-points in the string headers 
quickly, and what patterns eh-related bugs follow w.r.t. string and 
allocator classes. A year ago, this would have been a testcase I would 
have dreaded, and which would have taken me one or two hours to reduce. 
The pattern-matching powers of the human brain are impressive ;-) 
 
W. 

------- Comment #6 From Andrew Pinski 2003-12-16 16:32 -------
From Phil's regression hunter: Search converges between 2003-03-23-trunk (#253)
and 2003-03
-30-trunk (#254).
: Search converges between 2003-03-23-3.3 (#85) and 2003-03-30-3.3 (#86).

------- Comment #7 From janis187@us.ibm.com 2003-12-22 23:08 -------
The regression in PR 13392 was introduced or exposed with this patch:

2003-03-24  Jakub Jelinek  <jakub@redhat.com>

        * dojump.c (do_jump): Handle UNSAVE_EXPR specially.

The regression hunt took place on i686-pc-linux-gnu using the minimized
test case from comment #3 compiled with default options, starting with
the range identified by Phil's regression hunter.

------- Comment #8 From Andrew Pinski 2003-12-22 23:30 -------
This is Execption handling related (yes the ICE is eh also but if I compile the
self-containted 
example with -fno-exceptions, it compiles just fine).

------- Comment #9 From Jakub Jelinek 2004-01-02 14:19 -------
http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02330.html

------- Comment #10 From CVS Commits 2004-01-11 19:05 -------
Subject: Bug 13392

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	jakub@gcc.gnu.org	2004-01-11 19:05:34

Modified files:
	gcc            : ChangeLog builtins.c 
	gcc/testsuite  : ChangeLog 
Added files:
	gcc/testsuite/g++.dg/opt: expect2.C 

Log message:
	PR middle-end/13392
	* builtins.c (expand_builtin_expect_jump): Handle conditional jumps
	to drop through label.  Don't fall back to SCC even when conditional
	jump has not been found.
	
	* g++.dg/opt/expect2.C: New test.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.2224&r2=2.2225
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/builtins.c.diff?cvsroot=gcc&r1=1.270&r2=1.271
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.3359&r2=1.3360
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/opt/expect2.C.diff?cvsroot=gcc&r1=NONE&r2=1.1


------- Comment #11 From CVS Commits 2004-01-11 19:13 -------
Subject: Bug 13392

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	gcc-3_3-branch
Changes by:	jakub@gcc.gnu.org	2004-01-11 19:13:13

Modified files:
	gcc            : ChangeLog builtins.c 
	gcc/testsuite  : ChangeLog 
Added files:
	gcc/testsuite/g++.dg/opt: expect2.C 

Log message:
	PR middle-end/13392
	* builtins.c (expand_builtin_expect_jump): Handle conditional jumps
	to drop through label.  Don't fall back to SCC even when conditional
	jump has not been found.
	
	* g++.dg/opt/expect2.C: New test.

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.872&r2=1.16114.2.873
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/builtins.c.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.165.2.9&r2=1.165.2.10
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.351&r2=1.2261.2.352
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/opt/expect2.C.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=NONE&r2=1.1.2.1


------- Comment #12 From Andrew Pinski 2004-01-11 19:34 -------
Fixed for 3.3.3.

------- Comment #13 From CVS Commits 2004-02-28 11:16 -------
Subject: Bug 13392

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	gcc-3_2-rhl8-branch
Changes by:	jakub@gcc.gnu.org	2004-02-28 11:16:07

Modified files:
	gcc            : ChangeLog builtins.c 
	gcc/testsuite  : ChangeLog 
Added files:
	gcc/testsuite/g++.dg/opt: expect2.C 

Log message:
	PR middle-end/13392
	* builtins.c (expand_builtin_expect_jump): Handle conditional jumps
	to drop through label.  Don't fall back to SCC even when conditional
	jump has not been found.
	
	* g++.dg/opt/expect2.C: New test.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_2-rhl8-branch&r1=1.13152.2.657.2.27.2.182&r2=1.13152.2.657.2.27.2.183
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/builtins.c.diff?cvsroot=gcc&only_with_tag=gcc-3_2-rhl8-branch&r1=1.142.2.2.8.14&r2=1.142.2.2.8.15
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_2-rhl8-branch&r1=1.1672.2.166.2.8.2.76&r2=1.1672.2.166.2.8.2.77
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/opt/expect2.C.diff?cvsroot=gcc&only_with_tag=gcc-3_2-rhl8-branch&r1=NONE&r2=1.1.20.1


First Last Prev Next    No search results available      Search page      Enter new bug