/* { dg-lto-do run } */ /* { dg-lto-options { { -O3 -flto } } } */ /* With LTO we consider all pointers to incomplete types to be possibly aliasing. This makes *bptr to alias with aptr. For C++ ODR types we however can work out that they are actually different. */ #include typedef int (*fnptr) (); __attribute__ ((used)) struct a *aptr; __attribute__ ((used)) struct b **bptr = (struct b**)&aptr; extern void init (); extern void inline_me_late (int); int n=1; int main (int argc, char **argv) { init (); aptr = 0; for (int i=0; i