[gcc(refs/vendors/ARM/heads/morello)] config: Fix up build following introduction of ADDR_EXPR_CODE_P

Alex Coplan acoplan@gcc.gnu.org
Wed Jun 28 13:33:01 GMT 2023


https://gcc.gnu.org/g:c98362bd4de6c48421711026df353c7bfcfb5808

commit c98362bd4de6c48421711026df353c7bfcfb5808
Author: Alex Coplan <alex.coplan@arm.com>
Date:   Thu Apr 27 13:05:38 2023 +0100

    config: Fix up build following introduction of ADDR_EXPR_CODE_P
    
    The target hooks takes an int here but ADDR_EXPR_CODE_P expects
    a tree_code, so the arm port was failing to build.
    
    Fix this up by casting back to tree_code.

Diff:
---
 gcc/config/arm/arm.c   | 2 +-
 gcc/config/ia64/ia64.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c
index 1d8a9e3e686..a3004a7e294 100644
--- a/gcc/config/arm/arm.c
+++ b/gcc/config/arm/arm.c
@@ -33262,7 +33262,7 @@ static const char *
 arm_invalid_unary_op (int op, const_tree type)
 {
   /* Reject all single-operand operations on BFmode except for &.  */
-  if (element_mode (type) == BFmode && !ADDR_EXPR_CODE_P (op))
+  if (element_mode (type) == BFmode && !ADDR_EXPR_CODE_P ((tree_code) op))
     return N_("operation not permitted on type %<bfloat16_t%>");
 
   /* Operation allowed.  */
diff --git a/gcc/config/ia64/ia64.c b/gcc/config/ia64/ia64.c
index f24f6b76f53..7122c731e97 100644
--- a/gcc/config/ia64/ia64.c
+++ b/gcc/config/ia64/ia64.c
@@ -11256,7 +11256,7 @@ ia64_invalid_unary_op (int op, const_tree type)
   /* Reject operations on __fpreg other than unary + or &.  */
   if (TYPE_MODE (type) == RFmode
       && op != CONVERT_EXPR
-      && !ADDR_EXPR_CODE_P (op))
+      && !ADDR_EXPR_CODE_P ((tree_code) op))
     return N_("invalid operation on %<__fpreg%>");
   return NULL;
 }


More information about the Gcc-cvs mailing list