OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gcc.dg/] [complex-1.c] - Blame information for rev 816

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
/* { 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
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.