OSDN Git Service

gcc/
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.dg / builtin-apply3.c
1 /* PR middle-end/12210 */
2 /* Origin: Ossadchy Yury A. <waspcoder@mail.ru> */
3
4 /* This used to fail on i686 because the argument was not copied
5    to the right location by __builtin_apply after the direct call.  */
6
7 /* { dg-do run } */
8
9
10 #define INTEGER_ARG  5
11
12 extern void abort(void);
13
14 void foo(int arg)
15 {
16   if (arg != INTEGER_ARG)
17     abort();
18 }
19
20 void bar(int arg)
21 {
22   foo(arg);
23   __builtin_apply(foo, __builtin_apply_args(), 16);
24 }
25
26 int main(void)
27 {
28   bar(INTEGER_ARG);
29
30   return 0;
31 }