public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug rtl-optimization/32293] New: [4.3 Regression] internal compiler error: in do_SUBST, at combine.c:502
@ 2007-06-11 21:39 hjl at lucon dot org
2007-06-11 21:40 ` [Bug rtl-optimization/32293] " hjl at lucon dot org
` (14 more replies)
0 siblings, 15 replies; 16+ messages in thread
From: hjl at lucon dot org @ 2007-06-11 21:39 UTC (permalink / raw)
To: gcc-bugs
When I was building libbid on Linux/Intel64, I got ICE. Gcc 4.2 is OK.
--
Summary: [4.3 Regression] internal compiler error: in do_SUBST,
at combine.c:502
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: rtl-optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: hjl at lucon dot org
GCC target triplet: x86_64-unknown-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32293
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug rtl-optimization/32293] [4.3 Regression] internal compiler error: in do_SUBST, at combine.c:502
2007-06-11 21:39 [Bug rtl-optimization/32293] New: [4.3 Regression] internal compiler error: in do_SUBST, at combine.c:502 hjl at lucon dot org
@ 2007-06-11 21:40 ` hjl at lucon dot org
2007-06-11 21:43 ` pinskia at gcc dot gnu dot org
` (13 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: hjl at lucon dot org @ 2007-06-11 21:40 UTC (permalink / raw)
To: gcc-bugs
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 965 bytes --]
------- Comment #1 from hjl at lucon dot org 2007-06-11 21:39 -------
Created an attachment (id=13683)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=13683&action=view)
A testcase
[hjl@gnu-2 gcc]$ ./xgcc --version
xgcc (GCC) 4.3.0 20070611 (experimental) [trunk revision 125618]
Copyright (C) 2007 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
[hjl@gnu-2 gcc]$ ./xgcc -O2 -B./ -c /tmp/x.i
/export/gnu/src/gcc-dfp/gcc/libgcc/../libbid/bid32_to_bid128.c: In function
bid128_to_bid32:
/export/gnu/src/gcc-dfp/gcc/libgcc/../libbid/bid32_to_bid128.c:228: internal
compiler error: in do_SUBST, at combine.c:502
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
[hjl@gnu-2 gcc]$
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32293
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug rtl-optimization/32293] [4.3 Regression] internal compiler error: in do_SUBST, at combine.c:502
2007-06-11 21:39 [Bug rtl-optimization/32293] New: [4.3 Regression] internal compiler error: in do_SUBST, at combine.c:502 hjl at lucon dot org
2007-06-11 21:40 ` [Bug rtl-optimization/32293] " hjl at lucon dot org
@ 2007-06-11 21:43 ` pinskia at gcc dot gnu dot org
2007-06-11 21:44 ` pinskia at gcc dot gnu dot org
` (12 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-06-11 21:43 UTC (permalink / raw)
To: gcc-bugs
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |ice-on-valid-code
Target Milestone|--- |4.3.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32293
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug rtl-optimization/32293] [4.3 Regression] internal compiler error: in do_SUBST, at combine.c:502
2007-06-11 21:39 [Bug rtl-optimization/32293] New: [4.3 Regression] internal compiler error: in do_SUBST, at combine.c:502 hjl at lucon dot org
2007-06-11 21:40 ` [Bug rtl-optimization/32293] " hjl at lucon dot org
2007-06-11 21:43 ` pinskia at gcc dot gnu dot org
@ 2007-06-11 21:44 ` pinskia at gcc dot gnu dot org
2007-06-11 22:05 ` hjl at lucon dot org
` (11 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-06-11 21:44 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from pinskia at gcc dot gnu dot org 2007-06-11 21:43 -------
This works for powerpc64-linux-gnu.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32293
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug rtl-optimization/32293] [4.3 Regression] internal compiler error: in do_SUBST, at combine.c:502
2007-06-11 21:39 [Bug rtl-optimization/32293] New: [4.3 Regression] internal compiler error: in do_SUBST, at combine.c:502 hjl at lucon dot org
` (2 preceding siblings ...)
2007-06-11 21:44 ` pinskia at gcc dot gnu dot org
@ 2007-06-11 22:05 ` hjl at lucon dot org
2007-06-11 22:06 ` pinskia at gcc dot gnu dot org
` (10 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: hjl at lucon dot org @ 2007-06-11 22:05 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from hjl at lucon dot org 2007-06-11 22:05 -------
Revision 123081 is good and revision 123304 is bad.
--
hjl at lucon dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|4.3.0 |---
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32293
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug rtl-optimization/32293] [4.3 Regression] internal compiler error: in do_SUBST, at combine.c:502
2007-06-11 21:39 [Bug rtl-optimization/32293] New: [4.3 Regression] internal compiler error: in do_SUBST, at combine.c:502 hjl at lucon dot org
` (3 preceding siblings ...)
2007-06-11 22:05 ` hjl at lucon dot org
@ 2007-06-11 22:06 ` pinskia at gcc dot gnu dot org
2007-06-11 22:38 ` hjl at lucon dot org
` (9 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-06-11 22:06 UTC (permalink / raw)
To: gcc-bugs
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |4.3.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32293
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug rtl-optimization/32293] [4.3 Regression] internal compiler error: in do_SUBST, at combine.c:502
2007-06-11 21:39 [Bug rtl-optimization/32293] New: [4.3 Regression] internal compiler error: in do_SUBST, at combine.c:502 hjl at lucon dot org
` (4 preceding siblings ...)
2007-06-11 22:06 ` pinskia at gcc dot gnu dot org
@ 2007-06-11 22:38 ` hjl at lucon dot org
2007-06-11 22:41 ` pinskia at gcc dot gnu dot org
` (8 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: hjl at lucon dot org @ 2007-06-11 22:38 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from hjl at lucon dot org 2007-06-11 22:38 -------
Revision 123178 is good and revision 123254 is bad.
--
hjl at lucon dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|4.3.0 |---
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32293
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug rtl-optimization/32293] [4.3 Regression] internal compiler error: in do_SUBST, at combine.c:502
2007-06-11 21:39 [Bug rtl-optimization/32293] New: [4.3 Regression] internal compiler error: in do_SUBST, at combine.c:502 hjl at lucon dot org
` (5 preceding siblings ...)
2007-06-11 22:38 ` hjl at lucon dot org
@ 2007-06-11 22:41 ` pinskia at gcc dot gnu dot org
2007-06-11 22:49 ` hjl at lucon dot org
` (7 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-06-11 22:41 UTC (permalink / raw)
To: gcc-bugs
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |4.3.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32293
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug rtl-optimization/32293] [4.3 Regression] internal compiler error: in do_SUBST, at combine.c:502
2007-06-11 21:39 [Bug rtl-optimization/32293] New: [4.3 Regression] internal compiler error: in do_SUBST, at combine.c:502 hjl at lucon dot org
` (6 preceding siblings ...)
2007-06-11 22:41 ` pinskia at gcc dot gnu dot org
@ 2007-06-11 22:49 ` hjl at lucon dot org
2007-06-11 22:51 ` pinskia at gcc dot gnu dot org
` (6 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: hjl at lucon dot org @ 2007-06-11 22:49 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from hjl at lucon dot org 2007-06-11 22:49 -------
Revision 123214 is good and revision 123223 is bad.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32293
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug rtl-optimization/32293] [4.3 Regression] internal compiler error: in do_SUBST, at combine.c:502
2007-06-11 21:39 [Bug rtl-optimization/32293] New: [4.3 Regression] internal compiler error: in do_SUBST, at combine.c:502 hjl at lucon dot org
` (7 preceding siblings ...)
2007-06-11 22:49 ` hjl at lucon dot org
@ 2007-06-11 22:51 ` pinskia at gcc dot gnu dot org
2007-06-11 22:56 ` hjl at lucon dot org
` (5 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-06-11 22:51 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from pinskia at gcc dot gnu dot org 2007-06-11 22:51 -------
I am thinking it was Steven's patch, though most likely just exposed a latent
bug somewhere else.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32293
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug rtl-optimization/32293] [4.3 Regression] internal compiler error: in do_SUBST, at combine.c:502
2007-06-11 21:39 [Bug rtl-optimization/32293] New: [4.3 Regression] internal compiler error: in do_SUBST, at combine.c:502 hjl at lucon dot org
` (8 preceding siblings ...)
2007-06-11 22:51 ` pinskia at gcc dot gnu dot org
@ 2007-06-11 22:56 ` hjl at lucon dot org
2007-06-12 3:03 ` hjl at lucon dot org
` (4 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: hjl at lucon dot org @ 2007-06-11 22:56 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from hjl at lucon dot org 2007-06-11 22:56 -------
I have verified that this patch
http://gcc.gnu.org/ml/gcc-patches/2007-03/msg01634.html
causes this regression.
--
hjl at lucon dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |steven at gcc dot gnu dot
| |org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32293
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug rtl-optimization/32293] [4.3 Regression] internal compiler error: in do_SUBST, at combine.c:502
2007-06-11 21:39 [Bug rtl-optimization/32293] New: [4.3 Regression] internal compiler error: in do_SUBST, at combine.c:502 hjl at lucon dot org
` (9 preceding siblings ...)
2007-06-11 22:56 ` hjl at lucon dot org
@ 2007-06-12 3:03 ` hjl at lucon dot org
2007-06-12 7:01 ` ubizjak at gmail dot com
` (3 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: hjl at lucon dot org @ 2007-06-12 3:03 UTC (permalink / raw)
To: gcc-bugs
------- Comment #8 from hjl at lucon dot org 2007-06-12 03:03 -------
Here is the reduced testcase:
---
unsigned int _IDEC_glbround;
unsigned int _IDEC_glbflags;
typedef unsigned UINT32;
typedef signed SINT32;
typedef unsigned long long UINT64;
typedef signed long long SINT64;
typedef
__attribute__ ((aligned(16)))
struct {
UINT64 w[2];
} UINT128;
static __inline UINT64
unpack_BID128 (UINT64 * psign_x, int *pexponent_x,
UINT128 * pcoefficient_x, UINT128 * px) {
UINT128 coeff;
UINT64 ex;
*psign_x = (px->w[1]) & 0x8000000000000000ull;
ex = (px->w[1]) >> 49;
*pexponent_x = ((int) ex) & 0x3fff;
return coeff.w[0] | coeff.w[1];
}
static __inline UINT32
get_BID32 (UINT32 sgn, int expon, UINT64 coeff, int rmode,
unsigned *fpsc) {
UINT32 r;
if (((unsigned) expon) > 191) {
r = sgn | 0x78000000ul;
switch (rmode) {
case 0x00002:
if (sgn)
r = sgn | 0x77f8967f;
}
return r;
}
r = expon;
return r;
}
UINT32
bid128_to_bid32 (UINT128 x)
{
UINT128 *px;
UINT128 CX;
UINT64 sign_x;
UINT32 res;
int exponent_x = 0;
px = &x;
if (!unpack_BID128 (&sign_x, &exponent_x, &CX, px)) {
return(res);
}
res = get_BID32 ((UINT32) (sign_x >> 32),
exponent_x, CX.w[0], _IDEC_glbround, &_IDEC_glbflags);
return(res);;
}
---
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32293
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug rtl-optimization/32293] [4.3 Regression] internal compiler error: in do_SUBST, at combine.c:502
2007-06-11 21:39 [Bug rtl-optimization/32293] New: [4.3 Regression] internal compiler error: in do_SUBST, at combine.c:502 hjl at lucon dot org
` (10 preceding siblings ...)
2007-06-12 3:03 ` hjl at lucon dot org
@ 2007-06-12 7:01 ` ubizjak at gmail dot com
2007-06-12 8:26 ` ubizjak at gmail dot com
` (2 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: ubizjak at gmail dot com @ 2007-06-12 7:01 UTC (permalink / raw)
To: gcc-bugs
------- Comment #9 from ubizjak at gmail dot com 2007-06-12 07:01 -------
Following patch should fix the ICE:
Index: combine.c
===================================================================
--- combine.c (revision 125636)
+++ combine.c (working copy)
@@ -5210,11 +5210,17 @@ simplify_if_then_else (rtx x)
if (true_code == EQ && true_val == const0_rtx
&& exact_log2 (nzb = nonzero_bits (from, GET_MODE (from))) >= 0)
- false_code = EQ, false_val = GEN_INT (nzb);
+ {
+ false_code = EQ;
+ false_val = GEN_INT (trunc_int_for_mode (nzb, GET_MODE (from)));
+ }
else if (true_code == EQ && true_val == const0_rtx
&& (num_sign_bit_copies (from, GET_MODE (from))
== GET_MODE_BITSIZE (GET_MODE (from))))
- false_code = EQ, false_val = constm1_rtx;
+ {
+ false_code = EQ;
+ false_val = constm1_rtx;
+ }
/* Now simplify an arm if we know the value of the register in the
branch and it is used in the arm. Be careful due to the potential
--
ubizjak at gmail dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |ubizjak at gmail dot com
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2007-06-12 07:01:32
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32293
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug rtl-optimization/32293] [4.3 Regression] internal compiler error: in do_SUBST, at combine.c:502
2007-06-11 21:39 [Bug rtl-optimization/32293] New: [4.3 Regression] internal compiler error: in do_SUBST, at combine.c:502 hjl at lucon dot org
` (11 preceding siblings ...)
2007-06-12 7:01 ` ubizjak at gmail dot com
@ 2007-06-12 8:26 ` ubizjak at gmail dot com
2007-06-12 10:31 ` uros at gcc dot gnu dot org
2007-06-12 11:31 ` rguenth at gcc dot gnu dot org
14 siblings, 0 replies; 16+ messages in thread
From: ubizjak at gmail dot com @ 2007-06-12 8:26 UTC (permalink / raw)
To: gcc-bugs
------- Comment #10 from ubizjak at gmail dot com 2007-06-12 08:26 -------
Patch at http://gcc.gnu.org/ml/gcc-patches/2007-06/msg00759.html
--
ubizjak at gmail dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |ubizjak at gmail dot com
|dot org |
URL| |http://gcc.gnu.org/ml/gcc-
| |patches/2007-
| |06/msg00759.html
Status|NEW |ASSIGNED
Keywords| |patch
Last reconfirmed|2007-06-12 07:01:32 |2007-06-12 08:26:03
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32293
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug rtl-optimization/32293] [4.3 Regression] internal compiler error: in do_SUBST, at combine.c:502
2007-06-11 21:39 [Bug rtl-optimization/32293] New: [4.3 Regression] internal compiler error: in do_SUBST, at combine.c:502 hjl at lucon dot org
` (12 preceding siblings ...)
2007-06-12 8:26 ` ubizjak at gmail dot com
@ 2007-06-12 10:31 ` uros at gcc dot gnu dot org
2007-06-12 11:31 ` rguenth at gcc dot gnu dot org
14 siblings, 0 replies; 16+ messages in thread
From: uros at gcc dot gnu dot org @ 2007-06-12 10:31 UTC (permalink / raw)
To: gcc-bugs
------- Comment #11 from uros at gcc dot gnu dot org 2007-06-12 10:31 -------
Subject: Bug 32293
Author: uros
Date: Tue Jun 12 10:31:04 2007
New Revision: 125643
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=125643
Log:
PR rtl-optimization/32293
* combine.c (simplify_if_then_else): Truncate return from
nonzero_bits() to correct mode.
testsuite/ChangeLog:
PR rtl-optimization/32293
* gcc.dg/pr32293.c: New test.
Added:
trunk/gcc/testsuite/gcc.dg/pr32293.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/combine.c
trunk/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32293
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug rtl-optimization/32293] [4.3 Regression] internal compiler error: in do_SUBST, at combine.c:502
2007-06-11 21:39 [Bug rtl-optimization/32293] New: [4.3 Regression] internal compiler error: in do_SUBST, at combine.c:502 hjl at lucon dot org
` (13 preceding siblings ...)
2007-06-12 10:31 ` uros at gcc dot gnu dot org
@ 2007-06-12 11:31 ` rguenth at gcc dot gnu dot org
14 siblings, 0 replies; 16+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2007-06-12 11:31 UTC (permalink / raw)
To: gcc-bugs
------- Comment #12 from rguenth at gcc dot gnu dot org 2007-06-12 11:31 -------
Fixed.
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32293
^ permalink raw reply [flat|nested] 16+ messages in thread
end of thread, other threads:[~2007-06-12 11:31 UTC | newest]
Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-06-11 21:39 [Bug rtl-optimization/32293] New: [4.3 Regression] internal compiler error: in do_SUBST, at combine.c:502 hjl at lucon dot org
2007-06-11 21:40 ` [Bug rtl-optimization/32293] " hjl at lucon dot org
2007-06-11 21:43 ` pinskia at gcc dot gnu dot org
2007-06-11 21:44 ` pinskia at gcc dot gnu dot org
2007-06-11 22:05 ` hjl at lucon dot org
2007-06-11 22:06 ` pinskia at gcc dot gnu dot org
2007-06-11 22:38 ` hjl at lucon dot org
2007-06-11 22:41 ` pinskia at gcc dot gnu dot org
2007-06-11 22:49 ` hjl at lucon dot org
2007-06-11 22:51 ` pinskia at gcc dot gnu dot org
2007-06-11 22:56 ` hjl at lucon dot org
2007-06-12 3:03 ` hjl at lucon dot org
2007-06-12 7:01 ` ubizjak at gmail dot com
2007-06-12 8:26 ` ubizjak at gmail dot com
2007-06-12 10:31 ` uros at gcc dot gnu dot org
2007-06-12 11:31 ` rguenth at gcc dot gnu dot org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).