ubsan: tc-d30v.c left shift cannot be represented
authorAlan Modra <amodra@gmail.com>
Wed, 2 Sep 2020 00:47:21 +0000 (10:17 +0930)
committerAlan Modra <amodra@gmail.com>
Wed, 2 Sep 2020 07:00:43 +0000 (16:30 +0930)
* config/tc-d30v.c (parallel_ok): Use 1UL for left shift expression.

gas/ChangeLog
gas/config/tc-d30v.c

index f6b9e45a5275ae90f022bd6db3ffeb4a6c9835e4..052c9541ff9ca45e5484e6344eeab8c8b845a970 100644 (file)
@@ -1,3 +1,7 @@
+2020-09-02  Alan Modra  <amodra@gmail.com>
+
+       * config/tc-d30v.c (parallel_ok): Use 1UL for left shift expression.
+
 2020-09-02  Alan Modra  <amodra@gmail.com>
 
        * config/rx-parse.y (rx_intop): Avoid too large shifts.
index 9f0b0eb473c8243442c8e5f1d6f283cddce6c77e..c24dfacd05bdb5e1e6eee0c8c22692912e019cb4 100644 (file)
@@ -862,9 +862,9 @@ parallel_ok (struct d30v_insn *op1,
                      for (r = regno; r <= regno + z; r++)
                        {
                          if (r >= 32)
-                           used_reg[j][1] |= 1L << (r - 32);
+                           used_reg[j][1] |= 1UL << (r - 32);
                          else
-                           used_reg[j][0] |= 1L << r;
+                           used_reg[j][0] |= 1UL << r;
                        }
                    }
                }