[Bug c++/100616] [modules] ICE when a variable of class taking a non-type template argument is defined both inside and outside the module

amorvincitomnia.iw at gmail dot com gcc-bugzilla@gcc.gnu.org
Sun May 16 09:22:23 GMT 2021


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

--- Comment #2 from wang ivor <amorvincitomnia.iw at gmail dot com> ---
One workaround I found is to always use templates to refer to C inside modules
and only ever instantiate them in the outermost translation units. 

Or, if you only instantiate C with template arguments of primitive types (e.g.
int, char, pointer types of primitive types, etc.) this bug doesn't happen.


More information about the Gcc-bugs mailing list