1 2 3 4 5 6 7 8 9 10 11 12 13 14
/* { dg-do compile } */ /* { dg-options "-fgnu-tm" } */ struct list { void (*compare)(); } *listPtr; static void (*compare)(); __attribute__((transaction_safe)) static void func () { listPtr->compare(); /* { dg-error "unsafe indirect function call" } */ compare(); /* { dg-error "unsafe indirect function call" } */ }