https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66728
rsandifo at gcc dot gnu.org <rsandifo at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |ASSIGNED
Last reconfirmed| |2015-07-02
Assignee|unassigned at gcc dot gnu.org |rsandifo at gcc dot
gnu.org
Ever confirmed|0 |1
--- Comment #3 from rsandifo at gcc dot gnu.org <rsandifo at gcc dot gnu.org>
---
(In reply to Ulrich Weigand from comment #1)
> A bit of debugging shows that what's going on here is this:
>
> add_const_value_attribute is called with the following constant RTL:
> (const_wide_int 0x80000000000000000000000000000000)
>
> The routine then does:
> add_AT_wide (die, DW_AT_const_value,
> std::make_pair (rtl, GET_MODE (rtl)));
>
> Note that GET_MODE (rtl) is VOIDmode. This apparently causes creation of a
> wide_int value with precision 0:
> {<wide_int_storage> = {val = {0, -9223372036854775808, 2}, len = 2,
> precision = 0}
>
> This seems already wrong, but doesn't quite explain the inconsistent output.
Yeah, wide_ints shouldn't have precision 0. I think the later problems
do follow from that, although like you say there is probably a disconnect
between the way the DIEs are handled as well.