Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug
Bug#: 15068
Product:  
Component:  
Status: RESOLVED
Resolution: FIXED
Assigned To: Richard Earnshaw <rearnsha@gcc.gnu.org>
Host:
Reported against  
Priority:  
Severity:  
Target Milestone:  
 
 
Target:
Reporter: Philip Blundell <pb@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
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 15068 depends on: Show dependency tree
Show dependency graph
Bug 15068 blocks: 16624

Additional Comments:






View Bug Activity   |   Format For Printing   |   Clone This Bug


Description:   Last confirmed: 2004-05-01 01:04 Opened: 2004-04-22 10:20
This code:

$ cat s_fmax.i
double
__fmax (double x, double y)
{
  return (__builtin_isgreaterequal(x, y) || (sizeof (y) == sizeof (float) ? 
__isnanf (y) : __isnan (y))) ? x : y;
}

crashes an arm-linux compiler when invoked as:

$ ./cc1 -O2 ~/s_fmax.i
 __fmax
 
Analyzing compilation unit
Performing intraprocedural optimizations
Assembling functions:
 __fmax
 
/home/pblundel/s_fmax.i: In function `__fmax':
/home/pblundel/s_fmax.i:5: internal compiler error: in elim_reg_cond, at 
flow.c:3257
Please submit a full bug report,
with preprocessed source if appropriate.
Send email to arm-gcc@codesourcery.com for instructions.

------- Comment #1 From Philip Blundell 2004-04-22 10:42 -------
This bug exists in the 3.3 branch (and the trunk) as well as the 3.4 branch.

------- Comment #2 From Dara Hazeghi 2004-05-01 01:04 -------
Confirmed (on 3.4 branch).

------- Comment #3 From Richard Earnshaw 2004-05-16 22:28 -------
*** Bug 15297 has been marked as a duplicate of this bug. ***

------- Comment #4 From Brett Neumeier 2004-07-21 01:38 -------
I have had the same problem with GCC 3.2.3 (as well as 3.3.3 and 3.4.0),
building a native arm compiler.

I don't know anything substantial about GCC internals, so please excuse if this
comment is totally worthless...but:

In a cursory look at elim_reg_cond, it looked to me as though the function was
encountering an unexpected rtx code.  So I checked, and found that when the ICE
is encountered it's because elim_reg_cond is called with an rtx with code 0
(UNKNOWN).

So in an effort to work around the problem, I modified elim_reg_cond so that
instead of calling abort() it simply returns the original rtx, and as far as I
can tell that does seem to work. (At least, when I ran the test suites for the
glibc I built with this workaround, the tests for the relevant functions all
passed.)

------- Comment #5 From Richard Earnshaw 2004-07-21 10:20 -------
Subject: Re:  ICE in elim_reg_cond

On Wed, 2004-07-21 at 02:38, random at rnd dot cx wrote:

> So in an effort to work around the problem, I modified elim_reg_cond so that
> instead of calling abort() it simply returns the original rtx, and as far as I
> can tell that does seem to work. 
No, that's incorrect.

R.

------- Comment #6 From CVS Commits 2004-08-02 13:19 -------
Subject: Bug 15068

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	pbrook@gcc.gnu.org	2004-08-02 13:19:41

Modified files:
	gcc            : ChangeLog flow.c 

Log message:
	PR rtl-optimization/15068
	* flow.c (init_propagate_block_info): Check condition is reversible.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.4763&r2=2.4764
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/flow.c.diff?cvsroot=gcc&r1=1.593&r2=1.594


------- Comment #7 From CVS Commits 2004-08-02 13:57 -------
Subject: Bug 15068

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	csl-arm-branch
Changes by:	pbrook@gcc.gnu.org	2004-08-02 13:57:06

Modified files:
	gcc            : ChangeLog flow.c 

Log message:
	PR rtl-optimization/15068
	* flow.c (init_propagate_block_info): Check condition is reversible.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&only_with_tag=csl-arm-branch&r1=2.1568.2.81&r2=2.1568.2.82
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/flow.c.diff?cvsroot=gcc&only_with_tag=csl-arm-branch&r1=1.563.4.2&r2=1.563.4.3


------- Comment #8 From Andrew Pinski 2004-08-02 16:52 -------
Fixed in 3.5.0.

------- Comment #9 From Andrew Pinski 2005-02-21 23:17 -------
*** Bug 20129 has been marked as a duplicate of this bug. ***

------- Comment #10 From Andrew Pinski 2005-05-22 18:47 -------
*** Bug 21710 has been marked as a duplicate of this bug. ***

------- Comment #11 From Xu Guangyi 2005-06-15 14:59 -------
(In reply to comment #10)
> *** Bug 21710 has been marked as a duplicate of this bug. ***


Is there any patch of it for gcc-3.3.6.



------- Comment #12 From Richard Earnshaw 2005-06-15 15:05 -------
Subject: Re:  ICE in elim_reg_cond

On Wed, 2005-06-15 at 15:59, xuguangyi at ee dot buaa dot edu dot cn
wrote:
> ------- Additional Comments From xuguangyi at ee dot buaa dot edu dot cn  2005-06-15 14:59 -------
> (In reply to comment #10)
> > *** Bug 21710 has been marked as a duplicate of this bug. ***
> 
> 
> Is there any patch of it for gcc-3.3.6.
> 

No.  The code that was fixed was not in gcc-3.3.

R.

------- Comment #13 From Jonathan S. Shapiro 2006-04-02 06:48 -------
Any patch for gcc-3.4.6?

------- Comment #14 From Andrew Pinski 2006-04-02 06:52 -------
(In reply to comment #13)
> Any patch for gcc-3.4.6?

No, just use 4.1.0 or 4.0.2 instead.

------- Comment #15 From Mikael Pettersson 2006-04-02 09:05 -------
(In reply to comment #13)
> Any patch for gcc-3.4.6?
> 

Yes, use the patch shown earlier in this thread,
or the equivalent one provided by crosstool.

Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug