https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78306
--- Comment #2 from Markus Fenske <iblue at gmx dot net> --- Thanks for the suggested workaround. Moving all the always_inline functions into a wrapper was no option, because it's not just memset but my code relies on avx intrinsics and would be dead slow if I would need a function all for every instruction. So I just removed the cilk sections in ipa-inline-analysis.c and ipa-inline.c and compiled my code with gcc-trunk. It compiles and produces the same results as with icc and clang. I'm not an expert in gcc code, but I would propose this patch to solve the issue: Index: gcc/ipa-inline-analysis.c =================================================================== --- gcc/ipa-inline-analysis.c (revision 242386) +++ gcc/ipa-inline-analysis.c (working copy) @@ -1507,9 +1507,6 @@ e->inline_failed = CIF_BODY_NOT_AVAILABLE; else if (callee->local.redefined_extern_inline) e->inline_failed = CIF_REDEFINED_EXTERN_INLINE; - else if (cfun && fn_contains_cilk_spawn_p (cfun)) - /* We can't inline if the function is spawing a function. */ - e->inline_failed = CIF_CILK_SPAWN; else e->inline_failed = CIF_FUNCTION_NOT_CONSIDERED; gcc_checking_assert (!e->call_stmt_cannot_inline_p Index: gcc/ipa-inline.c =================================================================== --- gcc/ipa-inline.c (revision 242386) +++ gcc/ipa-inline.c (working copy) @@ -368,11 +368,6 @@ e->inline_failed = CIF_FUNCTION_NOT_INLINABLE; inlinable = false; } - else if (inline_summaries->get (caller)->contains_cilk_spawn) - { - e->inline_failed = CIF_CILK_SPAWN; - inlinable = false; - } /* Don't inline a function with mismatched sanitization attributes. */ else if (!sanitize_attrs_match_for_inline_p (caller->decl, callee->decl)) {