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] - Rev 701

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

// Test stdarg function with anonymous argument
// { dg-do run }
// { dg-options "-Wno-abi" { target arm_eabi } }

#include <stdarg.h>

extern "C" void abort (void);

void baz (va_list list)
{
  if (va_arg (list, long) != 3)
    abort ();
}

void foo (long p1, long, long p2, ...)
{
  va_list list;
  va_start (list, p2);
  baz (list);
  va_end (list);
}

int main ()
{
  foo (0, 1, 2, (long)3);
  return 0;
}

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

powered by: WebSVN 2.1.0

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