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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.c-torture/] [execute/] [va-arg-23.c] - Blame information for rev 774

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 688 jeremybenn
/* PR 9700 */
2
/* Alpha got the base address for the va_list incorrect when there was
3
   a structure that was passed partially in registers and partially on
4
   the stack.  */
5
 
6
#include <stdarg.h>
7
 
8
struct two { long x, y; };
9
 
10
void foo(int a, int b, int c, int d, int e, struct two f, int g, ...)
11
{
12
  va_list args;
13
  int h;
14
 
15
  va_start(args, g);
16
  h = va_arg(args, int);
17
  if (g != 1 || h != 2)
18
    abort ();
19
}
20
 
21
int main()
22
{
23
  struct two t = { 0, 0 };
24
  foo(0, 0, 0, 0, 0, t, 1, 2);
25
  return 0;
26
}

powered by: WebSVN 2.1.0

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