* [Bug tree-optimization/66729] Segfault starting with r224967
2015-07-01 18:53 [Bug tree-optimization/66729] New: Segfault starting with r224967 pthaugen at gcc dot gnu.org
@ 2015-07-01 19:01 ` rsandifo at gcc dot gnu.org
2015-07-01 20:52 ` pthaugen at gcc dot gnu.org
` (7 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: rsandifo at gcc dot gnu.org @ 2015-07-01 19:01 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66729
rsandifo at gcc dot gnu.org <rsandifo at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |WAITING
Last reconfirmed| |2015-07-01
Ever confirmed|0 |1
--- Comment #2 from rsandifo at gcc dot gnu.org <rsandifo at gcc dot gnu.org> ---
(In reply to David Edelsohn from comment #1)
> Is this the bootstrap failure that Segher tracked to Richard Sandiford?
> Richard already posted a patch.
Yeah, it sounds like it. I committed the patch as r225263 -- please let
me know if that didn't fix it.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug tree-optimization/66729] Segfault starting with r224967
2015-07-01 18:53 [Bug tree-optimization/66729] New: Segfault starting with r224967 pthaugen at gcc dot gnu.org
2015-07-01 19:01 ` [Bug tree-optimization/66729] " rsandifo at gcc dot gnu.org
@ 2015-07-01 20:52 ` pthaugen at gcc dot gnu.org
2015-07-01 22:42 ` rsandifo at gcc dot gnu.org
` (6 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: pthaugen at gcc dot gnu.org @ 2015-07-01 20:52 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66729
--- Comment #3 from Pat Haugen <pthaugen at gcc dot gnu.org> ---
(In reply to rsandifo@gcc.gnu.org from comment #2)
> (In reply to David Edelsohn from comment #1)
> > Is this the bootstrap failure that Segher tracked to Richard Sandiford?
> > Richard already posted a patch.
>
> Yeah, it sounds like it. I committed the patch as r225263 -- please let
> me know if that didn't fix it.
I still see the ICE with r225263.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug tree-optimization/66729] Segfault starting with r224967
2015-07-01 18:53 [Bug tree-optimization/66729] New: Segfault starting with r224967 pthaugen at gcc dot gnu.org
2015-07-01 19:01 ` [Bug tree-optimization/66729] " rsandifo at gcc dot gnu.org
2015-07-01 20:52 ` pthaugen at gcc dot gnu.org
@ 2015-07-01 22:42 ` rsandifo at gcc dot gnu.org
2015-07-02 19:25 ` meissner at gcc dot gnu.org
` (5 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: rsandifo at gcc dot gnu.org @ 2015-07-01 22:42 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66729
--- Comment #4 from rsandifo at gcc dot gnu.org <rsandifo at gcc dot gnu.org> ---
(In reply to Pat Haugen from comment #3)
> (In reply to rsandifo@gcc.gnu.org from comment #2)
> > (In reply to David Edelsohn from comment #1)
> > > Is this the bootstrap failure that Segher tracked to Richard Sandiford?
> > > Richard already posted a patch.
> >
> > Yeah, it sounds like it. I committed the patch as r225263 -- please let
> > me know if that didn't fix it.
>
> I still see the ICE with r225263.
Hmm, bootstrap succeeded for me on gcc110. I used r225278, but I don't
think anything significant changed between the two.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug tree-optimization/66729] Segfault starting with r224967
2015-07-01 18:53 [Bug tree-optimization/66729] New: Segfault starting with r224967 pthaugen at gcc dot gnu.org
` (2 preceding siblings ...)
2015-07-01 22:42 ` rsandifo at gcc dot gnu.org
@ 2015-07-02 19:25 ` meissner at gcc dot gnu.org
2015-07-02 21:25 ` pthaugen at gcc dot gnu.org
` (4 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: meissner at gcc dot gnu.org @ 2015-07-02 19:25 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66729
Michael Meissner <meissner at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |meissner at gcc dot gnu.org
--- Comment #5 from Michael Meissner <meissner at gcc dot gnu.org> ---
FWIW, I bootstrapped the compiler on the same system Pat is using internally,
and it worked (using the various configuration hacks I've developed over the
years).
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug tree-optimization/66729] Segfault starting with r224967
2015-07-01 18:53 [Bug tree-optimization/66729] New: Segfault starting with r224967 pthaugen at gcc dot gnu.org
` (3 preceding siblings ...)
2015-07-02 19:25 ` meissner at gcc dot gnu.org
@ 2015-07-02 21:25 ` pthaugen at gcc dot gnu.org
2015-07-03 12:24 ` rsandifo at gcc dot gnu.org
` (3 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: pthaugen at gcc dot gnu.org @ 2015-07-02 21:25 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66729
--- Comment #6 from Pat Haugen <pthaugen at gcc dot gnu.org> ---
(In reply to rsandifo@gcc.gnu.org from comment #4)
>
> Hmm, bootstrap succeeded for me on gcc110. I used r225278, but I don't
> think anything significant changed between the two.
Mike Meissner and I ran various builds since he was not seeing any problem on
the same machine I was building on. From what I can tell, this is starting to
look like an issue when building with older compiler versions.
I can recreate the problem on machines with 4.3 and 4.4 versions of GCC as the
default distro compiler but if I modify my path so a 4.8 version of the
compiler is found first my bootstrap succeeds. Looks like gcc110 is a 4.7
distro compiler, and appears not an issue there.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug tree-optimization/66729] Segfault starting with r224967
2015-07-01 18:53 [Bug tree-optimization/66729] New: Segfault starting with r224967 pthaugen at gcc dot gnu.org
` (4 preceding siblings ...)
2015-07-02 21:25 ` pthaugen at gcc dot gnu.org
@ 2015-07-03 12:24 ` rsandifo at gcc dot gnu.org
2015-07-03 12:27 ` rsandifo at gcc dot gnu.org
` (2 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: rsandifo at gcc dot gnu.org @ 2015-07-03 12:24 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66729
--- Comment #7 from rsandifo at gcc dot gnu.org <rsandifo at gcc dot gnu.org> ---
(In reply to Pat Haugen from comment #6)
> (In reply to rsandifo@gcc.gnu.org from comment #4)
> >
> > Hmm, bootstrap succeeded for me on gcc110. I used r225278, but I don't
> > think anything significant changed between the two.
>
> Mike Meissner and I ran various builds since he was not seeing any problem
> on the same machine I was building on. From what I can tell, this is
> starting to look like an issue when building with older compiler versions.
>
> I can recreate the problem on machines with 4.3 and 4.4 versions of GCC as
> the default distro compiler but if I modify my path so a 4.8 version of the
> compiler is found first my bootstrap succeeds. Looks like gcc110 is a 4.7
> distro compiler, and appears not an issue there.
Thanks for narrowing it down. I tried a 4.4 compiler on gcc110 and yeah,
it fails for me too. I think the problem is due to inc_hash::add_expr
being entered with the wrong TOC pointer:
Breakpoint 1, inchash::add_expr (t=0x3fffafc8a2f0, hstate=...) at
/home/rsandifo/gcc/HEAD/gcc/gcc/tree.c:7697
7697 tclass = TREE_CODE_CLASS (code);
(gdb) p/x $r2
$1 = 0x123af688
(gdb) cond 1 $r2 != 0x123af688
(gdb) cont
Continuing.
Breakpoint 1, inchash::add_expr (t=0x3fffaf816000, hstate=...) at
/home/rsandifo/gcc/HEAD/gcc/gcc/tree.c:7697
7697 tclass = TREE_CODE_CLASS (code);
(gdb) bt
#0 inchash::add_expr (t=0x3fffaf816000, hstate=...) at
/home/rsandifo/gcc/HEAD/gcc/gcc/tree.c:7697
#1 0x0000000010ef9118 in iterative_hash_expr (tree=0x3fffaf816000, seed=0) at
/home/rsandifo/gcc/HEAD/gcc/gcc/tree.h:4519
#2 0x0000000010efc99c in tree_operand_hash::hash (t=0x3fffaf816000) at
/home/rsandifo/gcc/HEAD/gcc/gcc/tree-hash-traits.h:33
#3 0x000000001124bc7c in simple_hashmap_traits<tree_operand_hash>::hash
(h=@0x3fffffffdb30: 0x3fffaf816000)
at /home/rsandifo/gcc/HEAD/gcc/gcc/hash-map-traits.h:48
#4 0x000000001124b7f4 in hash_map<tree_node*, vec<tree_node*, va_heap,
vl_ptr>, val_ssa_equiv_hash_traits>::get (
this=0x125e0670, k=@0x3fffffffdb30: 0x3fffaf816000) at
/home/rsandifo/gcc/HEAD/gcc/gcc/hash-map.h:142
#5 0x000000001124ab3c in uncprop_into_successor_phis (bb=0x3fffaf850340)
at /home/rsandifo/gcc/HEAD/gcc/gcc/tree-ssa-uncprop.c:408
So we end up loading an incorrect value of tree_code_type and thus end
up with an invalid tclass:
Dump of assembler code from 0x113575e0 to 0x11357620:
=> 0x00000000113575e0 <inchash::add_expr(tree_node const*,
inchash::hash&)+1776>: lwz r0,156(r31)
0x00000000113575e4 <inchash::add_expr(tree_node const*,
inchash::hash&)+1780>: clrldi r0,r0,32
0x00000000113575e8 <inchash::add_expr(tree_node const*,
inchash::hash&)+1784>: extsw r0,r0
0x00000000113575ec <inchash::add_expr(tree_node const*,
inchash::hash&)+1788>: ld r9,-25616(r2)
(gdb) x/1a $r2-25616
0x123b9130: 0x11f86ba0
<_ZZN3vecIP21ipa_agg_jump_function7va_heap8vl_embedE10quick_pushERKS1_E12__FUNCTION__>
(gdb) p/x tree_code_type
$2 = 0x11d9131c <tree_code_type>
(gdb) print code
$3 = ADDR_EXPR
(gdb) print tclass
$4 = 1969711199
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug tree-optimization/66729] Segfault starting with r224967
2015-07-01 18:53 [Bug tree-optimization/66729] New: Segfault starting with r224967 pthaugen at gcc dot gnu.org
` (5 preceding siblings ...)
2015-07-03 12:24 ` rsandifo at gcc dot gnu.org
@ 2015-07-03 12:27 ` rsandifo at gcc dot gnu.org
2015-07-04 13:28 ` rsandifo at gcc dot gnu.org
2015-07-05 19:03 ` rsandifo at gcc dot gnu.org
8 siblings, 0 replies; 10+ messages in thread
From: rsandifo at gcc dot gnu.org @ 2015-07-03 12:27 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66729
--- Comment #8 from rsandifo at gcc dot gnu.org <rsandifo at gcc dot gnu.org> ---
(In reply to rsandifo@gcc.gnu.org from comment #7)
> (gdb) print code
> $3 = ADDR_EXPR
> (gdb) print tclass
> $4 = 1969711199
Er, to be clear, this was part _after_ typing "next". Guess I should
have quoted the full debug session.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug tree-optimization/66729] Segfault starting with r224967
2015-07-01 18:53 [Bug tree-optimization/66729] New: Segfault starting with r224967 pthaugen at gcc dot gnu.org
` (6 preceding siblings ...)
2015-07-03 12:27 ` rsandifo at gcc dot gnu.org
@ 2015-07-04 13:28 ` rsandifo at gcc dot gnu.org
2015-07-05 19:03 ` rsandifo at gcc dot gnu.org
8 siblings, 0 replies; 10+ messages in thread
From: rsandifo at gcc dot gnu.org @ 2015-07-04 13:28 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66729
--- Comment #9 from rsandifo at gcc dot gnu.org <rsandifo at gcc dot gnu.org> ---
Turns out to be a linker bug that is still present in binutils
mainline. I'm testing a patch.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug tree-optimization/66729] Segfault starting with r224967
2015-07-01 18:53 [Bug tree-optimization/66729] New: Segfault starting with r224967 pthaugen at gcc dot gnu.org
` (7 preceding siblings ...)
2015-07-04 13:28 ` rsandifo at gcc dot gnu.org
@ 2015-07-05 19:03 ` rsandifo at gcc dot gnu.org
8 siblings, 0 replies; 10+ messages in thread
From: rsandifo at gcc dot gnu.org @ 2015-07-05 19:03 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66729
rsandifo at gcc dot gnu.org <rsandifo at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|WAITING |RESOLVED
Resolution|--- |FIXED
--- Comment #10 from rsandifo at gcc dot gnu.org <rsandifo at gcc dot gnu.org> ---
Fixed with: https://www.sourceware.org/ml/binutils/2015-07/msg00035.html
(92a9c616e496f41c3d1da949078d5739add79161). FWIW, a workaround for
unpatched binutils is to build stage 1 with more optimisation,
via STAGE1_CFLAGS.
^ permalink raw reply [flat|nested] 10+ messages in thread