https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89009
Martin Liška <marxin at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |WAITING --- Comment #5 from Martin Liška <marxin at gcc dot gnu.org> --- Well, I believe the test-case is invalid as one can't have hidden visibility and then defined S1::f2 in a different translation unit. I would like to see an example which would be possible to link. This works for me: $ cat pr89009.h void foo(); struct S1 { static void bar(); }; struct __attribute__ ((visibility("default"))) S2: S1 { static void bar(); }; struct S3: S1 { static void bar(); }; struct S4: S3 { static void bar(); }; $ cat pr89009.c #include "pr89009.h" void S2::bar() { S1::bar(); } void S3::bar() { S1::bar(); } void S4::bar() { foo(); S3::bar(); // MISSING } int main() { S4::bar (); } $ cat pr89009-2.c #include "pr89009.h" void foo() { __builtin_printf ("foo called\n"); } void S1::bar() { __builtin_printf ("S1::bar\n"); }