public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/63770] New: ICE on valid code at all optimization levels on x86_64-linux-gnu
@ 2014-11-07 6:23 su at cs dot ucdavis.edu
2014-11-07 8:19 ` [Bug middle-end/63770] [5 Regression] " rguenth at gcc dot gnu.org
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: su at cs dot ucdavis.edu @ 2014-11-07 6:23 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63770
Bug ID: 63770
Summary: ICE on valid code at all optimization levels on
x86_64-linux-gnu
Product: gcc
Version: 5.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
Assignee: unassigned at gcc dot gnu.org
Reporter: su at cs dot ucdavis.edu
The following code causes an ICE when compiled with the current gcc trunk at
all the optimization levels on x86_64-linux-gnu in both 32-bit and 64-bit
modes.
It is a regression from 4.9.x.
$ gcc-trunk -v
Using built-in specs.
COLLECT_GCC=gcc-trunk
COLLECT_LTO_WRAPPER=/usr/local/gcc-trunk/libexec/gcc/x86_64-unknown-linux-gnu/5.0.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ../gcc-trunk/configure --prefix=/usr/local/gcc-trunk
--enable-languages=c,c++ --disable-werror --enable-multilib
Thread model: posix
gcc version 5.0.0 20141106 (experimental) [trunk revision 217200] (GCC)
$
$ gcc-4.9 -O0 -c small.c
$
$ gcc-trunk -O0 -c small.c
gcc-trunk: internal compiler error: Segmentation fault (program cc1)
0x40bccc execute
../../gcc-trunk/gcc/gcc.c:2908
0x40bfb9 do_spec_1
../../gcc-trunk/gcc/gcc.c:4724
0x40ea2b process_brace_body
../../gcc-trunk/gcc/gcc.c:6007
0x40ea2b handle_braces
../../gcc-trunk/gcc/gcc.c:5921
0x40cb17 do_spec_1
../../gcc-trunk/gcc/gcc.c:5378
0x40ea2b process_brace_body
../../gcc-trunk/gcc/gcc.c:6007
0x40ea2b handle_braces
../../gcc-trunk/gcc/gcc.c:5921
0x40cb17 do_spec_1
../../gcc-trunk/gcc/gcc.c:5378
0x40c443 do_spec_1
../../gcc-trunk/gcc/gcc.c:5493
0x40ea2b process_brace_body
../../gcc-trunk/gcc/gcc.c:6007
0x40ea2b handle_braces
../../gcc-trunk/gcc/gcc.c:5921
0x40cb17 do_spec_1
../../gcc-trunk/gcc/gcc.c:5378
0x40ea2b process_brace_body
../../gcc-trunk/gcc/gcc.c:6007
0x40ea2b handle_braces
../../gcc-trunk/gcc/gcc.c:5921
0x40cb17 do_spec_1
../../gcc-trunk/gcc/gcc.c:5378
0x40ea2b process_brace_body
../../gcc-trunk/gcc/gcc.c:6007
0x40ea2b handle_braces
../../gcc-trunk/gcc/gcc.c:5921
0x40cb17 do_spec_1
../../gcc-trunk/gcc/gcc.c:5378
0x40ea2b process_brace_body
../../gcc-trunk/gcc/gcc.c:6007
0x40ea2b handle_braces
../../gcc-trunk/gcc/gcc.c:5921
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.
$
-----------------------
char a;
struct S
{
int f0:9;
};
volatile struct S b;
int
fn1 ()
{
return (1 & b.f0) < a;
}
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug middle-end/63770] [5 Regression] ICE on valid code at all optimization levels on x86_64-linux-gnu
2014-11-07 6:23 [Bug c/63770] New: ICE on valid code at all optimization levels on x86_64-linux-gnu su at cs dot ucdavis.edu
@ 2014-11-07 8:19 ` rguenth at gcc dot gnu.org
2014-11-07 8:31 ` rguenth at gcc dot gnu.org
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu.org @ 2014-11-07 8:19 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63770
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |ASSIGNED
Last reconfirmed| |2014-11-07
Component|c |middle-end
Assignee|unassigned at gcc dot gnu.org |rguenth at gcc dot gnu.org
Target Milestone|--- |5.0
Summary|ICE on valid code at all |[5 Regression] ICE on valid
|optimization levels on |code at all optimization
|x86_64-linux-gnu |levels on x86_64-linux-gnu
Ever confirmed|0 |1
--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
Confirmed. Possibly similar as PR63767.
Mine.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug middle-end/63770] [5 Regression] ICE on valid code at all optimization levels on x86_64-linux-gnu
2014-11-07 6:23 [Bug c/63770] New: ICE on valid code at all optimization levels on x86_64-linux-gnu su at cs dot ucdavis.edu
2014-11-07 8:19 ` [Bug middle-end/63770] [5 Regression] " rguenth at gcc dot gnu.org
@ 2014-11-07 8:31 ` rguenth at gcc dot gnu.org
2014-11-07 8:37 ` rguenth at gcc dot gnu.org
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu.org @ 2014-11-07 8:31 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63770
--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
from a match.pd pattern
/* Try to fold (type) X op CST -> (type) (X op ((type-x) CST))
when profitable.
For bitwise binary operations apply operand conversions to the
binary operation result instead of to the operands. This allows
to combine successive conversions and bitwise binary operations.
We combine the above two cases by using a conditional convert. */
(<unnamed-signed:9>) b.f0 & 1 -> (<unnamed-signed:9>) (b.f0 & 1)
then from fold_unary
7825 /* Convert (T)(x & c) into (T)x & (T)c, if c is an integer
7826 constants (if x has signed type, the sign bit cannot be set
7827 in c). This folds extension into the BIT_AND_EXPR.
...
The existing measure against this recursion doesn't apply. I have a fix.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug middle-end/63770] [5 Regression] ICE on valid code at all optimization levels on x86_64-linux-gnu
2014-11-07 6:23 [Bug c/63770] New: ICE on valid code at all optimization levels on x86_64-linux-gnu su at cs dot ucdavis.edu
2014-11-07 8:19 ` [Bug middle-end/63770] [5 Regression] " rguenth at gcc dot gnu.org
2014-11-07 8:31 ` rguenth at gcc dot gnu.org
@ 2014-11-07 8:37 ` rguenth at gcc dot gnu.org
2014-11-07 10:51 ` rguenth at gcc dot gnu.org
2014-11-07 14:02 ` trippels at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu.org @ 2014-11-07 8:37 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63770
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |sasha.levin at oracle dot com
--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
*** Bug 63767 has been marked as a duplicate of this bug. ***
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug middle-end/63770] [5 Regression] ICE on valid code at all optimization levels on x86_64-linux-gnu
2014-11-07 6:23 [Bug c/63770] New: ICE on valid code at all optimization levels on x86_64-linux-gnu su at cs dot ucdavis.edu
` (2 preceding siblings ...)
2014-11-07 8:37 ` rguenth at gcc dot gnu.org
@ 2014-11-07 10:51 ` rguenth at gcc dot gnu.org
2014-11-07 14:02 ` trippels at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu.org @ 2014-11-07 10:51 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63770
--- Comment #5 from Richard Biener <rguenth at gcc dot gnu.org> ---
Author: rguenth
Date: Fri Nov 7 10:51:06 2014
New Revision: 217214
URL: https://gcc.gnu.org/viewcvs?rev=217214&root=gcc&view=rev
Log:
2014-11-07 Richard Biener <rguenther@suse.de>
PR middle-end/63770
* match.pd: Guard conflicting GENERIC pattern properly.
* gcc.dg/pr63770.c: New testcase.
Added:
trunk/gcc/testsuite/gcc.dg/pr63770.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/match.pd
trunk/gcc/testsuite/ChangeLog
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug middle-end/63770] [5 Regression] ICE on valid code at all optimization levels on x86_64-linux-gnu
2014-11-07 6:23 [Bug c/63770] New: ICE on valid code at all optimization levels on x86_64-linux-gnu su at cs dot ucdavis.edu
` (3 preceding siblings ...)
2014-11-07 10:51 ` rguenth at gcc dot gnu.org
@ 2014-11-07 14:02 ` trippels at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: trippels at gcc dot gnu.org @ 2014-11-07 14:02 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63770
Markus Trippelsdorf <trippels at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |trippels at gcc dot gnu.org
--- Comment #6 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
Richard, can you take a look at PR63244?
Maybe a backport of your patch to 4.9 could help?
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2014-11-07 14:02 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-11-07 6:23 [Bug c/63770] New: ICE on valid code at all optimization levels on x86_64-linux-gnu su at cs dot ucdavis.edu
2014-11-07 8:19 ` [Bug middle-end/63770] [5 Regression] " rguenth at gcc dot gnu.org
2014-11-07 8:31 ` rguenth at gcc dot gnu.org
2014-11-07 8:37 ` rguenth at gcc dot gnu.org
2014-11-07 10:51 ` rguenth at gcc dot gnu.org
2014-11-07 14:02 ` trippels at gcc dot gnu.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).