diff options
Diffstat (limited to 'gcc/tree-inline.c')
-rw-r--r-- | gcc/tree-inline.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/gcc/tree-inline.c b/gcc/tree-inline.c index 59a2d7237c9..efa6e310e98 100644 --- a/gcc/tree-inline.c +++ b/gcc/tree-inline.c @@ -1017,6 +1017,17 @@ inline_forbidden_p_1 (tree *nodep, int *walk_subtrees ATTRIBUTE_UNUSED, "it uses non-local goto"); return node; + case BUILT_IN_RETURN: + case BUILT_IN_APPLY_ARGS: + /* If a __builtin_apply_args caller would be inlined, + it would be saving arguments of the function it has + been inlined into. Similarly __builtin_return would + return from the function the inline has been inlined into. */ + inline_forbidden_reason + = N_("%Jfunction %qF can never be inlined because " + "it uses __builtin_return or __builtin_apply_args"); + return node; + default: break; } |