Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(293)

Unified Diff: gcc/gcc/testsuite/gcc.dg/dfp/func-vararg-mixed.c

Issue 3050029: [gcc] GCC 4.5.0=>4.5.1 (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/nacl-toolchain.git
Patch Set: Created 10 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gcc/gcc/testsuite/gcc.dg/dfp/func-vararg-dfp.c ('k') | gcc/gcc/testsuite/gcc.dg/dfp/inf-1.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gcc/gcc/testsuite/gcc.dg/dfp/func-vararg-mixed.c
diff --git a/gcc/gcc/testsuite/gcc.dg/dfp/func-vararg-mixed.c b/gcc/gcc/testsuite/gcc.dg/dfp/func-vararg-mixed.c
deleted file mode 100644
index b5a5be45d7e5b414764f44445aefa85c0c4bb35b..0000000000000000000000000000000000000000
--- a/gcc/gcc/testsuite/gcc.dg/dfp/func-vararg-mixed.c
+++ /dev/null
@@ -1,117 +0,0 @@
-/* { dg-options "-std=gnu99" } */
-
-/* C99 6.5.2.2 Function calls.
- Test passing varargs of the combination of decimal float types and
- other types. */
-
-#include <stdarg.h>
-
-extern void abort (void);
-static int failcnt = 0;
-
-/* Support compiling the test to report individual failures; default is
- to abort as soon as a check fails. */
-#ifdef DBG
-#include <stdio.h>
-#define FAILURE { printf ("failed at line %d\n", __LINE__); failcnt++; }
-#else
-#define FAILURE abort ();
-#endif
-
-/* Supposing the list of varying number of arguments is:
- unsigned int, _Decimal128, double, _Decimal32, _Decimal64. */
-
-static _Decimal32
-vararg_d32 (unsigned arg, ...)
-{
- va_list ap;
- _Decimal32 result;
-
- va_start (ap, arg);
-
- va_arg (ap, unsigned int);
- va_arg (ap, _Decimal128);
- va_arg (ap, double);
- result = va_arg (ap, _Decimal32);
-
- va_end (ap);
- return result;
-}
-
-static _Decimal32
-vararg_d64 (unsigned arg, ...)
-{
- va_list ap;
- _Decimal64 result;
-
- va_start (ap, arg);
-
- va_arg (ap, unsigned int);
- va_arg (ap, _Decimal128);
- va_arg (ap, double);
- va_arg (ap, _Decimal32);
- result = va_arg (ap, _Decimal64);
-
- va_end (ap);
- return result;
-}
-
-static _Decimal128
-vararg_d128 (unsigned arg, ...)
-{
- va_list ap;
- _Decimal128 result;
-
- va_start (ap, arg);
-
- va_arg (ap, unsigned int);
- result = va_arg (ap, _Decimal128);
-
- va_end (ap);
- return result;
-}
-
-static unsigned int
-vararg_int (unsigned arg, ...)
-{
- va_list ap;
- unsigned int result;
-
- va_start (ap, arg);
-
- result = va_arg (ap, unsigned int);
-
- va_end (ap);
- return result;
-}
-
-static double
-vararg_double (unsigned arg, ...)
-{
- va_list ap;
- float result;
-
- va_start (ap, arg);
-
- va_arg (ap, unsigned int);
- va_arg (ap, _Decimal128);
- result = va_arg (ap, double);
-
- va_end (ap);
- return result;
-}
-
-
-int
-main ()
-{
- if (vararg_d32 (3, 0, 1.0dl, 2.0, 3.0df, 4.0dd) != 3.0df) FAILURE
- if (vararg_d64 (4, 0, 1.0dl, 2.0, 3.0df, 4.0dd) != 4.0dd) FAILURE
- if (vararg_d128 (1, 0, 1.0dl, 2.0, 3.0df, 4.0dd) != 1.0dl) FAILURE
- if (vararg_int (0, 0, 1.0dl, 2.0, 3.0df, 4.0dd) != 0) FAILURE
- if (vararg_double (2, 0, 1.0dl, 2.0, 3.0df, 4.0dd) != 2.0) FAILURE
-
- if (failcnt != 0)
- abort ();
- return 0;
-}
« no previous file with comments | « gcc/gcc/testsuite/gcc.dg/dfp/func-vararg-dfp.c ('k') | gcc/gcc/testsuite/gcc.dg/dfp/inf-1.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698