https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82801
--- Comment #3 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
node->decl is NULL, so perhaps:
diff --git a/gcc/ipa-inline.c b/gcc/ipa-inline.c
index b8e65e2fa7ec..1713c41d4369 100644
--- a/gcc/ipa-inline.c
+++ b/gcc/ipa-inline.c
@@ -2425,7 +2425,7 @@ 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)