This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug ipa/83346] inliner crash with always inline and templates
- From: "andi-gcc at firstfloor dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 09 Dec 2017 21:39:24 +0000
- Subject: [Bug ipa/83346] inliner crash with always inline and templates
- Auto-submitted: auto-generated
- References: <bug-83346-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83346
--- Comment #1 from Andi Kleen <andi-gcc at firstfloor dot org> ---
This fixes it. Don't know why that node has no decl.
Will submit after a test cycle.
diff --git a/gcc/ipa-inline.c b/gcc/ipa-inline.c
index 7846e93d119..dcd8a3de1ac 100644
--- a/gcc/ipa-inline.c
+++ b/gcc/ipa-inline.c
@@ -2391,7 +2391,8 @@ ipa_inline (void)
entry of cycles, possibly cloning that entry point and
try to flatten itself turning it into a self-recursive
function. */
- if (lookup_attribute ("flatten",
+ if (node->decl
+ && lookup_attribute ("flatten",
DECL_ATTRIBUTES (node->decl)) != NULL)
{
if (dump_file)