aboutsummaryrefslogtreecommitdiff
path: root/gcc/builtins.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/builtins.c')
-rw-r--r--gcc/builtins.c23
1 files changed, 9 insertions, 14 deletions
diff --git a/gcc/builtins.c b/gcc/builtins.c
index 0db91bd4f98..2396b6df848 100644
--- a/gcc/builtins.c
+++ b/gcc/builtins.c
@@ -496,20 +496,14 @@ expand_builtin_return_addr (enum built_in_function fndecl_code, int count)
#else
rtx tem;
- /* For a zero count, we don't care what frame address we return, so frame
- pointer elimination is OK, and using the soft frame pointer is OK.
- For a non-zero count, we require a stable offset from the current frame
- pointer to the previous one, so we must use the hard frame pointer, and
- we must disable frame pointer elimination. */
- if (count == 0)
- tem = frame_pointer_rtx;
- else
- {
- tem = hard_frame_pointer_rtx;
+ /* We require a stable offset from the current frame pointer to the
+ previous one, so we must use the hard frame pointer, and we must
+ disable frame pointer elimination. */
- /* Tell reload not to eliminate the frame pointer. */
- current_function_accesses_prior_frames = 1;
- }
+ tem = hard_frame_pointer_rtx;
+
+ /* Tell reload not to eliminate the frame pointer. */
+ current_function_accesses_prior_frames = 1;
#endif
/* Some machines need special handling before we can access
@@ -6562,7 +6556,8 @@ fold_builtin_constant_p (tree arglist)
if (TREE_SIDE_EFFECTS (arglist)
|| AGGREGATE_TYPE_P (TREE_TYPE (arglist))
|| POINTER_TYPE_P (TREE_TYPE (arglist))
- || cfun == 0)
+ || cfun == 0
+ || folding_initializer)
return integer_zero_node;
return 0;