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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [other/] [stdarg1.C] - Blame information for rev 717

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

Line No. Rev Author Line
1 693 jeremybenn
// Test stdarg function with anonymous argument
2
// { dg-do run }
3
// { dg-options "-Wno-abi" { target arm_eabi } }
4
 
5
#include 
6
 
7
extern "C" void abort (void);
8
 
9
void baz (va_list list)
10
{
11
  if (va_arg (list, long) != 3)
12
    abort ();
13
}
14
 
15
void foo (long p1, long, long p2, ...)
16
{
17
  va_list list;
18
  va_start (list, p2);
19
  baz (list);
20
  va_end (list);
21
}
22
 
23
int main ()
24
{
25
  foo (0, 1, 2, (long)3);
26
  return 0;
27
}

powered by: WebSVN 2.1.0

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