diff options
author | Richard Sandiford <richard.sandiford@arm.com> | 2019-09-18 09:43:10 +0000 |
---|---|---|
committer | Richard Sandiford <rsandifo@gcc.gnu.org> | 2019-09-18 09:43:10 +0000 |
commit | ef20d2215067b1bfa8b3f9549ca0baed636a94a0 (patch) | |
tree | ed65787f11e75aca1c753424fe2a530e0190385f /gcc/dwarf2out.c | |
parent | a95b474a088187218bd4e73c1c34566e3c3fc83d (diff) | |
download | gcc-ef20d2215067b1bfa8b3f9549ca0baed636a94a0.zip gcc-ef20d2215067b1bfa8b3f9549ca0baed636a94a0.tar.gz gcc-ef20d2215067b1bfa8b3f9549ca0baed636a94a0.tar.bz2 |
Two more POLY_INT cases for dwarf2out.c
loc_list_for_tree_1 and add_const_value_attribute currently ICE
on POLY_INTs. loc_list_for_tree_1 can do something sensible but
add_const_value_attribute has to punt, since the constant there
needs to be a link-time rather than load-time or run-time constant.
This is tested by later SVE patches.
2019-09-18 Richard Sandiford <richard.sandiford@arm.com>
gcc/
* dwarf2out.c (loc_list_from_tree_1): Handle POLY_INT_CST.
(add_const_value_attribute): Handle CONST_POLY_INT.
From-SVN: r275868
Diffstat (limited to 'gcc/dwarf2out.c')
-rw-r--r-- | gcc/dwarf2out.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index 5698c82..cec25fa 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -18568,6 +18568,24 @@ loc_list_from_tree_1 (tree loc, int want_address, } break; + case POLY_INT_CST: + { + if (want_address) + { + expansion_failed (loc, NULL_RTX, + "constant address with a runtime component"); + return 0; + } + poly_int64 value; + if (!poly_int_tree_p (loc, &value)) + { + expansion_failed (loc, NULL_RTX, "constant too big"); + return 0; + } + ret = int_loc_descriptor (value); + } + break; + case CONSTRUCTOR: case REAL_CST: case STRING_CST: @@ -19684,6 +19702,7 @@ add_const_value_attribute (dw_die_ref die, rtx rtl) case MINUS: case SIGN_EXTEND: case ZERO_EXTEND: + case CONST_POLY_INT: return false; case MEM: |