1 /* { dg-do compile } */ 2 /* { dg-options "-O2 -fcf-protection" } */ 3 /* { dg-final { scan-assembler-times {\mendbr} 2 } } */ 4 5 struct ucontext; 6 7 extern int (*bar) (struct ucontext *); 8 9 extern int res; 10 11 void foo(struct ucontext * oucp)12foo (struct ucontext *oucp) 13 { 14 int (*f) (struct ucontext *) __attribute__((__indirect_return__)) 15 = bar; 16 res = f (oucp); 17 } 18