1 // PR c++/65974 2 // { dg-options "-Wdeprecated" } 3 4 struct S { 5 void bar(); 6 7 __attribute__((deprecated("use bar() instead."))) 8 virtual void foo(); 9 }; 10 foo()11 void S::foo() { bar(); } 12 main()13 int main() 14 { 15 return 0; 16 } 17