From c1734418493f87970e5c0231ceb10d96e148e1d6 Mon Sep 17 00:00:00 2001 From: jdkboy Date: Wed, 9 Sep 2020 20:25:28 +0800 Subject: [PATCH] Add backport-fix-ICE-during-GIMPLE-pass-dse.patch --- backport-fix-ICE-during-GIMPLE-pass-dse.patch | 17 +++++++++++++++++ gcc.spec | 7 ++++++- 2 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 backport-fix-ICE-during-GIMPLE-pass-dse.patch diff --git a/backport-fix-ICE-during-GIMPLE-pass-dse.patch b/backport-fix-ICE-during-GIMPLE-pass-dse.patch new file mode 100644 index 0000000..ca9076b --- /dev/null +++ b/backport-fix-ICE-during-GIMPLE-pass-dse.patch @@ -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); diff --git a/gcc.spec b/gcc.spec index fb81909..a6ab022 100644 --- a/gcc.spec +++ b/gcc.spec @@ -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 - 9.3.1-20200909.5 +- add backport-fix-ICE-during-GIMPLE-pass-dse.patch + * Sat Sep 05 2020 eastb233 - 9.3.1-20200905.4 - fix-avoid-bogus-uninit-warning-with-store-motion.patch: New file -- Gitee