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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gcc.dg/] [titype-1.c] - Rev 823

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

/* { dg-do run } */
 
/* Not all platforms support TImode integers.  */
#if defined(__LP64__) && !defined(__hppa__)
typedef int TItype __attribute__ ((mode (TI)));
#else
typedef long TItype;
#endif
 
#include <stdarg.h>
 
extern void abort(void);
 
 
void foo(int i, ...)
{
  TItype q;
  va_list va;
 
  va_start(va, i);
  q = va_arg(va, TItype);
  va_end(va);
 
  if (q != 5)
    abort();
}
 
int main(void)
{
  TItype q = 5;
 
  foo(1, q);
  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.