2 // { dg-options "-O3 -Wsuggest-final-types" }
5 extern "C" int printf (const char *, ...);
6 struct foo // { dg-warning "final would enable devirtualization of 5 calls" }
9 void print (int i, int j) { printf ("foo[%d][%d] = %d\n", i, j, x); }
13 printf("this %d = %x\n", x, (void *)this);
16 printf("this %d = %x\n", x, (void *)this);
27 for (int i = 0; i < 3; i++)
29 for (int j = 0; j < 3; j++)
31 printf("&a[%d][%d] = %x\n", i, j, (void *)&array[i][j]);
34 // The count should be nine, if not, fail the test.