Sign in
gnu
/
gcc
/
1f16a020acbea0af26209478990b83b1a1ba3a2b
/
.
/
gcc
/
testsuite
/
g++.old-deja
/
g++.pt
/
vaarg.C
blob: c5a8c804ed2dbd108a94c42743f25764472a3795 [
file
] [
log
] [
blame
]
// { 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
();
}