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

Nathaniel Shead <nshead at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2026-01-16

--- Comment #3 from Nathaniel Shead <nshead at gcc dot gnu.org> ---
The issue is that when reading a variable definition, when setting up tentative
linkage we call 'maybe_commonize_var' which for flag_reflection calls
'consteval_only_p' which calls 'complete_type_p' during the load of the
variable.

This might cause a recursive load if the type of the variable names an entity
also from this module that hasn't been loaded yet.

I'm not sure yet what a good way to fix this is; it seems overkill to have to
create a cache of all definitions that we read and defer them till after module
loading has finished before we can set up its linkage.

Reply via email to