1 /* { dg-require-visibility "" } */ 2 /* { dg-options "-fvisibility-ms-compat" } */ 3 4 /* { dg-final { scan-not-hidden "_ZTI1S" } } */ 5 /* { dg-final { scan-hidden "_ZTI1T" } } */ 6 /* { dg-final { scan-not-hidden "_ZTI1U" } } */ 7 /* { dg-final { scan-not-hidden "_ZN1U6hide_4Ev" } } */ 8 9 class S { 10 virtual void hide_2(); 11 } hide_1; 12 hide_2()13void S::hide_2() { 14 } 15 16 class __attribute__((visibility("hidden"))) T { 17 virtual void hide_4(); 18 } hide_3; 19 hide_4()20void T::hide_4() { 21 } 22 23 class __attribute__((visibility("default"))) U { 24 virtual void hide_4(); 25 }; 26 hide_4()27void U::hide_4() { 28 } 29