Add backport-fix-ICE-during-GIMPLE-pass-dse.patch

This commit is contained in:
jdkboy 2020-09-09 20:25:28 +08:00
parent e7b1ace600
commit c173441849
2 changed files with 23 additions and 1 deletions

View File

@ -0,0 +1,17 @@
diff -Nurp a/gcc/tree-ssa-dse.c b/gcc/tree-ssa-dse.c
--- a/gcc/tree-ssa-dse.c 2020-09-09 15:47:21 084000000 +800
+++ b/gcc/tree-ssa-dse.c 2020-09-09 15:47:34 740000000 +800
@@ -119,10 +119,11 @@ initialize_ao_ref_for_dse (gimple *stmt,
{
tree nelem = gimple_call_arg (stmt, 0);
tree selem = gimple_call_arg (stmt, 1);
+ tree lhs;
if (TREE_CODE (nelem) == INTEGER_CST
- && TREE_CODE (selem) == INTEGER_CST)
+ && TREE_CODE (selem) == INTEGER_CST
+ && (lhs = gimple_call_lhs (stmt)) != NULL_TREE)
{
- tree lhs = gimple_call_lhs (stmt);
tree size = fold_build2 (MULT_EXPR, TREE_TYPE (nelem),
nelem, selem);
ao_ref_init_from_ptr_and_size (write, lhs, size);

View File

@ -1,4 +1,4 @@
%global DATE 20200905
%global DATE 20200909
%global gcc_version 9.3.1
%global gcc_major 9.3.1
@ -175,6 +175,7 @@ Patch60: fix-load-eliding-in-SM.patch
Patch61: fix-SSA-update-for-vectorizer-epilogue.patch
Patch62: fix-ICE-when-vectorizing-nested-cycles.patch
Patch63: fix-avoid-bogus-uninit-warning-with-store-motion.patch
Patch64: backport-fix-ICE-during-GIMPLE-pass-dse.patch
%global gcc_target_platform %{_arch}-linux-gnu
@ -681,6 +682,7 @@ not stable, so plugins must be rebuilt any time GCC is updated.
%patch61 -p1
%patch62 -p1
%patch63 -p1
%patch64 -p1
%build
@ -2609,6 +2611,9 @@ end
%doc rpm.doc/changelogs/libcc1/ChangeLog*
%changelog
* Wed Spe 09 2020 jdkboy <guoge1@huawei.com> - 9.3.1-20200909.5
- add backport-fix-ICE-during-GIMPLE-pass-dse.patch
* Sat Sep 05 2020 eastb233 <xiezhiheng@huawei.com> - 9.3.1-20200905.4
- fix-avoid-bogus-uninit-warning-with-store-motion.patch: New file