Use SCALAR_INT_TYPE_MODE in loc_list_from_tree_1
authorRichard Sandiford <richard.sandiford@linaro.org>
Mon, 23 Oct 2017 09:38:30 +0000 (09:38 +0000)
committerRichard Sandiford <rsandifo@gcc.gnu.org>
Mon, 23 Oct 2017 09:38:30 +0000 (09:38 +0000)
This follows on from similar changes a couple of months ago and
is needed when general modes have variable size.

2017-10-23  Richard Sandiford  <richard.sandiford@linaro.org>
    Alan Hayward  <alan.hayward@arm.com>
    David Sherwood  <david.sherwood@arm.com>

gcc/
* dwarf2out.c (loc_list_from_tree_1): Use SCALAR_INT_TYPE_MODE

Co-Authored-By: Alan Hayward <alan.hayward@arm.com>
Co-Authored-By: David Sherwood <david.sherwood@arm.com>
From-SVN: r254001

gcc/ChangeLog
gcc/dwarf2out.c

index ced594f68da7c97243ab168e10dc62890b9a7a82..d53514ddcca6af32f9a4654d15c7b01540d872e9 100644 (file)
@@ -1,3 +1,9 @@
+2017-10-23  Richard Sandiford  <richard.sandiford@linaro.org>
+           Alan Hayward  <alan.hayward@arm.com>
+           David Sherwood  <david.sherwood@arm.com>
+
+       * dwarf2out.c (loc_list_from_tree_1): Use SCALAR_INT_TYPE_MODE
+
 2017-10-23  Richard Sandiford  <richard.sandiford@linaro.org>
            Alan Hayward  <alan.hayward@arm.com>
            David Sherwood  <david.sherwood@arm.com>
index ec9b40602b1a464c101429735668d7402f5e0e35..81c95ece0956a35abcfaf74133129deafabae738 100644 (file)
@@ -17482,7 +17482,7 @@ loc_list_from_tree_1 (tree loc, int want_address,
                && (INTEGRAL_TYPE_P (TREE_TYPE (loc))
                    || POINTER_TYPE_P (TREE_TYPE (loc)))
                && DECL_CONTEXT (loc) == current_function_decl
-               && (GET_MODE_SIZE (TYPE_MODE (TREE_TYPE (loc)))
+               && (GET_MODE_SIZE (SCALAR_INT_TYPE_MODE (TREE_TYPE (loc)))
                    <= DWARF2_ADDR_SIZE))
              {
                dw_die_ref ref = lookup_decl_die (loc);