comparison gcc/testsuite/gcc.dg/complex-1.c @ 111:04ced10e8804

gcc 7
author kono
date Fri, 27 Oct 2017 22:46:09 +0900
parents
children
comparison
equal deleted inserted replaced
68:561a7518be6b 111:04ced10e8804
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
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
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
28 int main(void)
29 {
30 return bar(0, 0, 0, 0, 0, 2.0fi);
31 }