URL
https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk
Subversion Repositories openrisc_2011-10-31
[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc2/] [gcc/] [testsuite/] [g++.old-deja/] [g++.pt/] [vaarg.C] - Rev 305
Go to most recent revision | Compare with Previous | Blame | View Log
// { dg-do run }
#include <stdarg.h>
extern "C" void abort();
template <class T>
T* f(T t, ...)
{
va_list ap;
va_start(ap, t);
T* r = va_arg(ap, T*);
va_end(ap);
return r;
}
struct S
{
};
int main()
{
S s;
if (f(s, &s) != &s)
abort();
}
Go to most recent revision | Compare with Previous | Blame | View Log