public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/39588] New: internal compiler error: in trunc_int_for_mode, at explow.c:55
@ 2009-03-30 13:29 olivier dot roussel at cril dot univ-artois dot fr
2009-03-30 13:48 ` [Bug c/39588] " olivier dot roussel at cril dot univ-artois dot fr
` (7 more replies)
0 siblings, 8 replies; 9+ messages in thread
From: olivier dot roussel at cril dot univ-artois dot fr @ 2009-03-30 13:29 UTC (permalink / raw)
To: gcc-bugs
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1448 bytes --]
# gcc -v
Using built-in specs.
Target: x86_64-unknown-linux-gnu
Configured with: ../gcc-4.3.3/configure --prefix=/tmp/gcc433
--enable-languages=c,c++
Thread model: posix
gcc version 4.3.3 (GCC)
with the following, self-contained file buc.c
#define lit_from_int(in) ((in<0)?(((-in)<<1)|1):(in<<1))
void init_clause(int* literals,int size, int *lits)
{
int i;
for(i=0; i < size; i++) {
lits[i] = lit_from_int(literals[i]);
}
}
On a x86_64 host, both gcc 4.3.1 (handmade compilation), gcc 4.3.2 (Fedora Core
10 package) and gcc 4.3.3 (handmade compilation) crash with -O3 optimization
# gcc -O3 -c bug.c
bug.c: In function init_clause:
bug.c:10: internal compiler error: in trunc_int_for_mode, at explow.c:55
This bug doesn't occur on a i686 host (gcc 4.3.2). On a x86_64 host, it doesn't
occur when -O2 is used with gcc 4.3.3 or when gcc 4.2.4 is used.
--
Summary: internal compiler error: in trunc_int_for_mode, at
explow.c:55
Product: gcc
Version: 4.3.3
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: olivier dot roussel at cril dot univ-artois dot fr
GCC build triplet: x86_64-unknown-linux-gnu
GCC host triplet: x86_64-unknown-linux-gnu
GCC target triplet: x86_64-unknown-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39588
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c/39588] internal compiler error: in trunc_int_for_mode, at explow.c:55
2009-03-30 13:29 [Bug c/39588] New: internal compiler error: in trunc_int_for_mode, at explow.c:55 olivier dot roussel at cril dot univ-artois dot fr
@ 2009-03-30 13:48 ` olivier dot roussel at cril dot univ-artois dot fr
2009-03-30 14:24 ` [Bug rtl-optimization/39588] [4.3/4.4/4.5 Regression] " rguenth at gcc dot gnu dot org
` (6 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: olivier dot roussel at cril dot univ-artois dot fr @ 2009-03-30 13:48 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from olivier dot roussel at cril dot univ-artois dot fr 2009-03-30 13:48 -------
Created an attachment (id=17558)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=17558&action=view)
test source file
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39588
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug rtl-optimization/39588] [4.3/4.4/4.5 Regression] internal compiler error: in trunc_int_for_mode, at explow.c:55
2009-03-30 13:29 [Bug c/39588] New: internal compiler error: in trunc_int_for_mode, at explow.c:55 olivier dot roussel at cril dot univ-artois dot fr
2009-03-30 13:48 ` [Bug c/39588] " olivier dot roussel at cril dot univ-artois dot fr
@ 2009-03-30 14:24 ` rguenth at gcc dot gnu dot org
2009-03-30 14:56 ` rguenth at gcc dot gnu dot org
` (5 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2009-03-30 14:24 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from rguenth at gcc dot gnu dot org 2009-03-30 14:24 -------
Confirmed. -ftree-vectorize is the problem or maybe triggers a target problem.
#1 0x0000000000605517 in trunc_int_for_mode (c=0, mode=V4SImode)
at /space/rguenther/src/svn/trunk/gcc/explow.c:56
56 gcc_assert (SCALAR_INT_MODE_P (mode));
#1 0x0000000000605517 in trunc_int_for_mode (c=0, mode=V4SImode)
at /space/rguenther/src/svn/trunk/gcc/explow.c:56
#2 0x0000000000e481a3 in merge_outer_ops (pop0=0x7fffffffd228,
pconst0=0x7fffffffd220, op1=NEG, const1=0, mode=V4SImode,
pcomp_p=0x7fffffffd21c)
at /space/rguenther/src/svn/trunk/gcc/combine.c:8962
#3 0x0000000000e494f5 in simplify_shift_const_1 (code=ASHIFT,
result_mode=V4SImode, varop=0x7ffff61a9850, orig_count=1)
at /space/rguenther/src/svn/trunk/gcc/combine.c:9486
#4 0x0000000000e49dfb in simplify_shift_const (x=0x7ffff61a25c0, code=ASHIFT,
result_mode=V4SImode, varop=0x7ffff61a9850, count=1)
at /space/rguenther/src/svn/trunk/gcc/combine.c:9723
#5 0x0000000000e3e277 in combine_simplify_rtx (x=0x7ffff61a25c0,
op0_mode=V4SImode, in_dest=0)
at /space/rguenther/src/svn/trunk/gcc/combine.c:5225
#6 0x0000000000e3c4e1 in subst (x=0x7ffff61a25c0, from=0x7ffff61a24e0,
to=0x7ffff61a9850, in_dest=0, unique_copy=0)
at /space/rguenther/src/svn/trunk/gcc/combine.c:4543
#7 0x0000000000e3c2e7 in subst (x=0x7ffff61a25e0, from=0x7ffff61a24e0,
to=0x7ffff61a9850, in_dest=0, unique_copy=0)
at /space/rguenther/src/svn/trunk/gcc/combine.c:4481
#8 0x0000000000e370bf in try_combine (i3=0x7ffff61a0b40, i2=0x7ffff61a0af0,
i1=0x0, new_direct_jump_p=0x7fffffffda34)
at /space/rguenther/src/svn/trunk/gcc/combine.c:2726
#9 0x0000000000e336bc in combine_instructions (f=0x7ffff61a8080, nregs=111)
at /space/rguenther/src/svn/trunk/gcc/combine.c:1256
#10 0x0000000000e5197b in rest_of_handle_combine ()
at /space/rguenther/src/svn/trunk/gcc/combine.c:12999
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Component|c |rtl-optimization
Ever Confirmed|0 |1
Keywords| |ice-on-valid-code
Last reconfirmed|0000-00-00 00:00:00 |2009-03-30 14:24:15
date| |
Summary|internal compiler error: in |[4.3/4.4/4.5 Regression]
|trunc_int_for_mode, at |internal compiler error: in
|explow.c:55 |trunc_int_for_mode, at
| |explow.c:55
Target Milestone|--- |4.3.4
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39588
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug rtl-optimization/39588] [4.3/4.4/4.5 Regression] internal compiler error: in trunc_int_for_mode, at explow.c:55
2009-03-30 13:29 [Bug c/39588] New: internal compiler error: in trunc_int_for_mode, at explow.c:55 olivier dot roussel at cril dot univ-artois dot fr
2009-03-30 13:48 ` [Bug c/39588] " olivier dot roussel at cril dot univ-artois dot fr
2009-03-30 14:24 ` [Bug rtl-optimization/39588] [4.3/4.4/4.5 Regression] " rguenth at gcc dot gnu dot org
@ 2009-03-30 14:56 ` rguenth at gcc dot gnu dot org
2009-03-31 15:44 ` ebotcazou at gcc dot gnu dot org
` (4 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2009-03-30 14:56 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from rguenth at gcc dot gnu dot org 2009-03-30 14:56 -------
We want to simplify
(ashift:V4SI (neg:V4SI (reg:V4SI 87))
(const_int 1 [0x1]))
to
(neg:V4SI (ashift:V4Si (reg:V4SI 87)
(const_int 1 [0x1]))
but the code obviously doesn't expect vector modes. For the particular
case of shifts we pass down zero, so the following would fix^Wworkaround
the issue
Index: gcc/combine.c
===================================================================
--- gcc/combine.c (revision 145291)
+++ gcc/combine.c (working copy)
@@ -8974,7 +8974,8 @@ merge_outer_ops (enum rtx_code *pop0, HO
/* ??? Slightly redundant with the above mask, but not entirely.
Moving this above means we'd have to sign-extend the mode mask
for the final test. */
- const0 = trunc_int_for_mode (const0, mode);
+ if (const0 != 0)
+ const0 = trunc_int_for_mode (const0, mode);
*pop0 = op0;
*pconst0 = const0;
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39588
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug rtl-optimization/39588] [4.3/4.4/4.5 Regression] internal compiler error: in trunc_int_for_mode, at explow.c:55
2009-03-30 13:29 [Bug c/39588] New: internal compiler error: in trunc_int_for_mode, at explow.c:55 olivier dot roussel at cril dot univ-artois dot fr
` (2 preceding siblings ...)
2009-03-30 14:56 ` rguenth at gcc dot gnu dot org
@ 2009-03-31 15:44 ` ebotcazou at gcc dot gnu dot org
2009-04-01 20:46 ` ebotcazou at gcc dot gnu dot org
` (3 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: ebotcazou at gcc dot gnu dot org @ 2009-03-31 15:44 UTC (permalink / raw)
To: gcc-bugs
--
ebotcazou at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |ebotcazou at gcc dot gnu dot
|dot org |org
Status|NEW |ASSIGNED
Last reconfirmed|2009-03-30 14:24:15 |2009-03-31 15:43:52
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39588
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug rtl-optimization/39588] [4.3/4.4/4.5 Regression] internal compiler error: in trunc_int_for_mode, at explow.c:55
2009-03-30 13:29 [Bug c/39588] New: internal compiler error: in trunc_int_for_mode, at explow.c:55 olivier dot roussel at cril dot univ-artois dot fr
` (3 preceding siblings ...)
2009-03-31 15:44 ` ebotcazou at gcc dot gnu dot org
@ 2009-04-01 20:46 ` ebotcazou at gcc dot gnu dot org
2009-04-01 20:48 ` ebotcazou at gcc dot gnu dot org
` (2 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: ebotcazou at gcc dot gnu dot org @ 2009-04-01 20:46 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from ebotcazou at gcc dot gnu dot org 2009-04-01 20:46 -------
Subject: Bug 39588
Author: ebotcazou
Date: Wed Apr 1 20:46:30 2009
New Revision: 145430
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=145430
Log:
PR rtl-optimization/39588
* combine.c (merge_outer_ops): Do not set the constant when this
is not necessary.
(simplify_shift_const_1): Do not modify it either in this case.
Added:
trunk/gcc/testsuite/gcc.c-torture/compile/20090401-1.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/combine.c
trunk/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39588
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug rtl-optimization/39588] [4.3/4.4/4.5 Regression] internal compiler error: in trunc_int_for_mode, at explow.c:55
2009-03-30 13:29 [Bug c/39588] New: internal compiler error: in trunc_int_for_mode, at explow.c:55 olivier dot roussel at cril dot univ-artois dot fr
` (4 preceding siblings ...)
2009-04-01 20:46 ` ebotcazou at gcc dot gnu dot org
@ 2009-04-01 20:48 ` ebotcazou at gcc dot gnu dot org
2009-04-01 20:48 ` ebotcazou at gcc dot gnu dot org
2009-04-01 20:51 ` ebotcazou at gcc dot gnu dot org
7 siblings, 0 replies; 9+ messages in thread
From: ebotcazou at gcc dot gnu dot org @ 2009-04-01 20:48 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from ebotcazou at gcc dot gnu dot org 2009-04-01 20:48 -------
Subject: Bug 39588
Author: ebotcazou
Date: Wed Apr 1 20:48:33 2009
New Revision: 145432
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=145432
Log:
PR rtl-optimization/39588
* combine.c (merge_outer_ops): Do not set the constant when this
is not necessary.
(simplify_shift_const_1): Do not modify it either in this case.
Added:
branches/gcc-4_3-branch/gcc/testsuite/gcc.c-torture/compile/20090401-1.c
Modified:
branches/gcc-4_3-branch/gcc/ChangeLog
branches/gcc-4_3-branch/gcc/combine.c
branches/gcc-4_3-branch/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39588
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug rtl-optimization/39588] [4.3/4.4/4.5 Regression] internal compiler error: in trunc_int_for_mode, at explow.c:55
2009-03-30 13:29 [Bug c/39588] New: internal compiler error: in trunc_int_for_mode, at explow.c:55 olivier dot roussel at cril dot univ-artois dot fr
` (5 preceding siblings ...)
2009-04-01 20:48 ` ebotcazou at gcc dot gnu dot org
@ 2009-04-01 20:48 ` ebotcazou at gcc dot gnu dot org
2009-04-01 20:51 ` ebotcazou at gcc dot gnu dot org
7 siblings, 0 replies; 9+ messages in thread
From: ebotcazou at gcc dot gnu dot org @ 2009-04-01 20:48 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from ebotcazou at gcc dot gnu dot org 2009-04-01 20:47 -------
Subject: Bug 39588
Author: ebotcazou
Date: Wed Apr 1 20:47:37 2009
New Revision: 145431
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=145431
Log:
PR rtl-optimization/39588
* combine.c (merge_outer_ops): Do not set the constant when this
is not necessary.
(simplify_shift_const_1): Do not modify it either in this case.
Added:
branches/gcc-4_4-branch/gcc/testsuite/gcc.c-torture/compile/20090401-1.c
Modified:
branches/gcc-4_4-branch/gcc/ChangeLog
branches/gcc-4_4-branch/gcc/combine.c
branches/gcc-4_4-branch/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39588
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug rtl-optimization/39588] [4.3/4.4/4.5 Regression] internal compiler error: in trunc_int_for_mode, at explow.c:55
2009-03-30 13:29 [Bug c/39588] New: internal compiler error: in trunc_int_for_mode, at explow.c:55 olivier dot roussel at cril dot univ-artois dot fr
` (6 preceding siblings ...)
2009-04-01 20:48 ` ebotcazou at gcc dot gnu dot org
@ 2009-04-01 20:51 ` ebotcazou at gcc dot gnu dot org
7 siblings, 0 replies; 9+ messages in thread
From: ebotcazou at gcc dot gnu dot org @ 2009-04-01 20:51 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from ebotcazou at gcc dot gnu dot org 2009-04-01 20:51 -------
Thanks for the reduced testcase.
--
ebotcazou at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39588
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2009-04-01 20:51 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-03-30 13:29 [Bug c/39588] New: internal compiler error: in trunc_int_for_mode, at explow.c:55 olivier dot roussel at cril dot univ-artois dot fr
2009-03-30 13:48 ` [Bug c/39588] " olivier dot roussel at cril dot univ-artois dot fr
2009-03-30 14:24 ` [Bug rtl-optimization/39588] [4.3/4.4/4.5 Regression] " rguenth at gcc dot gnu dot org
2009-03-30 14:56 ` rguenth at gcc dot gnu dot org
2009-03-31 15:44 ` ebotcazou at gcc dot gnu dot org
2009-04-01 20:46 ` ebotcazou at gcc dot gnu dot org
2009-04-01 20:48 ` ebotcazou at gcc dot gnu dot org
2009-04-01 20:48 ` ebotcazou at gcc dot gnu dot org
2009-04-01 20:51 ` ebotcazou 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).