public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug rtl-optimization/55717] New: [4.8 Regression] ICE in form_sum, at reload.c:5400
@ 2012-12-17 9:40 rguenth at gcc dot gnu.org
2012-12-17 9:41 ` [Bug rtl-optimization/55717] " rguenth at gcc dot gnu.org
` (8 more replies)
0 siblings, 9 replies; 10+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-12-17 9:40 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55717
Bug #: 55717
Summary: [4.8 Regression] ICE in form_sum, at reload.c:5400
Classification: Unclassified
Product: gcc
Version: 4.8.0
Status: UNCONFIRMED
Keywords: ra
Severity: normal
Priority: P3
Component: rtl-optimization
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: rguenth@gcc.gnu.org
Target: s390x-*-*
Created attachment 28980
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=28980
preprocessed source
/usr/lib64/gcc/s390x-suse-linux/4.8/cc1plus -fpreprocessed jsinfer.ii -quiet
-dumpbase jsinfer.cpp -march=z10 -mtune=z196 -m64 -mzarch -auxbase-strip
jsinfer.o -g -g -O2 -Os -O3 -Wpedantic -Wpointer-arith -Woverloaded-virtual
-Werror=return-type -Wtype-limits -Wempty-body -Wno-ctor-dtor-privacy
-Wno-overlength-strings -Wno-invalid-offsetof -Wno-variadic-macros -Wcast-align
-Wno-long-long -Wall -w -version -fvisibility=hidden -fPIC -fmessage-length=0
-fstack-protector -funwind-tables -fasynchronous-unwind-tables
-fno-strict-aliasing -fno-rtti -ffunction-sections -fdata-sections
-fno-exceptions -freorder-blocks -fomit-frame-pointer -o jsinfer.s
GNU C++ (SUSE Linux) version 4.8.0 20121214 [trunk revision 194496]
(s390x-suse-linux)
compiled by GNU C version 4.8.0 20121214 [trunk revision 194496], GMP
version 5.0.5, MPFR version 3.1.1, MPC version 1.0
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
GNU C++ (SUSE Linux) version 4.8.0 20121214 [trunk revision 194496]
(s390x-suse-linux)
compiled by GNU C version 4.8.0 20121214 [trunk revision 194496], GMP
version 5.0.5, MPFR version 3.1.1, MPC version 1.0
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
Compiler executable checksum: a8e31d0d1f1ec059729ba32c442af16c
/home/abuild/rpmbuild/BUILD/mozilla/js/src/jsinfer.cpp: In member function
'void js::types::TypeCompartment::sweep(js::FreeOp*)':
/home/abuild/rpmbuild/BUILD/mozilla/js/src/jsinfer.cpp:6008:1: internal
compiler error: in form_sum, at reload.c:5400
}
^
libbacktrace could not find executable to open
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://bugs.opensuse.org/> for instructions.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug rtl-optimization/55717] [4.8 Regression] ICE in form_sum, at reload.c:5400
2012-12-17 9:40 [Bug rtl-optimization/55717] New: [4.8 Regression] ICE in form_sum, at reload.c:5400 rguenth at gcc dot gnu.org
@ 2012-12-17 9:41 ` rguenth at gcc dot gnu.org
2012-12-17 11:05 ` rguenth at gcc dot gnu.org
` (7 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-12-17 9:41 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55717
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |4.8.0
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug rtl-optimization/55717] [4.8 Regression] ICE in form_sum, at reload.c:5400
2012-12-17 9:40 [Bug rtl-optimization/55717] New: [4.8 Regression] ICE in form_sum, at reload.c:5400 rguenth at gcc dot gnu.org
2012-12-17 9:41 ` [Bug rtl-optimization/55717] " rguenth at gcc dot gnu.org
@ 2012-12-17 11:05 ` rguenth at gcc dot gnu.org
2012-12-17 15:07 ` rguenth at gcc dot gnu.org
` (6 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-12-17 11:05 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55717
--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> 2012-12-17 11:03:28 UTC ---
Reducing...
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug rtl-optimization/55717] [4.8 Regression] ICE in form_sum, at reload.c:5400
2012-12-17 9:40 [Bug rtl-optimization/55717] New: [4.8 Regression] ICE in form_sum, at reload.c:5400 rguenth at gcc dot gnu.org
2012-12-17 9:41 ` [Bug rtl-optimization/55717] " rguenth at gcc dot gnu.org
2012-12-17 11:05 ` rguenth at gcc dot gnu.org
@ 2012-12-17 15:07 ` rguenth at gcc dot gnu.org
2012-12-17 15:38 ` rguenth at gcc dot gnu.org
` (5 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-12-17 15:07 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55717
--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> 2012-12-17 15:06:45 UTC ---
Created attachment 28985
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=28985
autoreduced testcase
Autoreduced testcase, fails with
> ./cc1plus -quiet -I /abuild/rguenther/obj-s390x-g/gcc/include -o /dev/null jsinfer.3.ii -O -g -w
jsinfer.3.ii: In member function 'void
js::types::TypeCompartment::sweep(js::FreeOp*)':
jsinfer.3.ii:191:3: internal compiler error: in form_sum, at reload.c:5400
}
^
0xc03eb7 form_sum(machine_mode, rtx_def*, rtx_def*)
/space/rguenther/src/svn/trunk/gcc/reload.c:5400
0xc106b2 eliminate_regs_1
/space/rguenther/src/svn/trunk/gcc/reload1.c:2684
0xc108bc eliminate_regs_1
/space/rguenther/src/svn/trunk/gcc/reload1.c:2740
0xc111e9 eliminate_regs(rtx_def*, machine_mode, rtx_def*)
/space/rguenther/src/svn/trunk/gcc/reload1.c:2960
0xc11b6c eliminate_regs_in_insn
/space/rguenther/src/svn/trunk/gcc/reload1.c:3244
0xc0d4b0 calculate_needs_all_insns
/space/rguenther/src/svn/trunk/gcc/reload1.c:1515
0xc0b9f8 reload(rtx_def*, int)
/space/rguenther/src/svn/trunk/gcc/reload1.c:940
0xaf7489 do_reload
/space/rguenther/src/svn/trunk/gcc/ira.c:4636
0xaf7654 rest_of_handle_reload
/space/rguenther/src/svn/trunk/gcc/ira.c:4737
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.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug rtl-optimization/55717] [4.8 Regression] ICE in form_sum, at reload.c:5400
2012-12-17 9:40 [Bug rtl-optimization/55717] New: [4.8 Regression] ICE in form_sum, at reload.c:5400 rguenth at gcc dot gnu.org
` (2 preceding siblings ...)
2012-12-17 15:07 ` rguenth at gcc dot gnu.org
@ 2012-12-17 15:38 ` rguenth at gcc dot gnu.org
2012-12-17 16:37 ` jakub at gcc dot gnu.org
` (4 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-12-17 15:38 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55717
--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> 2012-12-17 15:38:04 UTC ---
(gdb) up
#1 0x0000000000c03eb8 in form_sum (mode=SImode, x=0x7ffff02a5e88,
y=0x7ffff02a5eb8) at /space/rguenther/src/svn/trunk/gcc/reload.c:5400
5400 gcc_assert (GET_MODE (x) == mode || GET_MODE (x) == VOIDmode);
(gdb) call debug_rtx (x)
(mem/f/j:DI (plus:DI (mem/f/c:DI (plus:DI (reg/f:DI 15 %r15)
(const_int 168 [0xa8])) [0 MEM[(const struct AllocationSiteKey
&)&key]+0 S8 A64])
(const_int 24 [0x18])) [0 key$script_268->code+0 S8 A64])
similar for the reduced testcase
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug rtl-optimization/55717] [4.8 Regression] ICE in form_sum, at reload.c:5400
2012-12-17 9:40 [Bug rtl-optimization/55717] New: [4.8 Regression] ICE in form_sum, at reload.c:5400 rguenth at gcc dot gnu.org
` (3 preceding siblings ...)
2012-12-17 15:38 ` rguenth at gcc dot gnu.org
@ 2012-12-17 16:37 ` jakub at gcc dot gnu.org
2012-12-17 18:33 ` jakub at gcc dot gnu.org
` (3 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-12-17 16:37 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55717
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |aoliva at gcc dot gnu.org,
| |ebotcazou at gcc dot
| |gnu.org
--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-12-17 16:36:47 UTC ---
Ugh, this is a mess. simplify-rtx.c (and fwprop.c in one spot) calls
rtl_hooks.gen_lowpart_no_emit
in various places, but
gen_lowpart_no_emit_general
happily returns a non-lowpart rtx if gen_lowpart_if_possible returned NULL.
I guess for normal insns that is in the hope that whatever pass uses it will
reject such pattern as invalid, but as in DEBUG_INSNs no such checking is
performed, it happily emits sucgh bogus RTL into the RTL stream.
For expand_debug_expr, I guess cfgexpand.c (expand_call_stmt and
expand_debug_locations) could easily switch rtl_hooks to debug_rtl_hooks, which
would simply create a SUBREG if gen_lowpart_if_possible returned NULL, all
SUBREGs are valid in DEBUG_INSNs. But wonder about all the other passes that
call simplify_* functions on DEBUG_INSN content, guess we want to switch the
rtl_hooks in that case too.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug rtl-optimization/55717] [4.8 Regression] ICE in form_sum, at reload.c:5400
2012-12-17 9:40 [Bug rtl-optimization/55717] New: [4.8 Regression] ICE in form_sum, at reload.c:5400 rguenth at gcc dot gnu.org
` (4 preceding siblings ...)
2012-12-17 16:37 ` jakub at gcc dot gnu.org
@ 2012-12-17 18:33 ` jakub at gcc dot gnu.org
2012-12-18 10:51 ` jakub at gcc dot gnu.org
` (2 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-12-17 18:33 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55717
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |ASSIGNED
Last reconfirmed| |2012-12-17
AssignedTo|unassigned at gcc dot |jakub at gcc dot gnu.org
|gnu.org |
Ever Confirmed|0 |1
--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-12-17 18:32:55 UTC ---
Created attachment 28987
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=28987
gcc48-pr55717.patch
Untested fix. Instead of returning very likely bogus value x this patch
returns NULL and let the callers deal with that as error (so they don't try
that simplification, instead try some other or just punt at simplifying).
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug rtl-optimization/55717] [4.8 Regression] ICE in form_sum, at reload.c:5400
2012-12-17 9:40 [Bug rtl-optimization/55717] New: [4.8 Regression] ICE in form_sum, at reload.c:5400 rguenth at gcc dot gnu.org
` (5 preceding siblings ...)
2012-12-17 18:33 ` jakub at gcc dot gnu.org
@ 2012-12-18 10:51 ` jakub at gcc dot gnu.org
2012-12-18 11:36 ` krebbel at gcc dot gnu.org
2012-12-18 11:38 ` jakub at gcc dot gnu.org
8 siblings, 0 replies; 10+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-12-18 10:51 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55717
--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-12-18 10:50:51 UTC ---
Author: jakub
Date: Tue Dec 18 10:50:47 2012
New Revision: 194575
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=194575
Log:
PR debug/55717
* rtlhooks-def.h (RTL_HOOKS_GEN_LOWPART_NO_EMIT): Define to
gen_lowpart_if_possible.
(gen_lowpart_no_emit_general): Remove prototype.
* rtlhooks.c (gen_lowpart_no_emit_general): Removed.
* simplify-rtx.c (simplify_unary_operation_1,
simplify_binary_operation_1): Continue simplifying if
rtl_hooks.gen_lowpart_no_emit returns NULL_RTX.
* dwarf2out.c (mem_loc_descriptor) <case TRUNCATE>: Handle
truncation like lowpart SUBREG.
* testsuite/g++.dg/opt/pr55717.C: New test.
Added:
trunk/gcc/testsuite/g++.dg/opt/pr55717.C
Modified:
trunk/gcc/ChangeLog
trunk/gcc/dwarf2out.c
trunk/gcc/rtlhooks-def.h
trunk/gcc/rtlhooks.c
trunk/gcc/simplify-rtx.c
trunk/gcc/testsuite/ChangeLog
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug rtl-optimization/55717] [4.8 Regression] ICE in form_sum, at reload.c:5400
2012-12-17 9:40 [Bug rtl-optimization/55717] New: [4.8 Regression] ICE in form_sum, at reload.c:5400 rguenth at gcc dot gnu.org
` (6 preceding siblings ...)
2012-12-18 10:51 ` jakub at gcc dot gnu.org
@ 2012-12-18 11:36 ` krebbel at gcc dot gnu.org
2012-12-18 11:38 ` jakub at gcc dot gnu.org
8 siblings, 0 replies; 10+ messages in thread
From: krebbel at gcc dot gnu.org @ 2012-12-18 11:36 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55717
--- Comment #7 from Andreas Krebbel <krebbel at gcc dot gnu.org> 2012-12-18 11:35:33 UTC ---
(In reply to comment #5)
> Created attachment 28987 [details]
> gcc48-pr55717.patch
>
> Untested fix. Instead of returning very likely bogus value x this patch
> returns NULL and let the callers deal with that as error (so they don't try
> that simplification, instead try some other or just punt at simplifying).
Thanks. I've tested your patch on s390 and s390x. No regressions.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug rtl-optimization/55717] [4.8 Regression] ICE in form_sum, at reload.c:5400
2012-12-17 9:40 [Bug rtl-optimization/55717] New: [4.8 Regression] ICE in form_sum, at reload.c:5400 rguenth at gcc dot gnu.org
` (7 preceding siblings ...)
2012-12-18 11:36 ` krebbel at gcc dot gnu.org
@ 2012-12-18 11:38 ` jakub at gcc dot gnu.org
8 siblings, 0 replies; 10+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-12-18 11:38 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55717
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
--- Comment #8 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-12-18 11:37:48 UTC ---
Fixed.
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2012-12-18 11:38 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-12-17 9:40 [Bug rtl-optimization/55717] New: [4.8 Regression] ICE in form_sum, at reload.c:5400 rguenth at gcc dot gnu.org
2012-12-17 9:41 ` [Bug rtl-optimization/55717] " rguenth at gcc dot gnu.org
2012-12-17 11:05 ` rguenth at gcc dot gnu.org
2012-12-17 15:07 ` rguenth at gcc dot gnu.org
2012-12-17 15:38 ` rguenth at gcc dot gnu.org
2012-12-17 16:37 ` jakub at gcc dot gnu.org
2012-12-17 18:33 ` jakub at gcc dot gnu.org
2012-12-18 10:51 ` jakub at gcc dot gnu.org
2012-12-18 11:36 ` krebbel at gcc dot gnu.org
2012-12-18 11:38 ` jakub 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).