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

--- Comment #10 from Arseny Solokha <asolokha at gmx dot com> ---
g++ 13.0.0 20221023 snapshot (g:0e37fd4dc74c1db99cdc7d71ef378e1221253c6f) ICEs
when compiling the following testcase, reduced from
test/CodeGenCXX/cxx11-thread-local.cpp from the clang 14 test suite:

struct Dtor;
template <typename> struct X { static thread_local Dtor m; };
template <typename T> thread_local Dtor X<T>::m;
extern template Dtor X<char>::m;
void *e2 = &X<char>::m;

% x86_64-pc-linux-gnu-g++-13 -c uuir2io5.cpp
during IPA pass: whole-program
uuir2io5.cpp:5:23: internal compiler error: in
function_and_variable_visibility, at ipa-visibility.cc:889
    5 | void *e2 = &X<char>::m;
      |                       ^
0x9403cc function_and_variable_visibility
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20221023/work/gcc-13-20221023/gcc/ipa-visibility.cc:889
0x20fe8a6 whole_program_function_and_variable_visibility
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20221023/work/gcc-13-20221023/gcc/ipa-visibility.cc:940
0x20fe8a6 execute
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20221023/work/gcc-13-20221023/gcc/ipa-visibility.cc:988

Reply via email to