aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergei Trofimovich <slyfox@gentoo.org>2020-07-27 07:48:54 +0100
committerSergei Trofimovich <slyfox@gentoo.org>2020-07-27 07:48:54 +0100
commitfafbb4148cb5c2cf7e1ae02679240cba43e95992 (patch)
tree4bdd636ac0186bc7e73f25b48126379a9e9b2b91
parent10.2.0: fix IPA ICE on LTO -O0/-O2 mix (diff)
downloadgcc-patches-fafbb4148cb5c2cf7e1ae02679240cba43e95992.tar.gz
gcc-patches-fafbb4148cb5c2cf7e1ae02679240cba43e95992.tar.bz2
gcc-patches-fafbb4148cb5c2cf7e1ae02679240cba43e95992.zip
10.2.0: backport ICE on invalid function declarations
Reported-by: Jack Ostroff Bug: https://bugs.gentoo.org/730406 Bug: https://gcc.gnu.org/PR95820 Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
-rw-r--r--10.2.0/gentoo/34_all_fundecl-ICE-PR95820.patch25
-rw-r--r--10.2.0/gentoo/README.history1
2 files changed, 26 insertions, 0 deletions
diff --git a/10.2.0/gentoo/34_all_fundecl-ICE-PR95820.patch b/10.2.0/gentoo/34_all_fundecl-ICE-PR95820.patch
new file mode 100644
index 0000000..e365420
--- /dev/null
+++ b/10.2.0/gentoo/34_all_fundecl-ICE-PR95820.patch
@@ -0,0 +1,25 @@
+It's an unofficial backport of PR95820 where gcc ICEs on
+invalid syntax. As creduce frequently end up in these ICEs
+as in #730406 let's backport it to gcc-10.
+
+https://gcc.gnu.org/PR95820
+https://bugs.gentoo.org/730406
+--- a/gcc/cp/decl.c
++++ b/gcc/cp/decl.c
+@@ -12029,14 +12029,11 @@ grokdeclarator (const cp_declarator *declarator,
+
+ /* Handle a late-specified return type. */
+ tree late_return_type = declarator->u.function.late_return_type;
+- if (funcdecl_p
+- /* This is the case e.g. for
+- using T = auto () -> int. */
+- || inner_declarator == NULL)
++ if (true)
+ {
+ if (tree auto_node = type_uses_auto (type))
+ {
+- if (!late_return_type)
++ if (!late_return_type && funcdecl_p)
+ {
+ if (current_class_type
+ && LAMBDA_TYPE_P (current_class_type))
diff --git a/10.2.0/gentoo/README.history b/10.2.0/gentoo/README.history
index 1c0fff9..7cde6a3 100644
--- a/10.2.0/gentoo/README.history
+++ b/10.2.0/gentoo/README.history
@@ -1,5 +1,6 @@
2 TODO
+ 33_all_lto-O0-mix-ICE-ipa-PR96291.patch
+ + 34_all_fundecl-ICE-PR95820.patch
1 23 July 2020
+ 01_all_default-fortify-source.patch