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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-stable/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.dg/] [builtin-apply2.c] - Blame information for rev 826

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 298 jeremybenn
/* { dg-do run } */
2 399 jeremybenn
/* { dg-skip-if "Variadic funcs have all args on stack. Normal funcs have args in registers." { "avr-*-*" "or32-*-*" } { "*" } { "" } } */
3 298 jeremybenn
/* { dg-skip-if "Variadic funcs use Base AAPCS.  Normal funcs use VFP variant." { "arm*-*-*" } { "-mfloat-abi=hard" } { "" } } */
4
 
5
/* PR target/12503 */
6
/* Origin: <pierre.nguyen-tuong@asim.lip6.fr> */
7
 
8
/* Verify that __builtin_apply behaves correctly on targets
9
   with pre-pushed arguments (e.g. SPARC).  */
10
 
11
 
12
 
13
#define INTEGER_ARG  5
14
 
15
extern void abort(void);
16
 
17
void foo(char *name, double d, double e, double f, int g)
18
{
19
  if (g != INTEGER_ARG)
20
    abort();
21
}
22
 
23
void bar(char *name, ...)
24
{
25
  __builtin_apply(foo, __builtin_apply_args(), 64);
26
}
27
 
28
int main(void)
29
{
30 399 jeremybenn
  char dummy[64]; /* Make sure we have 64 bytes of stack to copy.  */
31
 
32 298 jeremybenn
  bar("eeee", 5.444567, 8.90765, 4.567789, INTEGER_ARG);
33
 
34
  return 0;
35
}

powered by: WebSVN 2.1.0

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