1 /* { dg-do run } */
2 /* { dg-options "-O" } */
3
4 /* Verify that the 6th complex floating-point argument is
5 correctly passed as unnamed argument on SPARC64. */
6
7 extern void abort(void);
8
foo(long arg1,long arg2,long arg3,long arg4,long arg5,...)9 void foo(long arg1, long arg2, long arg3, long arg4, long arg5, ...)
10 {
11 __builtin_va_list ap;
12 _Complex float cf;
13
14 __builtin_va_start(ap, arg5);
15 cf = __builtin_va_arg(ap, _Complex float);
16 __builtin_va_end(ap);
17
18 if (__imag__ cf != 2.0f)
19 abort();
20 }
21
bar(long arg1,long arg2,long arg3,long arg4,long arg5,_Complex float arg6)22 int bar(long arg1, long arg2, long arg3, long arg4, long arg5, _Complex float arg6)
23 {
24 foo(arg1, arg2, arg3, arg4, arg5, arg6);
25 return 0;
26 }
27
main(void)28 int main(void)
29 {
30 return bar(0, 0, 0, 0, 0, 2.0fi);
31 }
32