Add a test function which verifies we can pass a struct ptr to va_arg for all supported architectures. The bug has been identify by trying to compile FFTW-3.3.8.

This commit is contained in:
Christian Jullien 2020-03-22 08:40:35 +01:00
parent ec0e93616f
commit 5ade19c421

View File

@ -2679,6 +2679,18 @@ void manyarg_test(void)
42.0, 43.0, ld);
}
void*
va_arg_with_struct_ptr(va_list ap) {
/*
* This was a BUG identified with FFTW-3.3.8 on arm64.
* The test case only checks it compiles on all supported
* architectures. This function is not currently called.
*/
struct X { int _x; };
struct X *x = va_arg(ap, struct X *);
return x;
}
void vprintf1(const char *fmt, ...)
{
va_list ap, aq;