aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-ccp.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/tree-ssa-ccp.c')
-rw-r--r--gcc/tree-ssa-ccp.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/tree-ssa-ccp.c b/gcc/tree-ssa-ccp.c
index a4869d2..03c3500 100644
--- a/gcc/tree-ssa-ccp.c
+++ b/gcc/tree-ssa-ccp.c
@@ -3203,7 +3203,10 @@ optimize_stack_restore (gimple_stmt_iterator i)
continue;
callee = gimple_call_fndecl (stmt);
- if (!callee || DECL_BUILT_IN_CLASS (callee) != BUILT_IN_NORMAL)
+ if (!callee
+ || DECL_BUILT_IN_CLASS (callee) != BUILT_IN_NORMAL
+ /* All regular builtins are ok, just obviously not alloca. */
+ || DECL_FUNCTION_CODE (callee) == BUILT_IN_ALLOCA)
return NULL_TREE;
if (DECL_FUNCTION_CODE (callee) == BUILT_IN_STACK_RESTORE)