2018-03-08 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / gcc.target / i386 / pr84128.c
bloba8323fd6ddee3b0dfbeecd35f75233dec3468b3b
1 /* { dg-do run } */
2 /* { dg-options "-O2 -march=i686 -mtune=generic -fstack-clash-protection" } */
3 /* { dg-require-effective-target ia32 } */
5 __attribute__ ((noinline, noclone, weak, regparm (3)))
6 int
7 f1 (long arg0, int (*pf) (long, void *))
9 unsigned char buf[32768];
10 return pf (arg0, buf);
13 __attribute__ ((noinline, noclone, weak))
14 int
15 f2 (long arg0, void *ignored)
17 if (arg0 != 17)
18 __builtin_abort ();
19 return 19;
22 int
23 main (void)
25 if (f1 (17, f2) != 19)
26 __builtin_abort ();
27 return 0;