https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106395
m101010a at gmail dot com changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |m101010a at gmail dot com --- Comment #1 from m101010a at gmail dot com --- Git bisect indicates this was caused by commit a0fdff3cf33f72848d3f894272431a5d49fe6a16 "c++: Fix friend attributes [PR51344]". Also, you don't need a member variable to trigger this; I was able to reproduce it with just __attribute__((dllimport)) void f(); struct s { friend __attribute__((dllimport)) void f(); };