On 5/28/26 4:00 PM, Jakub Jelinek wrote:
On Wed, May 27, 2026 at 06:19:33PM -0400, Jason Merrill wrote:
On 5/25/26 11:15 AM, Jakub Jelinek wrote:
Hi!
The following testcase ICEs, because we decide to mangle the (for the time
being as workaround static constexpr variables created for expansion
statements). And if there is more than one in the same function and we
mangle both, we ICE because they mangle the same.
The problem is that cp_finish_decl does not determine_local_discriminator
for DECL_ARTIFICIAL vars.
Would it make sense to change that?
My understanding is that the DECL_ARTIFICIAL check is there probably to
avoid calling those functions for guard variables.
And there is no flag exactly for guard vars.
I don't see why calling determine_local_discriminator would be a problem
for guard vars, and removing the DECL_ARTIFICIAL check doesn't seem to
regress anything for me.
Jason