https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116484
Jeffrey A. Law <law at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Blocks|120763 |
--- Comment #9 from Jeffrey A. Law <law at gcc dot gnu.org> ---
Yea, I started to chase this down in the hopes that we could just lift a bit of
code without going through a new lang hook.
In theory we could validate that we have a readonly _DECL node, then peek at
DECL_INITIAL to get its value. The problem (if I'm reading the C++ FE code
correctly) is that if the object was a template static data member, we don't
know if it's suitably initialized until after instantiation.
Presumably that's a use case we probably need to support for getting
rvv_vector_bits or arm_sve_vector_bits. So I don't really see a good solution
other than a lang hook.
Referenced Bugs:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120763
[Bug 120763] [meta-bug] Tracker for bugs to visit during weekly RISC-V meeting