]> gcc.gnu.org Git - gcc.git/commitdiff
IBM Z: Fix address of operands will never be NULL warnings
authorStefan Schulze Frielinghaus <stefansf@linux.ibm.com>
Tue, 2 Nov 2021 08:19:44 +0000 (09:19 +0100)
committerStefan Schulze Frielinghaus <stefansf@linux.ibm.com>
Tue, 2 Nov 2021 08:19:44 +0000 (09:19 +0100)
Since a recent enhancement of -Waddress a couple of warnings are emitted
and turned into errors during bootstrap:

gcc/config/s390/s390.md:12087:25: error: the address of 'operands' will never be NULL [-Werror=address]
12087 |   "TARGET_HTM && operands != NULL
build/gencondmd.c:59:12: note: 'operands' declared here
   59 | extern rtx operands[];
      |            ^~~~~~~~

Fixed by removing those non-null checks.

gcc/ChangeLog:

* config/s390/s390.md ("*cc_to_int", "tabort", "*tabort_1",
"*tabort_1_plus"): Remove operands non-null check.

gcc/config/s390/s390.md

index b8bdbaec4685c92bd089a2150cc1b33395efa00a..4debdcd12478d270005048911acb875d829a5758 100644 (file)
   [(set (match_operand:SI 0 "nonimmediate_operand"     "=d")
         (unspec:SI [(match_operand 1 "register_operand" "0")]
                    UNSPEC_CC_TO_INT))]
-  "operands != NULL"
+  ""
   "#"
   "reload_completed"
   [(set (match_dup 0) (lshiftrt:SI (match_dup 0) (const_int 28)))])
 (define_expand "tabort"
   [(unspec_volatile [(match_operand:SI 0 "nonmemory_operand" "")]
                    UNSPECV_TABORT)]
-  "TARGET_HTM && operands != NULL"
+  "TARGET_HTM"
 {
   if (CONST_INT_P (operands[0])
       && INTVAL (operands[0]) >= 0 && INTVAL (operands[0]) <= 255)
 (define_insn "*tabort_1"
   [(unspec_volatile [(match_operand:SI 0 "nonmemory_operand" "aJ")]
                    UNSPECV_TABORT)]
-  "TARGET_HTM && operands != NULL"
+  "TARGET_HTM"
   "tabort\t%Y0"
   [(set_attr "op_type" "S")])
 
   [(unspec_volatile [(plus:SI (match_operand:SI 0 "register_operand"  "a")
                              (match_operand:SI 1 "const_int_operand" "J"))]
                    UNSPECV_TABORT)]
-  "TARGET_HTM && operands != NULL
-   && CONST_OK_FOR_CONSTRAINT_P (INTVAL (operands[1]), 'J', \"J\")"
+  "TARGET_HTM && CONST_OK_FOR_CONSTRAINT_P (INTVAL (operands[1]), 'J', \"J\")"
   "tabort\t%1(%0)"
   [(set_attr "op_type" "S")])
 
This page took 0.070499 seconds and 5 git commands to generate.