aboutsummaryrefslogtreecommitdiff
path: root/9.3.0
diff options
context:
space:
mode:
authorSergei Trofimovich <slyfox@gentoo.org>2020-11-01 00:32:41 +0000
committerSergei Trofimovich <slyfox@gentoo.org>2020-11-01 00:32:41 +0000
commit3f9f4ffb0ee9da59e44ff405a872c00736fa7159 (patch)
treeb129bf9d3eb38926975d34ac0ffed736b759ff35 /9.3.0
parent9.3.0: backport IPA to_frequency() ICE (diff)
downloadgcc-patches-3f9f4ffb0ee9da59e44ff405a872c00736fa7159.tar.gz
gcc-patches-3f9f4ffb0ee9da59e44ff405a872c00736fa7159.tar.bz2
gcc-patches-3f9f4ffb0ee9da59e44ff405a872c00736fa7159.zip
9.3.0: backport assume_aligned fix (PR94163)
Reported-by: Ervin Peters Bug: https://bugs.gentoo.org/750905 Bug: https://gcc.gnu.org/PR94163 Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
Diffstat (limited to '9.3.0')
-rw-r--r--9.3.0/gentoo/32_all_assume-aligned.patch31
-rw-r--r--9.3.0/gentoo/README.history1
2 files changed, 32 insertions, 0 deletions
diff --git a/9.3.0/gentoo/32_all_assume-aligned.patch b/9.3.0/gentoo/32_all_assume-aligned.patch
new file mode 100644
index 0000000..10dffbb
--- /dev/null
+++ b/9.3.0/gentoo/32_all_assume-aligned.patch
@@ -0,0 +1,31 @@
+https://bugs.gentoo.org/750905
+https://gcc.gnu.org/PR94163
+
+From db3584552871c8caccdc22e97ea1573da9458253 Mon Sep 17 00:00:00 2001
+From: Richard Biener <rguenther@suse.de>
+Date: Fri, 13 Mar 2020 13:56:26 +0100
+Subject: [PATCH] tree-optimization/94163 constrain alignment set by PRE
+
+This avoids HWI -> unsigned truncation to end up with zero alignment
+which set_ptr_info_alignment ICEs on.
+
+2020-03-13 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/94163
+ * tree-ssa-pre.c (create_expression_by_pieces): Check
+ whether alignment would be zero.
+--- a/gcc/tree-ssa-pre.c
++++ b/gcc/tree-ssa-pre.c
+@@ -2810,7 +2810,8 @@ create_expression_by_pieces (basic_block block, pre_expr expr,
+ unsigned HOST_WIDE_INT hmisalign
+ = args.length () == 3 ? tree_to_uhwi (args[2]) : 0;
+ if ((halign & (halign - 1)) == 0
+- && (hmisalign & ~(halign - 1)) == 0)
++ && (hmisalign & ~(halign - 1)) == 0
++ && (unsigned int)halign != 0)
+ set_ptr_info_alignment (get_ptr_info (forcedname),
+ halign, hmisalign);
+ }
+--
+2.29.2
+
diff --git a/9.3.0/gentoo/README.history b/9.3.0/gentoo/README.history
index ff47a81..70b06c9 100644
--- a/9.3.0/gentoo/README.history
+++ b/9.3.0/gentoo/README.history
@@ -2,6 +2,7 @@
+ 30_all_plugin-objdump.patch
U 11_all_extra-options.patch
+ 31_all_ipa-to_frequency.patch
+ + 32_all_assume-aligned.patch
3 29 May 2020
+ 29_all_libcpp-ar.patch