public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH, C++ testsuite] Fix g++.dg/abi/arm_cxa_vec1.C
@ 2011-03-03 11:36 Yufeng Zhang
  2011-03-24 16:28 ` Richard Earnshaw
  0 siblings, 1 reply; 2+ messages in thread
From: Yufeng Zhang @ 2011-03-03 11:36 UTC (permalink / raw)
  To: gcc-patches

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;




^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH, C++ testsuite] Fix g++.dg/abi/arm_cxa_vec1.C
  2011-03-03 11:36 [PATCH, C++ testsuite] Fix g++.dg/abi/arm_cxa_vec1.C Yufeng Zhang
@ 2011-03-24 16:28 ` Richard Earnshaw
  0 siblings, 0 replies; 2+ messages in thread
From: Richard Earnshaw @ 2011-03-24 16:28 UTC (permalink / raw)
  To: Yufeng Zhang; +Cc: gcc-patches


On Thu, 2011-03-03 at 11:35 +0000, Yufeng Zhang wrote:
> 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.
> 

OK.

R.



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-03-24 16:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-03-03 11:36 [PATCH, C++ testsuite] Fix g++.dg/abi/arm_cxa_vec1.C Yufeng Zhang
2011-03-24 16:28 ` Richard Earnshaw

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).