Adapted from tests from Franz Sirl:
* gcc.c-torture/execute/va-arg-7.c: New test. * gcc.c-torture/execute/va-arg-8.c: New test. From-SVN: r28407
This commit is contained in:
parent
5f59ecb700
commit
54dd04be06
@ -1,3 +1,9 @@
|
||||
Mon Aug 2 13:35:12 1999 Richard Henderson <rth@cygnus.com>
|
||||
|
||||
Adapted from tests from Franz Sirl:
|
||||
* gcc.c-torture/execute/va-arg-7.c: New test.
|
||||
* gcc.c-torture/execute/va-arg-8.c: New test.
|
||||
|
||||
Sun Aug 1 22:29:34 1999 Jeffrey A Law (law@cygnus.com)
|
||||
|
||||
* gcc.c-torture/compile/990801-2.c: New test.
|
||||
|
31
gcc/testsuite/gcc.c-torture/execute/va-arg-7.c
Normal file
31
gcc/testsuite/gcc.c-torture/execute/va-arg-7.c
Normal file
@ -0,0 +1,31 @@
|
||||
/* Origin: Franz Sirl <Franz.Sirl-kernel@lauterbach.com> */
|
||||
|
||||
#include <varargs.h>
|
||||
|
||||
inline void
|
||||
debug(i1, i2, i3, i4, i5, i6, i7, f1, f2, f3, f4, f5, f6, f7, f8, f9, va_alist)
|
||||
int i1, i2, i3, i4, i5, i6, i7;
|
||||
double f1, f2, f3, f4, f5, f6, f7, f8, f9;
|
||||
va_dcl
|
||||
{
|
||||
va_list ap;
|
||||
|
||||
va_start (ap);
|
||||
|
||||
if (va_arg (ap,int) != 8)
|
||||
abort ();
|
||||
if (va_arg (ap,int) != 9)
|
||||
abort ();
|
||||
if (va_arg (ap,int) != 10)
|
||||
abort ();
|
||||
|
||||
va_end (ap);
|
||||
}
|
||||
|
||||
int
|
||||
main(void)
|
||||
{
|
||||
debug (1, 2, 3, 4, 5, 6, 7, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0,
|
||||
8.0, 9.0, 8, 9, 10);
|
||||
exit (0);
|
||||
}
|
42
gcc/testsuite/gcc.c-torture/execute/va-arg-8.c
Normal file
42
gcc/testsuite/gcc.c-torture/execute/va-arg-8.c
Normal file
@ -0,0 +1,42 @@
|
||||
/* Origin: Franz Sirl <Franz.Sirl-kernel@lauterbach.com> */
|
||||
|
||||
#include <varargs.h>
|
||||
#include <limits.h>
|
||||
|
||||
#if __LONG_LONG_MAX__ == 9223372036854775807LL
|
||||
|
||||
typedef long long int INT64;
|
||||
|
||||
inline void
|
||||
debug(i1, i2, i3, i4, i5, i6, i7, i8, i9, va_alist)
|
||||
int i1, i2, i3, i4, i5, i6, i7, i8, i9;
|
||||
va_dcl
|
||||
{
|
||||
va_list ap;
|
||||
|
||||
va_start (ap);
|
||||
|
||||
if (va_arg (ap,int) != 10)
|
||||
abort ();
|
||||
if (va_arg (ap,INT64) != 0x123400005678LL)
|
||||
abort ();
|
||||
|
||||
va_end (ap);
|
||||
}
|
||||
|
||||
int
|
||||
main(void)
|
||||
{
|
||||
debug(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 0x123400005678LL);
|
||||
exit(0);
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
int
|
||||
main(void)
|
||||
{
|
||||
exit(0);
|
||||
}
|
||||
|
||||
#endif /* long long 64 bits */
|
Loading…
x
Reference in New Issue
Block a user