diff options
Diffstat (limited to 'gcc/builtins.c')
-rw-r--r-- | gcc/builtins.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/gcc/builtins.c b/gcc/builtins.c index 50d4b62..bb43ab6 100644 --- a/gcc/builtins.c +++ b/gcc/builtins.c @@ -11558,6 +11558,13 @@ expand_builtin_memory_chk (tree exp, rtx target, enum machine_mode mode, return NULL_RTX; fn = build_call_expr (fn, 3, dest, src, len); + STRIP_TYPE_NOPS (fn); + while (TREE_CODE (fn) == COMPOUND_EXPR) + { + expand_expr (TREE_OPERAND (fn, 0), const0_rtx, VOIDmode, + EXPAND_NORMAL); + fn = TREE_OPERAND (fn, 1); + } if (TREE_CODE (fn) == CALL_EXPR) CALL_EXPR_TAILCALL (fn) = CALL_EXPR_TAILCALL (exp); return expand_expr (fn, target, mode, EXPAND_NORMAL); @@ -11606,6 +11613,13 @@ expand_builtin_memory_chk (tree exp, rtx target, enum machine_mode mode, if (!fn) return NULL_RTX; fn = build_call_expr (fn, 4, dest, src, len, size); + STRIP_TYPE_NOPS (fn); + while (TREE_CODE (fn) == COMPOUND_EXPR) + { + expand_expr (TREE_OPERAND (fn, 0), const0_rtx, VOIDmode, + EXPAND_NORMAL); + fn = TREE_OPERAND (fn, 1); + } if (TREE_CODE (fn) == CALL_EXPR) CALL_EXPR_TAILCALL (fn) = CALL_EXPR_TAILCALL (exp); return expand_expr (fn, target, mode, EXPAND_NORMAL); |