From patchwork Thu Mar 3 11:35:49 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yufeng Zhang X-Patchwork-Id: 85257 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id 390DFB70F6 for ; Thu, 3 Mar 2011 22:36:05 +1100 (EST) Received: (qmail 4811 invoked by alias); 3 Mar 2011 11:36:03 -0000 Received: (qmail 4708 invoked by uid 22791); 3 Mar 2011 11:36:02 -0000 X-SWARE-Spam-Status: No, hits=-2.1 required=5.0 tests=AWL, BAYES_00, MSGID_MULTIPLE_AT, RCVD_IN_DNSWL_LOW, TW_CX X-Spam-Check-By: sourceware.org Received: from service87.mimecast.com (HELO service87.mimecast.com) (94.185.240.25) by sourceware.org (qpsmtpd/0.43rc1) with SMTP; Thu, 03 Mar 2011 11:35:58 +0000 Received: from cam-owa1.Emea.Arm.com (fw-tnat.cambridge.arm.com [217.140.96.21]) by service87.mimecast.com; Thu, 03 Mar 2011 11:35:54 +0000 Received: from e102530 ([10.1.255.212]) by cam-owa1.Emea.Arm.com with Microsoft SMTPSVC(6.0.3790.0); Thu, 3 Mar 2011 11:35:53 +0000 From: "Yufeng Zhang" To: Subject: [PATCH, C++ testsuite] Fix g++.dg/abi/arm_cxa_vec1.C Date: Thu, 3 Mar 2011 11:35:49 -0000 Message-ID: <000101cbd997$25854090$708fc1b0$@Zhang@arm.com> MIME-Version: 1.0 X-MC-Unique: 111030311355407301 X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org 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 * 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 -#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;