Hi! On Wed, 4 May 2016 13:25:19 -0400, Nathan Sidwell <[email protected]> wrote: > This patch fixes an ICE Thomas observed in tree-ssa-tail-merge.c: [...]
I've recently run into the same ICE on gcc-6-branch; committed to
gcc-6-branch in r237294, as obvious:
commit f6355e94a162792e7e3ace0b20efd6e73f030585
Author: tschwinge <tschwinge@138bc75d-0d04-0410-961f-82ee72b054a4>
Date: Fri Jun 10 09:45:51 2016 +0000
tail merge ICE
Backport trunk r235964:
gcc/
* gimple.c (gimple_call_same_target_p): Unique functions are eq.
* tree-ssa-tail-merge.c (same_succ::equal): Check pointer eq
equality first.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-6-branch@237294
138bc75d-0d04-0410-961f-82ee72b054a4
---
gcc/ChangeLog | 9 +++++++++
gcc/gimple.c | 3 ++-
gcc/tree-ssa-tail-merge.c | 3 +++
3 files changed, 14 insertions(+), 1 deletion(-)
diff --git gcc/ChangeLog gcc/ChangeLog
index 9773a36..4b7b8f6 100644
--- gcc/ChangeLog
+++ gcc/ChangeLog
@@ -1,3 +1,12 @@
+2016-06-10 Thomas Schwinge <[email protected]>
+
+ Backport trunk r235964:
+ 2016-05-06 Nathan Sidwell <[email protected]>
+
+ * gimple.c (gimple_call_same_target_p): Unique functions are eq.
+ * tree-ssa-tail-merge.c (same_succ::equal): Check pointer eq
+ equality first.
+
2016-06-09 Michael Meissner <[email protected]>
Back port from trunk
diff --git gcc/gimple.c gcc/gimple.c
index b0e19d5..b06e62c 100644
--- gcc/gimple.c
+++ gcc/gimple.c
@@ -1355,7 +1355,8 @@ gimple_call_same_target_p (const gimple *c1, const gimple
*c2)
if (gimple_call_internal_p (c1))
return (gimple_call_internal_p (c2)
&& gimple_call_internal_fn (c1) == gimple_call_internal_fn (c2)
- && !gimple_call_internal_unique_p (as_a <const gcall *> (c1)));
+ && (!gimple_call_internal_unique_p (as_a <const gcall *> (c1))
+ || c1 == c2));
else
return (gimple_call_fn (c1) == gimple_call_fn (c2)
|| (gimple_call_fndecl (c1)
diff --git gcc/tree-ssa-tail-merge.c gcc/tree-ssa-tail-merge.c
index e95879f..3df41fd 100644
--- gcc/tree-ssa-tail-merge.c
+++ gcc/tree-ssa-tail-merge.c
@@ -538,6 +538,9 @@ same_succ::equal (const same_succ *e1, const same_succ *e2)
gimple *s1, *s2;
basic_block bb1, bb2;
+ if (e1 == e2)
+ return 1;
+
if (e1->hashval != e2->hashval)
return 0;
Grüße
Thomas
signature.asc
Description: PGP signature
