]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/testsuite/gcc.dg/builtin-apply4.c
Update copyright years.
[thirdparty/gcc.git] / gcc / testsuite / gcc.dg / builtin-apply4.c
1 /* PR tree-optimization/20076 */
2 /* { dg-options "-O2 -Wmissing-noreturn -fgnu89-inline" } */
3 /* { dg-additional-options "-mno-mmx" { target { { i?86-*-* x86_64-*-* } && ia32 } } } */
4 /* { dg-do run } */
5 /* { dg-require-effective-target untyped_assembly } */
6
7 extern void abort (void);
8
9 double
10 foo (int arg)
11 {
12 if (arg != 116)
13 abort();
14 return arg + 1;
15 }
16
17 inline double
18 bar (int arg)
19 {
20 foo (arg);
21 __builtin_return (__builtin_apply ((void (*) ()) foo,
22 __builtin_apply_args (), 16));
23 }
24
25 int
26 main (int argc, char **argv)
27 {
28 if (bar (116) != 117.0)
29 abort ();
30
31 return 0;
32 }