https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66728

--- Comment #7 from rsandifo at gcc dot gnu.org <rsandifo at gcc dot gnu.org> 
---
(In reply to Ulrich Weigand from comment #6)
> (In reply to rsand...@gcc.gnu.org from comment #4)
> > Testing a patch.  It involves tightening the mode of the rtx returned
> > by rtl_for_decl_location, as well as new asserts, so some fallout is
> > likely...
> 
> Hi Richard, just a quick ping ...  Were you able to make any progress with
> this?

As expected there was a lot of fallout from trying to tighten the mode.
We just seem to be very loose with our type safety here.  Sometimes the
mode of the value associated with the decl is DECL_MODE, sometimes it's
the result of promote_decl_mode, sometimes it's BLKmode when the DECL_MODE
isn't, sometimes the DECL_MODE is BLKmode when the rtl isn't, etc.
It all turned into a bit of a rathole.

I suppose I'm just going to have to admit defeat and use the type or
mode of the decl only in the case where the rtl is a scalar integer
constant -- which seems very inconsistent.

Reply via email to