diff options
author | Sergei Trofimovich <slyfox@gentoo.org> | 2020-07-03 23:12:10 +0100 |
---|---|---|
committer | Sergei Trofimovich <slyfox@gentoo.org> | 2020-07-03 23:12:10 +0100 |
commit | 6e1df9589fa94fb616529fbd7908b8f3076f1f19 (patch) | |
tree | ada1da75d935d03612fae9e4df6aacf69684b5de /10.1.0 | |
parent | 10.1.0: backport PR95508, ICE on array subscript implicit conversion (diff) | |
download | gcc-patches-6e1df9589fa94fb616529fbd7908b8f3076f1f19.tar.gz gcc-patches-6e1df9589fa94fb616529fbd7908b8f3076f1f19.tar.bz2 gcc-patches-6e1df9589fa94fb616529fbd7908b8f3076f1f19.zip |
10.1.0: Disable -fdelayed-branch by default.
From https://gcc.gnu.org/PR96015 / https://bugs.gentoo.org/729570.
delayed branches are known to generate invalid code around
__builtin_unreachable(); and mis-compiles python.
Use blunt hammer and disable delayed slots until we have better fix.
Reported-by: Jeroen Roovers
Bug: From https://gcc.gnu.org/PR96015
Bug: https://bugs.gentoo.org/729570.
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
Diffstat (limited to '10.1.0')
-rw-r--r-- | 10.1.0/gentoo/36_all_fno-delayed-branch.patch | 40 | ||||
-rw-r--r-- | 10.1.0/gentoo/README.history | 1 |
2 files changed, 41 insertions, 0 deletions
diff --git a/10.1.0/gentoo/36_all_fno-delayed-branch.patch b/10.1.0/gentoo/36_all_fno-delayed-branch.patch new file mode 100644 index 0000000..bc19974 --- /dev/null +++ b/10.1.0/gentoo/36_all_fno-delayed-branch.patch @@ -0,0 +1,40 @@ +From 6d0d3ae914bf19706550a539ef304c5875535ffc Mon Sep 17 00:00:00 2001 +From: Sergei Trofimovich <siarheit@google.com> +Date: Fri, 3 Jul 2020 22:50:33 +0100 +Subject: [PATCH] Disable -fdelayed-branch by default. + +From https://gcc.gnu.org/PR96015 / https://bugs.gentoo.org/729570. +delayed branches are known to generate invalid code around +__builtin_unreachable(); and mis-compiles python. + +Use blunt hammer and disable delayed slots until we have better fix. + +Reported-by: Jeroen Roovers +Bug: From https://gcc.gnu.org/PR96015 +Bug: https://bugs.gentoo.org/729570. +Signed-off-by: Sergei Trofimovich <siarheit@google.com> +--- + gcc/opts.c | 9 ++++++++- + 1 file changed, 8 insertions(+), 1 deletion(-) + +--- a/gcc/opts.c ++++ b/gcc/opts.c +@@ -458,7 +458,14 @@ static const struct default_options default_options_table[] = + /* -O1 (and not -Og) optimizations. */ + { OPT_LEVELS_1_PLUS_NOT_DEBUG, OPT_fbranch_count_reg, NULL, 1 }, + #if DELAY_SLOTS +- { OPT_LEVELS_1_PLUS_NOT_DEBUG, OPT_fdelayed_branch, NULL, 1 }, ++ /* ++ * From https://gcc.gnu.org/PR96015 / https://bugs.gentoo.org/729570. ++ * delayed branches are known to generate invalid code around ++ * __builtin_unreachable(); and mis-compiles python. ++ * ++ * Use blunt hammer and disable delayed slots until we have better fix. ++ */ ++ /* { OPT_LEVELS_1_PLUS_NOT_DEBUG, OPT_fdelayed_branch, NULL, 1 }, */ + #endif + { OPT_LEVELS_1_PLUS_NOT_DEBUG, OPT_fdse, NULL, 1 }, + { OPT_LEVELS_1_PLUS_NOT_DEBUG, OPT_fif_conversion, NULL, 1 }, +-- +2.27.0 + diff --git a/10.1.0/gentoo/README.history b/10.1.0/gentoo/README.history index 72e0086..6b6324c 100644 --- a/10.1.0/gentoo/README.history +++ b/10.1.0/gentoo/README.history @@ -2,6 +2,7 @@ 33_all_avx512-scalar-PR95528.patch 34_all_cet-cross-x86.patch 35_all_ICE-array-subscript-PR95508.patch + 36_all_fno-delayed-branch.patch 2 11 June 2020 + 29_all_fix-float-hang-PR95118.patch |