summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/i386/pr86560-4.c
blob: a623e3dcbebe3a9a6c252ad9ca1170b00a4baf75 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/* { dg-do compile } */
/* { dg-options "-O2 -fcf-protection" } */
/* { dg-final { scan-assembler-times {\mendbr} 2 } } */

struct ucontext;

extern int (*bar) (struct ucontext *)
#ifdef __has_attribute
# if __has_attribute (indirect_return)
  __attribute__((__indirect_return__))
# endif
#endif
;

extern int res;

void
foo (struct ucontext *oucp)
{
  res = bar (oucp);
}