diff options
Diffstat (limited to 'gcc/ipa-reference.c')
-rw-r--r-- | gcc/ipa-reference.c | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/gcc/ipa-reference.c b/gcc/ipa-reference.c index b1ff849082e..af6dac7c9db 100644 --- a/gcc/ipa-reference.c +++ b/gcc/ipa-reference.c @@ -436,18 +436,13 @@ static void check_call (ipa_reference_local_vars_info_t local, tree call_expr) { int flags = call_expr_flags (call_expr); - tree operand_list = TREE_OPERAND (call_expr, 1); tree operand; tree callee_t = get_callee_fndecl (call_expr); enum availability avail = AVAIL_NOT_AVAILABLE; + call_expr_arg_iterator iter; - for (operand = operand_list; - operand != NULL_TREE; - operand = TREE_CHAIN (operand)) - { - tree argument = TREE_VALUE (operand); - check_rhs_var (local, argument); - } + FOR_EACH_CALL_EXPR_ARG (operand, iter, call_expr) + check_rhs_var (local, operand); if (callee_t) { @@ -534,7 +529,14 @@ scan_for_static_refs (tree *tp, case ADDR_EXPR: check_rhs_var (local, rhs); break; - case CALL_EXPR: + default: + break; + } + break; + case tcc_vl_exp: + switch (TREE_CODE (rhs)) + { + case CALL_EXPR: check_call (local, rhs); break; default: |