[llvm-commits] [test-suite] r93976 - /test-suite/trunk/SingleSource/Regression/C/PR640.c
Dan Gohman
gohman at apple.com
Tue Jan 19 20:32:53 PST 2010
Author: djg
Date: Tue Jan 19 22:32:50 2010
New Revision: 93976
URL: http://llvm.org/viewvc/llvm-project?rev=93976&view=rev
Log:
Fix this test to work with versions of GCC which don't
support __builtin_stdarg_start.
Modified:
test-suite/trunk/SingleSource/Regression/C/PR640.c
Modified: test-suite/trunk/SingleSource/Regression/C/PR640.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/PR640.c?rev=93976&r1=93975&r2=93976&view=diff
==============================================================================
--- test-suite/trunk/SingleSource/Regression/C/PR640.c (original)
+++ test-suite/trunk/SingleSource/Regression/C/PR640.c Tue Jan 19 22:32:50 2010
@@ -16,6 +16,8 @@
return p1 == p2 && i1 == 1 && l == 0x76214365ul && i2 == 2;
}
+#if defined(__GNUC__) && \
+ ((__GNUC__ < 4) || (__GNUC__ == 4 && __GNUC_MINOR__ < 4))
static int test_stdarg_builtin_va(void* p1, ...)
{
@@ -32,14 +34,18 @@
return p1 == p2 && i1 == 1 && l == 0x76214369ul && i2 == 2;
}
+#endif
static int test_stdarg(int r)
{
char c1 = 1, c2 = 2;
if (test_stdarg_va(&r, c1, 0x76214365ul, c2, &r) != 1)
return 0;
+#if defined(__GNUC__) && \
+ ((__GNUC__ < 4) || (__GNUC__ == 4 && __GNUC_MINOR__ < 4))
if (test_stdarg_builtin_va(&r, c1, 0x76214369ul, c2, &r) != 1)
return 0;
+#endif
return r & 1;
}
More information about the llvm-commits
mailing list