URL
https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk
Subversion Repositories openrisc_me
[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [g++.old-deja/] [g++.pt/] [vaarg.C] - Rev 305
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();
}