2018-11-28 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / gcc.dg / complex-1.c
blob7153433d0cba9f6782a1db770e9a311f6b1873ef
1 /* { dg-do run } */
2 /* { dg-options "-O" } */
4 /* Verify that the 6th complex floating-point argument is
5 correctly passed as unnamed argument on SPARC64. */
7 extern void abort(void);
9 void foo(long arg1, long arg2, long arg3, long arg4, long arg5, ...)
11 __builtin_va_list ap;
12 _Complex float cf;
14 __builtin_va_start(ap, arg5);
15 cf = __builtin_va_arg(ap, _Complex float);
16 __builtin_va_end(ap);
18 if (__imag__ cf != 2.0f)
19 abort();
22 int bar(long arg1, long arg2, long arg3, long arg4, long arg5, _Complex float arg6)
24 foo(arg1, arg2, arg3, arg4, arg5, arg6);
25 return 0;
28 int main(void)
30 return bar(0, 0, 0, 0, 0, 2.0fi);