1 /* { dg-do compile } */ 2 /* { dg-require-weak-override "" } */ 3 /* { dg-options "-O2 -fdump-tree-optimized" } */ 4 func(void)5void __attribute__((weak)) func(void) 6 { 7 /* no code */ 8 } 9 main()10int main() 11 { 12 func(); 13 return 0; 14 } 15 16 /* { dg-final { scan-tree-dump "func \\(\\);" "optimized" } } */ 17