[PATCH, C++ testsuite] Fix g++.dg/abi/arm_cxa_vec1.C
Yufeng Zhang
Yufeng.Zhang@arm.com
Thu Mar 3 11:36:00 GMT 2011
Hi,
Here is a patch that fixes a problem in one g++ test case. A typo (of
using the macro ___ARM_EABI__ rather than __ARM_EABI__) has made the
original test case almost a NOP.
Also with a few other changes that make the test work properly.
I have already tested the updated test case that it still passes with
arm-eabi as an expected pass and passes with x86 as an unsupported test.
OK for the trunk?
Thanks,
Yufeng
2011-03-03 Yufeng Zhang <yufeng.zhang@arm.com>
* g++.dg/abi/arm_cxa_vec1.C: Correct the typos/errors in the
test case.
Index: gcc/testsuite/g++.dg/abi/arm_cxa_vec1.C
===================================================================
--- gcc/testsuite/g++.dg/abi/arm_cxa_vec1.C (revision 170373)
+++ gcc/testsuite/g++.dg/abi/arm_cxa_vec1.C (working copy)
@@ -3,10 +3,12 @@
#include <cxxabi.h>
-#ifdef ___ARM_EABI__
-static void cctor (void * a, void * b)
+#ifdef __ARM_EABI__
+using namespace __cxxabiv1;
+static __cxa_cdtor_return_type cctor (void * a, void * b)
{
- *(char *) a = *(char *) b
+ *(char *) a = *(char *) b;
+ return a;
}
int main()
@@ -15,10 +17,10 @@
char data2;
char *p;
- p = __cxa_vec_ctor (&data, 1, 1, NULL, NULL);
+ p = (char *) __cxa_vec_ctor (&data, 1, 1, NULL, NULL);
if (p != &data)
return 1;
- p = __cxa_vec_cctor (&data2, &data, 1, 1, cctor, NULL);
+ p = (char *) __cxa_vec_cctor (&data2, &data, 1, 1, cctor, NULL);
if (p != &data2)
return 1;
More information about the Gcc-patches
mailing list