commit: 28c80aeb200a8269ab50dfd079e5a0999a84a403 Author: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org> AuthorDate: Sun Nov 8 11:44:36 2020 +0000 Commit: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org> CommitDate: Sun Nov 8 11:44:36 2020 +0000 URL: https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=28c80aeb
8.4.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 <AT> gentoo.org> 8.4.0/gentoo/32_all_assume-aligned.patch | 31 +++++++++++++++++++++++++++++++ 8.4.0/gentoo/README.history | 7 ++++--- 2 files changed, 35 insertions(+), 3 deletions(-) diff --git a/8.4.0/gentoo/32_all_assume-aligned.patch b/8.4.0/gentoo/32_all_assume-aligned.patch new file mode 100644 index 0000000..10dffbb --- /dev/null +++ b/8.4.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 <[email protected]> +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 <[email protected]> + + 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/8.4.0/gentoo/README.history b/8.4.0/gentoo/README.history index e072ed5..a4cf80f 100644 --- a/8.4.0/gentoo/README.history +++ b/8.4.0/gentoo/README.history @@ -1,12 +1,13 @@ -3 TODO +3 TODO + 31_all_plugin-objdump.patch U 11_all_extra-options.patch + + 32_all_assume-aligned.patch -2 29 May 2020 +2 29 May 2020 + 29_all_libcpp-ar.patch + 30_all_alignof-failure-PR90736.patch -1 03 Mar 2020 +1 03 Mar 2020 + 01_all_default-fortify-source.patch + 02_all_default-warn-format-security.patch + 03_all_default-warn-trampolines.patch
