commit: fafbb4148cb5c2cf7e1ae02679240cba43e95992 Author: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org> AuthorDate: Mon Jul 27 06:48:54 2020 +0000 Commit: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org> CommitDate: Mon Jul 27 06:48:54 2020 +0000 URL: https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=fafbb414
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 <AT> gentoo.org> 10.2.0/gentoo/34_all_fundecl-ICE-PR95820.patch | 25 +++++++++++++++++++++++++ 10.2.0/gentoo/README.history | 1 + 2 files changed, 26 insertions(+) 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