OSDN Git Service

* gcc.dg/builtins-config.h: Disable C99 runtime testing for
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.dg / builtin-apply4.c
1 /* PR tree-optimization/20076 */
2 /* { dg-options "-O2" } */
3 /* { dg-options "-O2 -mno-mmx" { target { { i?86-*-* x86_64-*-* } && ilp32 } } } */
4 /* { dg-do run } */
5
6 extern void abort (void);
7
8 double
9 foo (int arg)
10 {
11   if (arg != 116)
12     abort();
13   return arg + 1;
14 }
15
16 inline double
17 bar (int arg)
18 {
19   foo (arg);
20   __builtin_return (__builtin_apply ((void (*) ()) foo,
21                                      __builtin_apply_args (), 16));
22 }
23
24 int
25 main (int argc, char **argv)
26 {
27   if (bar (116) != 117.0)
28     abort ();
29
30   return 0;
31 }