代码拉取完成,页面将自动刷新
同步操作将从 eastb233/src-openeuler_gcc 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
commit ee80f0c6ba50ebf0300fb0cfe1079a1321295749
Author: Richard Biener <rguenther@suse.de>
Date: Thu Oct 24 11:23:54 2019 +0000
re PR tree-optimization/92203 (ICE in eliminate_stmt, at tree-ssa-sccvn.c:5492)
2019-10-24 Richard Biener <rguenther@suse.de>
PR tree-optimization/92203
* treee-ssa-sccvn.c (eliminate_dom_walker::eliminate_stmt):
Skip eliminating conversion stmts inserted by insertion.
* gcc.dg/torture/pr92203.c: New testcase.
From-SVN: r277374
diff --git a/gcc/testsuite/gcc.dg/torture/pr92203.c b/gcc/testsuite/gcc.dg/torture/pr92203.c
new file mode 100644
index 00000000000..c752969d5e5
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr92203.c
@@ -0,0 +1,37 @@
+/* { dg-do compile } */
+/* { dg-additional-options "-Wno-div-by-zero" } */
+
+unsigned long int rr;
+
+void
+cw (int z9)
+{
+ int m5;
+ unsigned long int vz = 0;
+ long int *na;
+
+ if (z9 == 0)
+ rr = 0;
+ else
+ {
+ na = (long int *) &m5;
+ for (*na = 0; *na < 1; ++*na)
+ {
+ na = (long int *) &vz;
+ rr /= 0;
+ }
+ }
+
+ m5 = rr / 5;
+ ++vz;
+ if (vz != 0)
+ while (z9 < 1)
+ {
+ if (m5 >= 0)
+ rr += m5;
+
+ na = (long int *) &rr;
+ if (*na >= 0)
+ rr = 0;
+ }
+}
diff --git a/gcc/tree-ssa-sccvn.c b/gcc/tree-ssa-sccvn.c
index 57331ab44dc..3872168a4ed 100644
--- a/gcc/tree-ssa-sccvn.c
+++ b/gcc/tree-ssa-sccvn.c
@@ -5459,8 +5459,13 @@ eliminate_dom_walker::eliminate_stmt (basic_block b, gimple_stmt_iterator *gsi)
/* If this is an assignment from our leader (which
happens in the case the value-number is a constant)
- then there is nothing to do. */
- if (gimple_assign_single_p (stmt)
+ then there is nothing to do. Likewise if we run into
+ inserted code that needed a conversion because of
+ our type-agnostic value-numbering of loads. */
+ if ((gimple_assign_single_p (stmt)
+ || (is_gimple_assign (stmt)
+ && (CONVERT_EXPR_CODE_P (gimple_assign_rhs_code (stmt))
+ || gimple_assign_rhs_code (stmt) == VIEW_CONVERT_EXPR)))
&& sprime == gimple_assign_rhs1 (stmt))
return;
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。