* [Bug middle-end/59743] [4.9 Regression] ICE: Segmentation fault
2014-01-09 20:41 [Bug rtl-optimization/59743] New: [4.9 Regression] ICE: Segmentation fault trippels at gcc dot gnu.org
@ 2014-01-09 21:05 ` trippels at gcc dot gnu.org
2014-01-09 21:15 ` jakub at gcc dot gnu.org
` (10 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: trippels at gcc dot gnu.org @ 2014-01-09 21:05 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59743
Markus Trippelsdorf <trippels at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |law at gcc dot gnu.org
Component|rtl-optimization |middle-end
Target Milestone|--- |4.9.0
--- Comment #1 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
Started with r206418.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug middle-end/59743] [4.9 Regression] ICE: Segmentation fault
2014-01-09 20:41 [Bug rtl-optimization/59743] New: [4.9 Regression] ICE: Segmentation fault trippels at gcc dot gnu.org
2014-01-09 21:05 ` [Bug middle-end/59743] " trippels at gcc dot gnu.org
@ 2014-01-09 21:15 ` jakub at gcc dot gnu.org
2014-01-09 21:20 ` law at redhat dot com
` (9 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: jakub at gcc dot gnu.org @ 2014-01-09 21:15 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59743
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu.org
--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
The ICE is because cand->insn is earlier in the bb than def_insn. But too
tired to look why.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug middle-end/59743] [4.9 Regression] ICE: Segmentation fault
2014-01-09 20:41 [Bug rtl-optimization/59743] New: [4.9 Regression] ICE: Segmentation fault trippels at gcc dot gnu.org
2014-01-09 21:05 ` [Bug middle-end/59743] " trippels at gcc dot gnu.org
2014-01-09 21:15 ` jakub at gcc dot gnu.org
@ 2014-01-09 21:20 ` law at redhat dot com
2014-01-09 21:50 ` law at redhat dot com
` (8 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: law at redhat dot com @ 2014-01-09 21:20 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59743
--- Comment #3 from Jeffrey A. Law <law at redhat dot com> ---
No worries Jakub. I'll take it as it's clearly mine.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug middle-end/59743] [4.9 Regression] ICE: Segmentation fault
2014-01-09 20:41 [Bug rtl-optimization/59743] New: [4.9 Regression] ICE: Segmentation fault trippels at gcc dot gnu.org
` (2 preceding siblings ...)
2014-01-09 21:20 ` law at redhat dot com
@ 2014-01-09 21:50 ` law at redhat dot com
2014-01-09 21:57 ` law at redhat dot com
` (7 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: law at redhat dot com @ 2014-01-09 21:50 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59743
--- Comment #4 from Jeffrey A. Law <law at redhat dot com> ---
I see what's going on.
Basically the code exhibits undefined behaviour (r.s.high is not defined before
its first use in the loop). Thus the first and only reaching def is appearing
after the first use.
Obviously we shouldn't be faulting here.
Markus -- You might want to go back to your original test and ensure it's not
exhibiting undefined behaviour. The original code may be exhibiting undefined
behaviour.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug middle-end/59743] [4.9 Regression] ICE: Segmentation fault
2014-01-09 20:41 [Bug rtl-optimization/59743] New: [4.9 Regression] ICE: Segmentation fault trippels at gcc dot gnu.org
` (3 preceding siblings ...)
2014-01-09 21:50 ` law at redhat dot com
@ 2014-01-09 21:57 ` law at redhat dot com
2014-01-09 22:00 ` trippels at gcc dot gnu.org
` (6 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: law at redhat dot com @ 2014-01-09 21:57 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59743
--- Comment #5 from Jeffrey A. Law <law at redhat dot com> ---
I think we can just check DF_INSN_LUIDs here to catch this case. My systems
are busy right now, but I should be able to nail this down as soon as one frees
up.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug middle-end/59743] [4.9 Regression] ICE: Segmentation fault
2014-01-09 20:41 [Bug rtl-optimization/59743] New: [4.9 Regression] ICE: Segmentation fault trippels at gcc dot gnu.org
` (4 preceding siblings ...)
2014-01-09 21:57 ` law at redhat dot com
@ 2014-01-09 22:00 ` trippels at gcc dot gnu.org
2014-01-09 23:45 ` jakub at gcc dot gnu.org
` (5 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: trippels at gcc dot gnu.org @ 2014-01-09 22:00 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59743
--- Comment #6 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
Created attachment 31791
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=31791&action=edit
original testcase
Here's the unreduced original.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug middle-end/59743] [4.9 Regression] ICE: Segmentation fault
2014-01-09 20:41 [Bug rtl-optimization/59743] New: [4.9 Regression] ICE: Segmentation fault trippels at gcc dot gnu.org
` (5 preceding siblings ...)
2014-01-09 22:00 ` trippels at gcc dot gnu.org
@ 2014-01-09 23:45 ` jakub at gcc dot gnu.org
2014-01-10 5:21 ` law at redhat dot com
` (4 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: jakub at gcc dot gnu.org @ 2014-01-09 23:45 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59743
--- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
(In reply to Jeffrey A. Law from comment #5)
> I think we can just check DF_INSN_LUIDs here to catch this case. My systems
> are busy right now, but I should be able to nail this down as soon as one
> frees up.
But is DF_INSN_LUID always computed? I mean, for -O2 it probably is, but what
about -O -free ? For -O I think the live problem isn't on and thus I think
DF_INSN_LUID isn't computed. The DF documentation is unfortunately
non-existent :(.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug middle-end/59743] [4.9 Regression] ICE: Segmentation fault
2014-01-09 20:41 [Bug rtl-optimization/59743] New: [4.9 Regression] ICE: Segmentation fault trippels at gcc dot gnu.org
` (6 preceding siblings ...)
2014-01-09 23:45 ` jakub at gcc dot gnu.org
@ 2014-01-10 5:21 ` law at redhat dot com
2014-01-10 5:34 ` law at redhat dot com
` (3 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: law at redhat dot com @ 2014-01-10 5:21 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59743
--- Comment #8 from Jeffrey A. Law <law at redhat dot com> ---
/* The logical uid of the insn in the basic block. This is valid
after any call to df_analyze but may rot after insns are added,
deleted or moved. */
int luid;
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug middle-end/59743] [4.9 Regression] ICE: Segmentation fault
2014-01-09 20:41 [Bug rtl-optimization/59743] New: [4.9 Regression] ICE: Segmentation fault trippels at gcc dot gnu.org
` (7 preceding siblings ...)
2014-01-10 5:21 ` law at redhat dot com
@ 2014-01-10 5:34 ` law at redhat dot com
2014-01-10 21:48 ` law at redhat dot com
` (2 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: law at redhat dot com @ 2014-01-10 5:34 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59743
Jeffrey A. Law <law at redhat dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |ASSIGNED
Last reconfirmed| |2014-01-10
Ever confirmed|0 |1
--- Comment #9 from Jeffrey A. Law <law at redhat dot com> ---
And note that ree does not make the LUID data stale until after analyzing *all*
the potential transformations. So the limitations of LUIDs shouldn't be a
problem.
Anyway, patch is in testing.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug middle-end/59743] [4.9 Regression] ICE: Segmentation fault
2014-01-09 20:41 [Bug rtl-optimization/59743] New: [4.9 Regression] ICE: Segmentation fault trippels at gcc dot gnu.org
` (8 preceding siblings ...)
2014-01-10 5:34 ` law at redhat dot com
@ 2014-01-10 21:48 ` law at redhat dot com
2014-01-10 22:13 ` law at gcc dot gnu.org
2014-01-10 22:14 ` law at redhat dot com
11 siblings, 0 replies; 13+ messages in thread
From: law at redhat dot com @ 2014-01-10 21:48 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59743
--- Comment #11 from Jeffrey A. Law <law at redhat dot com> ---
Thanks. I'm still working through the RTL/source on the full testcase to see
if there are any uninitialized uses. Regardless the patch I have here works
for both the reduced and original testcase. I'll be posting it for review
momentarily.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug middle-end/59743] [4.9 Regression] ICE: Segmentation fault
2014-01-09 20:41 [Bug rtl-optimization/59743] New: [4.9 Regression] ICE: Segmentation fault trippels at gcc dot gnu.org
` (9 preceding siblings ...)
2014-01-10 21:48 ` law at redhat dot com
@ 2014-01-10 22:13 ` law at gcc dot gnu.org
2014-01-10 22:14 ` law at redhat dot com
11 siblings, 0 replies; 13+ messages in thread
From: law at gcc dot gnu.org @ 2014-01-10 22:13 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59743
--- Comment #12 from Jeffrey A. Law <law at gcc dot gnu.org> ---
Author: law
Date: Fri Jan 10 22:13:18 2014
New Revision: 206545
URL: http://gcc.gnu.org/viewcvs?rev=206545&root=gcc&view=rev
Log:
PR middle-end/59743
* ree.c (combine_reaching_defs): Ensure the defining statement
occurs before the extension when optimizing extensions with
different source and destination hard registers.
PR middle-end/59743
* gcc.c-torture/compile/pr59743.c: New test.
Added:
trunk/gcc/testsuite/gcc.c-torture/compile/pr59743.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/ree.c
trunk/gcc/testsuite/ChangeLog
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug middle-end/59743] [4.9 Regression] ICE: Segmentation fault
2014-01-09 20:41 [Bug rtl-optimization/59743] New: [4.9 Regression] ICE: Segmentation fault trippels at gcc dot gnu.org
` (10 preceding siblings ...)
2014-01-10 22:13 ` law at gcc dot gnu.org
@ 2014-01-10 22:14 ` law at redhat dot com
11 siblings, 0 replies; 13+ messages in thread
From: law at redhat dot com @ 2014-01-10 22:14 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59743
Jeffrey A. Law <law at redhat dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution|--- |FIXED
--- Comment #13 from Jeffrey A. Law <law at redhat dot com> ---
Should be fixed on the trunk now.
^ permalink raw reply [flat|nested] 13+ messages in thread