From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2049) id 6CE3C3856DFA; Thu, 5 May 2022 12:07:47 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6CE3C3856DFA MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="utf-8" From: Matthew Malcomson To: gcc-cvs@gcc.gnu.org Subject: [gcc(refs/vendors/ARM/heads/morello)] Add CASE_ADDR_EXPR X-Act-Checkin: gcc X-Git-Author: Richard Sandiford X-Git-Refname: refs/vendors/ARM/heads/morello X-Git-Oldrev: 03dec41d28bab047daa0a2423218219fa5144d0a X-Git-Newrev: c4c26e1b3b991ed9de32ee233f5bed82edd8e01d Message-Id: <20220505120747.6CE3C3856DFA@sourceware.org> Date: Thu, 5 May 2022 12:07:47 +0000 (GMT) X-BeenThere: gcc-cvs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 May 2022 12:07:47 -0000 https://gcc.gnu.org/g:c4c26e1b3b991ed9de32ee233f5bed82edd8e01d commit c4c26e1b3b991ed9de32ee233f5bed82edd8e01d Author: Richard Sandiford Date: Mon Apr 11 17:27:30 2022 +0100 Add CASE_ADDR_EXPR Mechanically replace: case ADDR_EXPR: with: CASE_ADDR_EXPR: similarly to how CASE_CONVERT_EXPR handles both CONVERT_EXPR and NOP_EXPR. Doing this requires a few extra labels and gotos to avoid “might fall through” warnings (arguably a bug in the warnings, but not something to fix now). Diff: --- gcc/ada/gcc-interface/trans.c | 4 ++-- gcc/ada/gcc-interface/utils2.c | 6 +++--- gcc/analyzer/region-model.cc | 4 ++-- gcc/c-family/c-common.c | 7 ++++--- gcc/c-family/c-pretty-print.c | 6 +++--- gcc/c-family/c-warn.c | 2 +- gcc/c/c-fold.c | 2 +- gcc/c/c-typeck.c | 10 +++++----- gcc/cfgexpand.c | 2 +- gcc/cgraphbuild.c | 2 +- gcc/config/pa/pa.c | 2 +- gcc/cp/call.c | 8 ++++---- gcc/cp/class.c | 4 ++-- gcc/cp/constexpr.c | 4 ++-- gcc/cp/cp-gimplify.c | 4 ++-- gcc/cp/cp-ubsan.c | 2 +- gcc/cp/error.c | 2 +- gcc/cp/expr.c | 2 +- gcc/cp/parser.c | 2 +- gcc/cp/pt.c | 10 +++++----- gcc/cp/typeck.c | 8 +++++--- gcc/d/d-codegen.cc | 6 +++--- gcc/d/d-convert.cc | 2 +- gcc/d/d-gimplify.cc | 2 +- gcc/dojump.c | 2 +- gcc/dwarf2out.c | 2 +- gcc/expr.c | 4 ++-- gcc/fold-const.c | 12 ++++++------ gcc/gimple-ssa-sprintf.c | 2 +- gcc/gimplify.c | 2 +- gcc/graphite-scop-detection.c | 4 ++-- gcc/ipa-icf.c | 2 +- gcc/jit/jit-playback.c | 2 +- gcc/symtab.c | 2 +- gcc/tree-affine.c | 4 ++-- gcc/tree-cfg.c | 2 +- gcc/tree-data-ref.c | 2 +- gcc/tree-dump.c | 2 +- gcc/tree-emutls.c | 2 +- gcc/tree-nested.c | 6 +++--- gcc/tree-pretty-print.c | 8 ++++---- gcc/tree-scalar-evolution.c | 6 +++--- gcc/tree-sra.c | 2 +- gcc/tree-ssa-ccp.c | 2 +- gcc/tree-ssa-loop-ivopts.c | 6 +++--- gcc/tree-ssa-loop.c | 4 ++-- gcc/tree-ssa-operands.c | 2 +- gcc/tree-ssa-pre.c | 2 +- gcc/tree-ssa-propagate.c | 2 +- gcc/tree-ssa-sccvn.c | 8 ++++---- gcc/tree-ssa-strlen.c | 6 ++++-- gcc/tree-ssa-structalias.c | 2 +- gcc/tree.c | 8 ++++---- gcc/tree.h | 4 ++++ gcc/varasm.c | 12 ++++++------ 55 files changed, 119 insertions(+), 110 deletions(-) diff --git a/gcc/ada/gcc-interface/trans.c b/gcc/ada/gcc-interface/trans.c index 64ec73b35ee..7677531d742 100644 --- a/gcc/ada/gcc-interface/trans.c +++ b/gcc/ada/gcc-interface/trans.c @@ -8703,7 +8703,7 @@ gnat_gimplify_expr (tree *expr_p, gimple_seq *pre_p, *expr_p = TREE_OPERAND (*expr_p, 0); return GS_OK; - case ADDR_EXPR: + CASE_ADDR_EXPR: op = TREE_OPERAND (expr, 0); /* If we are taking the address of a constant CONSTRUCTOR, make sure it @@ -9840,7 +9840,7 @@ addressable_p (tree gnu_expr, tree gnu_type) return TREE_STATIC (gnu_expr) ? true : false; case NULL_EXPR: - case ADDR_EXPR: + CASE_ADDR_EXPR: case SAVE_EXPR: case CALL_EXPR: case PLUS_EXPR: diff --git a/gcc/ada/gcc-interface/utils2.c b/gcc/ada/gcc-interface/utils2.c index 27817e897a7..6df4f6c5cc8 100644 --- a/gcc/ada/gcc-interface/utils2.c +++ b/gcc/ada/gcc-interface/utils2.c @@ -167,7 +167,7 @@ known_alignment (tree exp) this_alignment = known_alignment (TREE_OPERAND (exp, 1)); break; - case ADDR_EXPR: + CASE_ADDR_EXPR: if (DECL_P (TREE_OPERAND (exp, 0))) this_alignment = DECL_ALIGN (TREE_OPERAND (exp, 0)); else @@ -1368,7 +1368,7 @@ build_unary_op (enum tree_code op_code, tree result_type, tree operand) break; case ATTR_ADDR_EXPR: - case ADDR_EXPR: + CASE_ADDR_EXPR: switch (TREE_CODE (operand)) { case INDIRECT_REF: @@ -2467,7 +2467,7 @@ gnat_mark_addressable (tree t) while (true) switch (TREE_CODE (t)) { - case ADDR_EXPR: + CASE_ADDR_EXPR: case COMPONENT_REF: case ARRAY_REF: case ARRAY_RANGE_REF: diff --git a/gcc/analyzer/region-model.cc b/gcc/analyzer/region-model.cc index decd702dc4c..e02fe0c4dec 100644 --- a/gcc/analyzer/region-model.cc +++ b/gcc/analyzer/region-model.cc @@ -418,7 +418,7 @@ region_model::get_gassign_result (const gassign *assign, set_value (lvalue (LHS), rvalue (EXPR)) for various EXPR. We already have the lvalue for the LHS above, as "lhs_reg". */ - case ADDR_EXPR: /* LHS = &RHS; */ + CASE_ADDR_EXPR: /* LHS = &RHS; */ case BIT_FIELD_REF: case COMPONENT_REF: /* LHS = op0.op1; */ case MEM_REF: @@ -1098,7 +1098,7 @@ region_model::get_rvalue_1 (path_var pv, region_model_context *ctxt) default: return m_mgr->get_or_create_unknown_svalue (TREE_TYPE (pv.m_tree)); - case ADDR_EXPR: + CASE_ADDR_EXPR: { /* "&EXPR". */ tree expr = pv.m_tree; diff --git a/gcc/c-family/c-common.c b/gcc/c-family/c-common.c index f4367a86c67..9571980ec33 100644 --- a/gcc/c-family/c-common.c +++ b/gcc/c-family/c-common.c @@ -1991,7 +1991,7 @@ verify_tree (tree x, struct tlist **pbefore_sp, struct tlist **pno_sp, return; } - case ADDR_EXPR: + CASE_ADDR_EXPR: x = TREE_OPERAND (x, 0); if (DECL_P (x)) return; @@ -3427,9 +3427,10 @@ c_common_truthvalue_conversion (location_t location, tree expr) case FUNCTION_DECL: expr = build_unary_op (location, ADDR_EXPR, expr, false); - /* Fall through. */ + goto addr_expr; - case ADDR_EXPR: + CASE_ADDR_EXPR: + addr_expr: { tree inner = TREE_OPERAND (expr, 0); if (decl_with_nonnull_addr_p (inner)) diff --git a/gcc/c-family/c-pretty-print.c b/gcc/c-family/c-pretty-print.c index 2b20b218651..8fc96a486bd 100644 --- a/gcc/c-family/c-pretty-print.c +++ b/gcc/c-family/c-pretty-print.c @@ -1673,7 +1673,7 @@ c_pretty_printer::postfix_expression (tree e) pp_c_right_paren (this); break; - case ADDR_EXPR: + CASE_ADDR_EXPR: if (TREE_CODE (TREE_OPERAND (e, 0)) == FUNCTION_DECL) { id_expression (TREE_OPERAND (e, 0)); @@ -1758,7 +1758,7 @@ c_pretty_printer::unary_expression (tree e) unary_expression (TREE_OPERAND (e, 0)); break; - case ADDR_EXPR: + CASE_ADDR_EXPR: case INDIRECT_REF: case NEGATE_EXPR: case BIT_NOT_EXPR: @@ -2245,7 +2245,7 @@ c_pretty_printer::expression (tree e) break; case CONJ_EXPR: - case ADDR_EXPR: + CASE_ADDR_EXPR: case INDIRECT_REF: case MEM_REF: case NEGATE_EXPR: diff --git a/gcc/c-family/c-warn.c b/gcc/c-family/c-warn.c index 1259211e9da..1963847ff33 100644 --- a/gcc/c-family/c-warn.c +++ b/gcc/c-family/c-warn.c @@ -3054,7 +3054,7 @@ check_and_warn_address_or_pointer_of_packed_member (tree type, tree rhs) { switch (TREE_CODE (rhs)) { - case ADDR_EXPR: + CASE_ADDR_EXPR: /* Address is taken. */ case PARM_DECL: case VAR_DECL: diff --git a/gcc/c/c-fold.c b/gcc/c/c-fold.c index a022a64c563..32a6f4cb464 100644 --- a/gcc/c/c-fold.c +++ b/gcc/c/c-fold.c @@ -447,7 +447,7 @@ c_fully_fold_internal (tree expr, bool in_init, bool *maybe_const_operands, } goto out; - case ADDR_EXPR: + CASE_ADDR_EXPR: op0_lval = true; goto unary; case REALPART_EXPR: diff --git a/gcc/c/c-typeck.c b/gcc/c/c-typeck.c index 454dae790e0..3b33cc98e72 100644 --- a/gcc/c/c-typeck.c +++ b/gcc/c/c-typeck.c @@ -1980,7 +1980,7 @@ mark_exp_read (tree exp) case REALPART_EXPR: case IMAGPART_EXPR: CASE_CONVERT: - case ADDR_EXPR: + CASE_ADDR_EXPR: case VIEW_CONVERT_EXPR: mark_exp_read (TREE_OPERAND (exp, 0)); break; @@ -4415,7 +4415,7 @@ build_unary_op (location_t location, enum tree_code code, tree xarg, { switch (code) { - case ADDR_EXPR: + CASE_ADDR_EXPR: case PREINCREMENT_EXPR: case POSTINCREMENT_EXPR: case PREDECREMENT_EXPR: @@ -4795,7 +4795,7 @@ build_unary_op (location_t location, enum tree_code code, tree xarg, goto return_build_unary_op; } - case ADDR_EXPR: + CASE_ADDR_EXPR: /* Note that this operation never does default_conversion. */ /* The operand of unary '&' must be an lvalue (which excludes @@ -5054,7 +5054,7 @@ c_mark_addressable (tree exp, bool array_ref_p) return true; /* FALLTHRU */ case COMPONENT_REF: - case ADDR_EXPR: + CASE_ADDR_EXPR: case ARRAY_REF: case REALPART_EXPR: case IMAGPART_EXPR: @@ -10990,7 +10990,7 @@ c_finish_return (location_t loc, tree retval, tree origtype) continue; } - case ADDR_EXPR: + CASE_ADDR_EXPR: inner = TREE_OPERAND (inner, 0); while (REFERENCE_CLASS_P (inner) diff --git a/gcc/cfgexpand.c b/gcc/cfgexpand.c index e86ed48239a..b3a65140fe8 100644 --- a/gcc/cfgexpand.c +++ b/gcc/cfgexpand.c @@ -4988,7 +4988,7 @@ expand_debug_expr (tree exp) return gen_rtx_CONCAT (mode, re, im); } - case ADDR_EXPR: + CASE_ADDR_EXPR: op0 = expand_debug_expr (TREE_OPERAND (exp, 0)); if (!op0 || !MEM_P (op0)) { diff --git a/gcc/cgraphbuild.c b/gcc/cgraphbuild.c index d5dd270d525..98f8dbf1790 100644 --- a/gcc/cgraphbuild.c +++ b/gcc/cgraphbuild.c @@ -65,7 +65,7 @@ record_reference (tree *tp, int *walk_subtrees, void *data) break; case FDESC_EXPR: - case ADDR_EXPR: + CASE_ADDR_EXPR: /* Record dereferences to the functions. This makes the functions reachable unconditionally. */ decl = get_base_var (*tp); diff --git a/gcc/config/pa/pa.c b/gcc/config/pa/pa.c index cb888528765..cc59c54fccc 100644 --- a/gcc/config/pa/pa.c +++ b/gcc/config/pa/pa.c @@ -2439,7 +2439,7 @@ pa_reloc_needed (tree exp) switch (TREE_CODE (exp)) { - case ADDR_EXPR: + CASE_ADDR_EXPR: return 1; case POINTER_PLUS_EXPR: diff --git a/gcc/cp/call.c b/gcc/cp/call.c index fafb93b3c1f..90e72c827d3 100644 --- a/gcc/cp/call.c +++ b/gcc/cp/call.c @@ -3192,7 +3192,7 @@ add_builtin_candidates (struct z_candidate **candidates, enum tree_code code, boolean_type_node, args, argtypes, flags, complain); return; - case ADDR_EXPR: + CASE_ADDR_EXPR: case COMPOUND_EXPR: case COMPONENT_REF: case CO_AWAIT_EXPR: @@ -6216,7 +6216,7 @@ build_new_op_1 (const op_location_t &loc, enum tree_code code, int flags, switch (code) { case COMPOUND_EXPR: - case ADDR_EXPR: + CASE_ADDR_EXPR: /* For these, the built-in candidates set is empty [over.match.oper]/3. We don't want non-strict matches because exact matches are always possible with built-in @@ -6269,7 +6269,7 @@ build_new_op_1 (const op_location_t &loc, enum tree_code code, int flags, break; /* The caller will deal with these. */ - case ADDR_EXPR: + CASE_ADDR_EXPR: case COMPOUND_EXPR: case COMPONENT_REF: case CO_AWAIT_EXPR: @@ -6579,7 +6579,7 @@ build_new_op_1 (const op_location_t &loc, enum tree_code code, int flags, arg2, complain); /* The caller will deal with these. */ - case ADDR_EXPR: + CASE_ADDR_EXPR: case COMPONENT_REF: case COMPOUND_EXPR: return NULL_TREE; diff --git a/gcc/cp/class.c b/gcc/cp/class.c index 6c572bf8486..4658e248119 100644 --- a/gcc/cp/class.c +++ b/gcc/cp/class.c @@ -7734,7 +7734,7 @@ fixed_type_or_null (tree instance, int *nonnull, int *cdtorp) CASE_CONVERT: return RECUR (TREE_OPERAND (instance, 0)); - case ADDR_EXPR: + CASE_ADDR_EXPR: instance = TREE_OPERAND (instance, 0); if (nonnull) { @@ -8635,7 +8635,7 @@ instantiate_type (tree lhstype, tree rhs, tsubst_flags_t complain) /*explicit_targs=*/NULL_TREE, access_path); - case ADDR_EXPR: + CASE_ADDR_EXPR: { if (PTRMEM_OK_P (rhs)) complain |= tf_ptrmem_ok; diff --git a/gcc/cp/constexpr.c b/gcc/cp/constexpr.c index 8528212788b..d57844e5824 100644 --- a/gcc/cp/constexpr.c +++ b/gcc/cp/constexpr.c @@ -5996,7 +5996,7 @@ cxx_eval_constant_expression (const constexpr_ctx *ctx, tree t, non_constant_p, overflow_p); break; - case ADDR_EXPR: + CASE_ADDR_EXPR: { tree oldop = TREE_OPERAND (t, 0); tree op = cxx_eval_constant_expression (ctx, oldop, @@ -7697,7 +7697,7 @@ potential_constant_expression_1 (tree t, bool want_rval, bool strict, bool now, t = TREE_OPERAND (t, 0); goto handle_addr_expr; - case ADDR_EXPR: + CASE_ADDR_EXPR: /* -- a unary operator & that is applied to an lvalue that designates an object with thread or automatic storage duration; */ diff --git a/gcc/cp/cp-gimplify.c b/gcc/cp/cp-gimplify.c index d2cc4ac26db..b84e255b8b3 100644 --- a/gcc/cp/cp-gimplify.c +++ b/gcc/cp/cp-gimplify.c @@ -1300,7 +1300,7 @@ cp_genericize_r (tree *stmt_p, int *walk_subtrees, void *data) switch (TREE_CODE (stmt)) { - case ADDR_EXPR: + CASE_ADDR_EXPR: if (is_invisiref_parm (TREE_OPERAND (stmt, 0))) { /* If in an OpenMP context, note var uses. */ @@ -2620,7 +2620,7 @@ cp_fold (tree x) } goto unary; - case ADDR_EXPR: + CASE_ADDR_EXPR: loc = EXPR_LOCATION (x); op0 = cp_fold_maybe_rvalue (TREE_OPERAND (x, 0), false); diff --git a/gcc/cp/cp-ubsan.c b/gcc/cp/cp-ubsan.c index 95d47a01f13..7c8a1fb6375 100644 --- a/gcc/cp/cp-ubsan.c +++ b/gcc/cp/cp-ubsan.c @@ -203,7 +203,7 @@ cp_ubsan_check_member_access_r (tree *stmt_p, int *walk_subtrees, void *data) = (cp_ubsan_check_member_access_data *) data; switch (TREE_CODE (stmt)) { - case ADDR_EXPR: + CASE_ADDR_EXPR: t = TREE_OPERAND (stmt, 0); while ((TREE_CODE (t) == MEM_REF || INDIRECT_REF_P (t)) && ADDR_EXPR_P (TREE_OPERAND (t, 0))) diff --git a/gcc/cp/error.c b/gcc/cp/error.c index 6bb407484b8..5db65b8d016 100644 --- a/gcc/cp/error.c +++ b/gcc/cp/error.c @@ -2340,7 +2340,7 @@ dump_expr (cxx_pretty_printer *pp, tree t, int flags) dump_unary_op (pp, "+", t, flags); break; - case ADDR_EXPR: + CASE_ADDR_EXPR: if (TREE_CODE (TREE_OPERAND (t, 0)) == FUNCTION_DECL || TREE_CODE (TREE_OPERAND (t, 0)) == STRING_CST /* An ADDR_EXPR can have reference type. In that case, we diff --git a/gcc/cp/expr.c b/gcc/cp/expr.c index a6ab96af614..352faeb4540 100644 --- a/gcc/cp/expr.c +++ b/gcc/cp/expr.c @@ -370,7 +370,7 @@ mark_exp_read (tree exp) case REALPART_EXPR: case IMAGPART_EXPR: CASE_CONVERT: - case ADDR_EXPR: + CASE_ADDR_EXPR: case INDIRECT_REF: case FLOAT_EXPR: case NON_DEPENDENT_EXPR: diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c index 2a41821ab2e..1bf67cc1a5d 100644 --- a/gcc/cp/parser.c +++ b/gcc/cp/parser.c @@ -8580,7 +8580,7 @@ cp_parser_unary_expression (cp_parser *parser, cp_id_kind * pidk, expression.set_location (loc); break; - case ADDR_EXPR: + CASE_ADDR_EXPR: non_constant_p = NIC_ADDR; /* Fall through. */ case BIT_NOT_EXPR: diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index f606c1f117b..7b2de7db25d 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -6946,7 +6946,7 @@ invalid_tparm_referent_p (tree type, tree expr, tsubst_flags_t complain) } break; - case ADDR_EXPR: + CASE_ADDR_EXPR: { tree decl = TREE_OPERAND (expr, 0); @@ -16033,7 +16033,7 @@ tsubst (tree t, tree args, tsubst_flags_t complain, tree in_decl) case NEGATE_EXPR: case NOP_EXPR: case INDIRECT_REF: - case ADDR_EXPR: + CASE_ADDR_EXPR: case CALL_EXPR: case ARRAY_REF: case SCOPE_REF: @@ -16754,7 +16754,7 @@ tsubst_copy (tree t, tree args, tsubst_flags_t complain, tree in_decl) case NEGATE_EXPR: case TRUTH_NOT_EXPR: case BIT_NOT_EXPR: - case ADDR_EXPR: + CASE_ADDR_EXPR: case UNARY_PLUS_EXPR: /* Unary + */ case ALIGNOF_EXPR: case AT_ENCODE_EXPR: @@ -19516,7 +19516,7 @@ tsubst_copy_and_build (tree t, case FIX_TRUNC_EXPR: gcc_unreachable (); - case ADDR_EXPR: + CASE_ADDR_EXPR: op1 = TREE_OPERAND (t, 0); if (TREE_CODE (op1) == LABEL_DECL) RETURN (finish_label_address_expr (DECL_NAME (op1), @@ -26703,7 +26703,7 @@ value_dependent_expression_p (tree expression) return ((value_dependent_expression_p (TREE_OPERAND (expression, 0))) || (value_dependent_expression_p (TREE_OPERAND (expression, 1)))); - case ADDR_EXPR: + CASE_ADDR_EXPR: { tree op = TREE_OPERAND (expression, 0); return (value_dependent_expression_p (op) diff --git a/gcc/cp/typeck.c b/gcc/cp/typeck.c index d3c4bc7b13f..0cba1f71aaa 100644 --- a/gcc/cp/typeck.c +++ b/gcc/cp/typeck.c @@ -6871,7 +6871,7 @@ cp_build_unary_op (enum tree_code code, tree xarg, bool noconvert, return val; } - case ADDR_EXPR: + CASE_ADDR_EXPR: /* Note that this operation never does default_conversion regardless of NOCONVERT. */ return cp_build_addr_expr (arg, complain); @@ -7023,12 +7023,14 @@ cxx_mark_addressable (tree exp, bool array_ref_p) && TREE_CODE (TREE_TYPE (x)) == ARRAY_TYPE && VECTOR_TYPE_P (TREE_TYPE (TREE_OPERAND (x, 0)))) return true; - /* FALLTHRU */ - case ADDR_EXPR: + goto addr_expr; + + CASE_ADDR_EXPR: case COMPONENT_REF: case ARRAY_REF: case REALPART_EXPR: case IMAGPART_EXPR: + addr_expr: x = TREE_OPERAND (x, 0); break; diff --git a/gcc/d/d-codegen.cc b/gcc/d/d-codegen.cc index 1f71b8a0754..1f338bf5190 100644 --- a/gcc/d/d-codegen.cc +++ b/gcc/d/d-codegen.cc @@ -703,7 +703,7 @@ d_mark_addressable (tree exp) { switch (TREE_CODE (exp)) { - case ADDR_EXPR: + CASE_ADDR_EXPR: case COMPONENT_REF: case ARRAY_REF: case REALPART_EXPR: @@ -758,7 +758,7 @@ d_mark_used (tree exp) case IMAGPART_EXPR: case NOP_EXPR: case CONVERT_EXPR: - case ADDR_EXPR: + CASE_ADDR_EXPR: d_mark_used (TREE_OPERAND (exp, 0)); break; @@ -794,7 +794,7 @@ d_mark_read (tree exp) case IMAGPART_EXPR: case NOP_EXPR: case CONVERT_EXPR: - case ADDR_EXPR: + CASE_ADDR_EXPR: d_mark_read (TREE_OPERAND (exp, 0)); break; diff --git a/gcc/d/d-convert.cc b/gcc/d/d-convert.cc index 5e3e855b2cb..013db631802 100644 --- a/gcc/d/d-convert.cc +++ b/gcc/d/d-convert.cc @@ -140,7 +140,7 @@ d_truthvalue_conversion (tree expr) ? boolean_true_node : boolean_false_node; - case ADDR_EXPR: + CASE_ADDR_EXPR: /* If we are taking the address of a decl that can never be null, then the return result is always true. */ if (decl_with_nonnull_addr_p (TREE_OPERAND (expr, 0))) diff --git a/gcc/d/d-gimplify.cc b/gcc/d/d-gimplify.cc index 569e82917f8..3e51c2afe57 100644 --- a/gcc/d/d-gimplify.cc +++ b/gcc/d/d-gimplify.cc @@ -195,7 +195,7 @@ d_gimplify_expr (tree *expr_p, gimple_seq *pre_p, gimple_seq *post_p) case MODIFY_EXPR: return d_gimplify_modify_expr (expr_p, pre_p, post_p); - case ADDR_EXPR: + CASE_ADDR_EXPR: return d_gimplify_addr_expr (expr_p); case CALL_EXPR: diff --git a/gcc/dojump.c b/gcc/dojump.c index 2b4e89d7940..e941c95520f 100644 --- a/gcc/dojump.c +++ b/gcc/dojump.c @@ -414,7 +414,7 @@ do_jump (tree exp, rtx_code_label *if_false_label, #if 0 /* This is not true with #pragma weak */ - case ADDR_EXPR: + CASE_ADDR_EXPR: /* The address of something can never be zero. */ if (if_true_label) emit_jump (if_true_label); diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index 0b57b0acbb5..25dd9348e73 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -18369,7 +18369,7 @@ loc_list_from_tree_1 (tree loc, int want_address, /* There are no opcodes for these operations. */ return 0; - case ADDR_EXPR: + CASE_ADDR_EXPR: /* If we already want an address, see if there is INDIRECT_REF inside e.g. for &this->field. */ if (want_address) diff --git a/gcc/expr.c b/gcc/expr.c index ca65796597d..8f48c425a03 100644 --- a/gcc/expr.c +++ b/gcc/expr.c @@ -7962,7 +7962,7 @@ safe_from_p (const_rtx x, tree exp, int top_p) switch (TREE_CODE (exp)) { - case ADDR_EXPR: + CASE_ADDR_EXPR: /* If the operand is static or we are static, we can't conflict. Likewise if we don't conflict with the operand at all. */ if (staticp (TREE_OPERAND (exp, 0)) @@ -11732,7 +11732,7 @@ expand_expr_real_1 (tree exp, rtx target, machine_mode tmode, return const0_rtx; } - case ADDR_EXPR: + CASE_ADDR_EXPR: return expand_expr_addr_expr (exp, target, tmode, modifier); case REALPART_EXPR: diff --git a/gcc/fold-const.c b/gcc/fold-const.c index e02d496fc39..dfcb6d09a4f 100644 --- a/gcc/fold-const.c +++ b/gcc/fold-const.c @@ -3204,7 +3204,7 @@ operand_compare::operand_equal_p (const_tree arg0, const_tree arg1, TREE_STRING_POINTER (arg1), TREE_STRING_LENGTH (arg0))); - case ADDR_EXPR: + CASE_ADDR_EXPR: gcc_checking_assert (!(flags & OEP_ADDRESS_OF)); return operand_equal_p (TREE_OPERAND (arg0, 0), TREE_OPERAND (arg1, 0), flags | OEP_ADDRESS_OF @@ -3404,7 +3404,7 @@ operand_compare::operand_equal_p (const_tree arg0, const_tree arg1, case tcc_expression: switch (TREE_CODE (arg0)) { - case ADDR_EXPR: + CASE_ADDR_EXPR: /* Be sure we pass right ADDRESS_OF flag. */ gcc_checking_assert (!(flags & OEP_ADDRESS_OF)); return operand_equal_p (TREE_OPERAND (arg0, 0), @@ -3829,7 +3829,7 @@ operand_compare::hash_operand (const_tree t, inchash::hash &hstate, switch (code) { - case ADDR_EXPR: + CASE_ADDR_EXPR: gcc_checking_assert (!(flags & OEP_ADDRESS_OF)); flags |= OEP_ADDRESS_OF; sflags = flags; @@ -10224,7 +10224,7 @@ tree_expr_nonzero_warnv_p (tree t, bool *strict_overflow_p) case CONSTRUCTOR: case OBJ_TYPE_REF: case ASSERT_EXPR: - case ADDR_EXPR: + CASE_ADDR_EXPR: case WITH_SIZE_EXPR: case SSA_NAME: return tree_single_nonzero_warnv_p (t, strict_overflow_p); @@ -14332,7 +14332,7 @@ tree_expr_nonnegative_warnv_p (tree t, bool *strict_overflow_p, int depth) case CONSTRUCTOR: case OBJ_TYPE_REF: case ASSERT_EXPR: - case ADDR_EXPR: + CASE_ADDR_EXPR: case WITH_SIZE_EXPR: case SSA_NAME: return tree_single_nonnegative_warnv_p (t, strict_overflow_p, depth); @@ -14527,7 +14527,7 @@ tree_single_nonzero_warnv_p (tree t, bool *strict_overflow_p) case INTEGER_CST: return !integer_zerop (t); - case ADDR_EXPR: + CASE_ADDR_EXPR: { tree base = TREE_OPERAND (t, 0); diff --git a/gcc/gimple-ssa-sprintf.c b/gcc/gimple-ssa-sprintf.c index 2355709fa2b..de167b800d2 100644 --- a/gcc/gimple-ssa-sprintf.c +++ b/gcc/gimple-ssa-sprintf.c @@ -2293,7 +2293,7 @@ get_origin_and_offset (tree x, HOST_WIDE_INT *fldoff, HOST_WIDE_INT *off) switch (TREE_CODE (x)) { - case ADDR_EXPR: + CASE_ADDR_EXPR: x = TREE_OPERAND (x, 0); return get_origin_and_offset (x, fldoff, off); diff --git a/gcc/gimplify.c b/gcc/gimplify.c index 9e841f5573a..f7725dee1ee 100644 --- a/gcc/gimplify.c +++ b/gcc/gimplify.c @@ -13703,7 +13703,7 @@ gimplify_expr (tree *expr_p, gimple_seq *pre_p, gimple_seq *post_p, break; } - case ADDR_EXPR: + CASE_ADDR_EXPR: ret = gimplify_addr_expr (expr_p, pre_p, post_p); break; diff --git a/gcc/graphite-scop-detection.c b/gcc/graphite-scop-detection.c index 31f837c11b1..88c20ad6b90 100644 --- a/gcc/graphite-scop-detection.c +++ b/gcc/graphite-scop-detection.c @@ -896,7 +896,7 @@ scop_detection::graphite_can_represent_scev (sese_l scop, tree scev) return false; return graphite_can_represent_scev (scop, CHREC_LEFT (scev)); - case ADDR_EXPR: + CASE_ADDR_EXPR: /* We cannot encode addresses for ISL. */ return false; @@ -1155,7 +1155,7 @@ scan_tree_for_params (sese_info_p s, tree e) break; case INTEGER_CST: - case ADDR_EXPR: + CASE_ADDR_EXPR: case REAL_CST: case COMPLEX_CST: case VECTOR_CST: diff --git a/gcc/ipa-icf.c b/gcc/ipa-icf.c index fd69f5bcb5e..3d2db1ff037 100644 --- a/gcc/ipa-icf.c +++ b/gcc/ipa-icf.c @@ -1764,7 +1764,7 @@ sem_variable::equals (tree t1, tree t2) && known_eq (wi::to_poly_offset (y1), wi::to_poly_offset (y2))); } - case ADDR_EXPR: + CASE_ADDR_EXPR: case FDESC_EXPR: { tree op1 = TREE_OPERAND (t1, 0); diff --git a/gcc/jit/jit-playback.c b/gcc/jit/jit-playback.c index 0fddf04da87..3a4f6865c96 100644 --- a/gcc/jit/jit-playback.c +++ b/gcc/jit/jit-playback.c @@ -1284,7 +1284,7 @@ mark_addressable (location *loc) return false; } /* fallthrough */ - case ADDR_EXPR: + CASE_ADDR_EXPR: case ARRAY_REF: case REALPART_EXPR: case IMAGPART_EXPR: diff --git a/gcc/symtab.c b/gcc/symtab.c index d7dfbb676df..160b6d6ed2b 100644 --- a/gcc/symtab.c +++ b/gcc/symtab.c @@ -641,7 +641,7 @@ symtab_node::maybe_create_reference (tree val, gimple *stmt) case VAR_DECL: use_type = IPA_REF_LOAD; break; - case ADDR_EXPR: + CASE_ADDR_EXPR: use_type = IPA_REF_ADDR; break; default: diff --git a/gcc/tree-affine.c b/gcc/tree-affine.c index d08e182d3a2..c432fd27c43 100644 --- a/gcc/tree-affine.c +++ b/gcc/tree-affine.c @@ -441,7 +441,7 @@ tree_to_aff_combination (tree expr, tree type, aff_tree *comb) } break; - case ADDR_EXPR: + CASE_ADDR_EXPR: /* Handle &MEM[ptr + CST] which is equivalent to POINTER_PLUS_EXPR. */ if (TREE_CODE (TREE_OPERAND (expr, 0)) == MEM_REF) { @@ -813,7 +813,7 @@ aff_combination_expand (aff_tree *comb ATTRIBUTE_UNUSED, fold_convert (TREE_TYPE (name), gimple_assign_rhs1 (def))); break; - case ADDR_EXPR: + CASE_ADDR_EXPR: case INTEGER_CST: case POLY_INT_CST: tree_to_aff_combination (gimple_assign_rhs1 (def), diff --git a/gcc/tree-cfg.c b/gcc/tree-cfg.c index e441ce837c2..2e36f44956b 100644 --- a/gcc/tree-cfg.c +++ b/gcc/tree-cfg.c @@ -4490,7 +4490,7 @@ verify_gimple_assign_single (gassign *stmt) /* Special codes we cannot handle via their class. */ switch (rhs_code) { - case ADDR_EXPR: + CASE_ADDR_EXPR: { tree op = TREE_OPERAND (rhs1, 0); if (!is_gimple_addressable (op)) diff --git a/gcc/tree-data-ref.c b/gcc/tree-data-ref.c index 06aa315e475..4157919a398 100644 --- a/gcc/tree-data-ref.c +++ b/gcc/tree-data-ref.c @@ -639,7 +639,7 @@ split_constant_offset_1 (tree type, tree op0, enum tree_code code, tree op1, *off = size_binop (MULT_EXPR, off0, fold_convert (ssizetype, op1)); return true; - case ADDR_EXPR: + CASE_ADDR_EXPR: { tree base, poffset; poly_int64 pbitsize, pbitpos, pbytepos; diff --git a/gcc/tree-dump.c b/gcc/tree-dump.c index d2049053e73..36bf308a469 100644 --- a/gcc/tree-dump.c +++ b/gcc/tree-dump.c @@ -558,7 +558,7 @@ dequeue_and_dump (dump_info_p di) break; case TRUTH_NOT_EXPR: - case ADDR_EXPR: + CASE_ADDR_EXPR: case INDIRECT_REF: case CLEANUP_POINT_EXPR: case VIEW_CONVERT_EXPR: diff --git a/gcc/tree-emutls.c b/gcc/tree-emutls.c index 44755dd406a..362377880e8 100644 --- a/gcc/tree-emutls.c +++ b/gcc/tree-emutls.c @@ -463,7 +463,7 @@ lower_emutls_1 (tree *ptr, int *walk_subtrees, void *cb_data) switch (TREE_CODE (t)) { - case ADDR_EXPR: + CASE_ADDR_EXPR: /* If this is not a straight-forward "&var", but rather something like "&var.a", then we may need special handling. */ if (TREE_CODE (TREE_OPERAND (t, 0)) != VAR_DECL) diff --git a/gcc/tree-nested.c b/gcc/tree-nested.c index 74fda944ea2..09f0df3c0c0 100644 --- a/gcc/tree-nested.c +++ b/gcc/tree-nested.c @@ -1093,7 +1093,7 @@ convert_nonlocal_reference_op (tree *tp, int *walk_subtrees, void *data) FORCED_LABEL (t) = 1; break; - case ADDR_EXPR: + CASE_ADDR_EXPR: { bool save_val_only = wi->val_only; @@ -1836,7 +1836,7 @@ convert_local_reference_op (tree *tp, int *walk_subtrees, void *data) } break; - case ADDR_EXPR: + CASE_ADDR_EXPR: save_val_only = wi->val_only; wi->val_only = false; wi->is_lhs = false; @@ -2588,7 +2588,7 @@ convert_tramp_reference_op (tree *tp, int *walk_subtrees, void *data) *walk_subtrees = 0; switch (TREE_CODE (t)) { - case ADDR_EXPR: + CASE_ADDR_EXPR: /* Build T.1 = &CHAIN->tramp; T.2 = __builtin_adjust_trampoline (T.1); diff --git a/gcc/tree-pretty-print.c b/gcc/tree-pretty-print.c index 02f91b108b6..6f367d76136 100644 --- a/gcc/tree-pretty-print.c +++ b/gcc/tree-pretty-print.c @@ -2761,7 +2761,7 @@ dump_generic_node (pretty_printer *pp, tree node, int spc, dump_flags_t flags, case NEGATE_EXPR: case BIT_NOT_EXPR: case TRUTH_NOT_EXPR: - case ADDR_EXPR: + CASE_ADDR_EXPR: case PREDECREMENT_EXPR: case PREINCREMENT_EXPR: case INDIRECT_REF: @@ -3994,7 +3994,7 @@ op_code_prio (enum tree_code code) case PREDECREMENT_EXPR: case NEGATE_EXPR: case INDIRECT_REF: - case ADDR_EXPR: + CASE_ADDR_EXPR: case FLOAT_EXPR: CASE_CONVERT: case FIX_TRUNC_EXPR: @@ -4072,7 +4072,7 @@ op_symbol_code (enum tree_code code) case BIT_XOR_EXPR: return "^"; - case ADDR_EXPR: + CASE_ADDR_EXPR: case BIT_AND_EXPR: return "&"; @@ -4236,7 +4236,7 @@ print_call_name (pretty_printer *pp, tree node, dump_flags_t flags) dump_function_name (pp, op0, flags); break; - case ADDR_EXPR: + CASE_ADDR_EXPR: case INDIRECT_REF: CASE_CONVERT: op0 = TREE_OPERAND (op0, 0); diff --git a/gcc/tree-scalar-evolution.c b/gcc/tree-scalar-evolution.c index 574defe6574..d3ddb3ac78c 100644 --- a/gcc/tree-scalar-evolution.c +++ b/gcc/tree-scalar-evolution.c @@ -1254,7 +1254,7 @@ tail_recurse: /* This assignment is under the form "a_1 = 7". */ return t_false; - case ADDR_EXPR: + CASE_ADDR_EXPR: { /* Handle &MEM[ptr + CST] which is equivalent to POINTER_PLUS_EXPR. */ if (TREE_CODE (TREE_OPERAND (rhs0, 0)) != MEM_REF) @@ -1662,7 +1662,7 @@ interpret_rhs_expr (class loop *loop, gimple *at_stmt, switch (code) { - case ADDR_EXPR: + CASE_ADDR_EXPR: if (TREE_CODE (TREE_OPERAND (rhs1, 0)) == MEM_REF || handled_component_p (TREE_OPERAND (rhs1, 0))) { @@ -2686,7 +2686,7 @@ instantiate_scev_r (edge instantiate_below, TREE_OPERAND (chrec, 0), fold_conversions, size_expr); - case ADDR_EXPR: + CASE_ADDR_EXPR: if (is_gimple_min_invariant (chrec)) return chrec; /* Fallthru. */ diff --git a/gcc/tree-sra.c b/gcc/tree-sra.c index 9427cba6851..beeef42a152 100644 --- a/gcc/tree-sra.c +++ b/gcc/tree-sra.c @@ -1521,7 +1521,7 @@ make_fancy_name_1 (tree expr) obstack_grow (&name_obstack, buffer, strlen (buffer)); break; - case ADDR_EXPR: + CASE_ADDR_EXPR: make_fancy_name_1 (TREE_OPERAND (expr, 0)); break; diff --git a/gcc/tree-ssa-ccp.c b/gcc/tree-ssa-ccp.c index eb17308ae0c..bbf01b01b3a 100644 --- a/gcc/tree-ssa-ccp.c +++ b/gcc/tree-ssa-ccp.c @@ -793,7 +793,7 @@ likely_value (gimple *stmt) the undefined operand may be promoted. */ return UNDEFINED; - case ADDR_EXPR: + CASE_ADDR_EXPR: /* If any part of an address is UNDEFINED, like the index of an ARRAY_EXPR, then treat the result as UNDEFINED. */ return UNDEFINED; diff --git a/gcc/tree-ssa-loop-ivopts.c b/gcc/tree-ssa-loop-ivopts.c index 8a62acd27b4..2eb92337510 100644 --- a/gcc/tree-ssa-loop-ivopts.c +++ b/gcc/tree-ssa-loop-ivopts.c @@ -1163,7 +1163,7 @@ contain_complex_addr_expr (tree expr) res |= contain_complex_addr_expr (TREE_OPERAND (expr, 1)); break; - case ADDR_EXPR: + CASE_ADDR_EXPR: return (!DECL_P (TREE_OPERAND (expr, 0))); default: @@ -2899,7 +2899,7 @@ strip_offset_1 (tree expr, bool inside_addr, bool top_compref, } break; - case ADDR_EXPR: + CASE_ADDR_EXPR: op0 = TREE_OPERAND (expr, 0); op0 = strip_offset_1 (op0, true, true, &off0); *offset += off0; @@ -3774,7 +3774,7 @@ prepare_decl_rtl (tree *expr_p, int *ws, void *data) switch (TREE_CODE (*expr_p)) { - case ADDR_EXPR: + CASE_ADDR_EXPR: for (expr_p = &TREE_OPERAND (*expr_p, 0); handled_component_p (*expr_p); expr_p = &TREE_OPERAND (*expr_p, 0)) diff --git a/gcc/tree-ssa-loop.c b/gcc/tree-ssa-loop.c index 5e8365d4e83..b8c1556d2ba 100644 --- a/gcc/tree-ssa-loop.c +++ b/gcc/tree-ssa-loop.c @@ -626,7 +626,7 @@ for_each_index (tree *addr_p, bool (*cbck) (tree, tree *, void *), void *data) case CONSTRUCTOR: return true; - case ADDR_EXPR: + CASE_ADDR_EXPR: gcc_assert (is_gimple_min_invariant (*addr_p)); return true; @@ -690,7 +690,7 @@ gen_lsm_tmp_name (tree ref) lsm_tmp_name_add ("_"); break; - case ADDR_EXPR: + CASE_ADDR_EXPR: gen_lsm_tmp_name (TREE_OPERAND (ref, 0)); break; diff --git a/gcc/tree-ssa-operands.c b/gcc/tree-ssa-operands.c index b4be43b314b..f3d302cc031 100644 --- a/gcc/tree-ssa-operands.c +++ b/gcc/tree-ssa-operands.c @@ -782,7 +782,7 @@ operands_scanner::get_expr_operands (tree *expr_p, int flags) switch (code) { - case ADDR_EXPR: + CASE_ADDR_EXPR: /* Taking the address of a variable does not represent a reference to it, but the fact that the statement takes its address will be of interest to some passes (e.g. alias diff --git a/gcc/tree-ssa-pre.c b/gcc/tree-ssa-pre.c index a448787ba31..4bad811c659 100644 --- a/gcc/tree-ssa-pre.c +++ b/gcc/tree-ssa-pre.c @@ -2520,7 +2520,7 @@ create_component_ref_by_pieces_1 (basic_block block, vn_reference_t ref, return genop; } - case ADDR_EXPR: + CASE_ADDR_EXPR: if (currop->op0) { gcc_assert (is_gimple_min_invariant (currop->op0)); diff --git a/gcc/tree-ssa-propagate.c b/gcc/tree-ssa-propagate.c index abea16fe8d4..2b419f4998c 100644 --- a/gcc/tree-ssa-propagate.c +++ b/gcc/tree-ssa-propagate.c @@ -492,7 +492,7 @@ valid_gimple_rhs_p (tree expr) case tcc_expression: switch (code) { - case ADDR_EXPR: + CASE_ADDR_EXPR: { tree t; if (is_gimple_min_invariant (expr)) diff --git a/gcc/tree-ssa-sccvn.c b/gcc/tree-ssa-sccvn.c index 61ab91dfbda..0a768fcd901 100644 --- a/gcc/tree-ssa-sccvn.c +++ b/gcc/tree-ssa-sccvn.c @@ -938,7 +938,7 @@ copy_reference_ops_from_ref (tree ref, vec *result) case SSA_NAME: temp.op0 = ref; break; - case ADDR_EXPR: + CASE_ADDR_EXPR: if (is_gimple_min_invariant (ref)) { temp.op0 = ref; @@ -1025,7 +1025,7 @@ ao_ref_init_from_vn_reference (ao_ref *ref, { /* These may be in the reference ops, but we cannot do anything sensible with them here. */ - case ADDR_EXPR: + CASE_ADDR_EXPR: /* Apart from ADDR_EXPR arguments to MEM_REF. */ if (base != NULL_TREE && TREE_CODE (base) == MEM_REF @@ -5638,7 +5638,7 @@ vn_reference_may_trap (vn_reference_t ref) case MODIFY_EXPR: case CALL_EXPR: /* We do not handle calls. */ - case ADDR_EXPR: + CASE_ADDR_EXPR: /* And toplevel address computations never trap. */ return false; default:; @@ -5669,7 +5669,7 @@ vn_reference_may_trap (vn_reference_t ref) /* The following are the address bases. */ case SSA_NAME: return true; - case ADDR_EXPR: + CASE_ADDR_EXPR: if (op->op0) return tree_could_trap_p (TREE_OPERAND (op->op0, 0)); return false; diff --git a/gcc/tree-ssa-strlen.c b/gcc/tree-ssa-strlen.c index 2e848366376..e1e92c98a2b 100644 --- a/gcc/tree-ssa-strlen.c +++ b/gcc/tree-ssa-strlen.c @@ -1567,8 +1567,10 @@ find_equal_ptrs (tree ptr, int idx) break; if (!ADDR_EXPR_P (ptr)) return; - /* FALLTHRU */ - case ADDR_EXPR: + goto addr_expr; + + CASE_ADDR_EXPR: + addr_expr: { int *pidx = addr_stridxptr (TREE_OPERAND (ptr, 0)); if (pidx != NULL && *pidx == 0) diff --git a/gcc/tree-ssa-structalias.c b/gcc/tree-ssa-structalias.c index 3127aabadd6..f0739ffc56d 100644 --- a/gcc/tree-ssa-structalias.c +++ b/gcc/tree-ssa-structalias.c @@ -3526,7 +3526,7 @@ get_constraint_for_1 (tree t, vec *results, bool address_p, { switch (TREE_CODE (t)) { - case ADDR_EXPR: + CASE_ADDR_EXPR: get_constraint_for_address_of (TREE_OPERAND (t, 0), results); return; default:; diff --git a/gcc/tree.c b/gcc/tree.c index 42812849d94..61b60083eec 100644 --- a/gcc/tree.c +++ b/gcc/tree.c @@ -2917,7 +2917,7 @@ tree_ctz (const_tree expr) return MIN (ret1, ret2); case COMPOUND_EXPR: return tree_ctz (TREE_OPERAND (expr, 1)); - case ADDR_EXPR: + CASE_ADDR_EXPR: ret1 = get_pointer_alignment (CONST_CAST_TREE (expr)); if (ret1 > BITS_PER_UNIT) { @@ -3624,7 +3624,7 @@ tree_invariant_p_1 (tree t) case SAVE_EXPR: return true; - case ADDR_EXPR: + CASE_ADDR_EXPR: op = TREE_OPERAND (t, 0); while (handled_component_p (op)) { @@ -4782,7 +4782,7 @@ build1 (enum tree_code code, tree type, tree node MEM_STAT_DECL) TREE_READONLY (t) = 0; break; - case ADDR_EXPR: + CASE_ADDR_EXPR: if (node) recompute_tree_invariant_for_addr_expr (t); break; @@ -12661,7 +12661,7 @@ get_name (tree t) { switch (TREE_CODE (stripped_decl)) { - case ADDR_EXPR: + CASE_ADDR_EXPR: return get_name (TREE_OPERAND (stripped_decl, 0)); default: return NULL; diff --git a/gcc/tree.h b/gcc/tree.h index 74921865526..bcbf1cde876 100644 --- a/gcc/tree.h +++ b/gcc/tree.h @@ -481,6 +481,10 @@ ADDR_EXPR_CODE_P (tree_code code) is TREE_OPERAND (EXP, 0). */ #define ADDR_EXPR_P(EXP) ADDR_EXPR_CODE_P (TREE_CODE (EXP)) +/* Case statements for codes that satisfy ADDR_EXPR_CODE_P. */ +#define CASE_ADDR_EXPR \ + case ADDR_EXPR + /* Tests if CODE is a conversion expr (NOP_EXPR or CONVERT_EXPR). */ #define CONVERT_EXPR_CODE_P(CODE) \ ((CODE) == NOP_EXPR || (CODE) == CONVERT_EXPR) diff --git a/gcc/varasm.c b/gcc/varasm.c index 7189fba912c..42799e9072e 100644 --- a/gcc/varasm.c +++ b/gcc/varasm.c @@ -3145,7 +3145,7 @@ const_hash_1 (const tree exp) return hi; } - case ADDR_EXPR: + CASE_ADDR_EXPR: if (CONSTANT_CLASS_P (TREE_OPERAND (exp, 0))) return const_hash_1 (TREE_OPERAND (exp, 0)); @@ -3345,7 +3345,7 @@ compare_constant (const tree t1, const tree t2) return 1; } - case ADDR_EXPR: + CASE_ADDR_EXPR: case FDESC_EXPR: { class addr_const value1, value2; @@ -4374,7 +4374,7 @@ compute_reloc_for_constant (tree exp) switch (TREE_CODE (exp)) { - case ADDR_EXPR: + CASE_ADDR_EXPR: case FDESC_EXPR: /* Go inside any operations that get_inner_reference can handle and see if what's inside is a constant: no need to do anything here for @@ -4456,7 +4456,7 @@ output_addressed_constants (tree exp, int defer) break; } - case ADDR_EXPR: + CASE_ADDR_EXPR: case FDESC_EXPR: /* Go inside any operations that get_inner_reference can handle and see if what's inside is a constant: no need to do anything here for @@ -4620,7 +4620,7 @@ tree_innermost_capability (const_tree t) switch (TREE_CODE (t)) { case INTEGER_CST: - case ADDR_EXPR: + CASE_ADDR_EXPR: return t; case NOP_EXPR: return tree_innermost_capability (TREE_OPERAND (t, 0)); @@ -4750,7 +4750,7 @@ initializer_constant_valid_p_1 (tree value, tree endtype, tree *cache) case COMPLEX_CST: return null_pointer_node; - case ADDR_EXPR: + CASE_ADDR_EXPR: case FDESC_EXPR: { tree op0 = staticp (TREE_OPERAND (value, 0));