From patchwork Sat Jul 3 08:28:33 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Iain Sandoe X-Patchwork-Id: 57795 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 3EF5EB707F for ; Sat, 3 Jul 2010 18:28:55 +1000 (EST) Received: (qmail 19886 invoked by alias); 3 Jul 2010 08:28:53 -0000 Received: (qmail 19871 invoked by uid 22791); 3 Jul 2010 08:28:52 -0000 X-SWARE-Spam-Status: No, hits=-2.1 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_NONE X-Spam-Check-By: sourceware.org Received: from c2bthomr04.btconnect.com (HELO c2bthomr04.btconnect.com) (213.123.20.122) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 03 Jul 2010 08:28:47 +0000 Received: from thor.office (host81-138-1-83.in-addr.btopenworld.com [81.138.1.83]) by c2bthomr04.btconnect.com with ESMTP id MWY21120; Sat, 3 Jul 2010 09:28:34 +0100 (BST) X-Mirapoint-IP-Reputation: reputation=Fair-1, source=Queried, refid=0001.0A0B0301.4C2EF4B2.00DD, actions=tag Message-Id: From: IainS To: GCC Patches Reply-To: iains@gcc.gnu.org Subject: [Patch ObjC++/testsuite] Fix PR44518 Mime-Version: 1.0 (Apple Message framework v936) Date: Sat, 3 Jul 2010 09:28:33 +0100 Cc: mrs@gcc.gnu.org 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 This should fix PR44518 on trunk. Since I don't have access to real hardware for some of the affected targets, I'm going to hold off on the branch for a couple of test cycles. tested on {powepc*,i686}-apple-darwin{8,9}, x86_64-apple-darwin10, {i686,x86_64}-unknown-linux-gnu, cris-elf(sim), s390x(compile-only), armel-linux-eabi(compile-only), mipsisa64-elf(sim). I don't have the means to test hppa or to run executables on s390x - since these are affected targets, I'd appreciate any feedback on success/failure of the fixes. Thanks to Mikael Pettersson for input on the solutions. See also http://gcc.gnu.org/ml/gcc/2010-06/msg00804.html for Ian's comment on the scan-file solution. Applied under Mike's pre-approval for ObjC testsuite fixes (and as a fix for an earlier patch). cheers, Iain testsuite/ChangeLog: 2010-07-03 Iain Sandoe Mikael Pettersson PR testsuite/44518 * obj-c++.dg/encode-2.mm: Produce object and save temps. Make signed-ness of chars explicit. Scan the object for strings that are split by some target assemblers. * obj-c++.dg/encode-3.mm: Make the signed-ness of chars explicit. return 0; Index: gcc/testsuite/obj-c++.dg/encode-2.mm =================================================================== --- gcc/testsuite/obj-c++.dg/encode-2.mm (revision 161768) +++ gcc/testsuite/obj-c++.dg/encode-2.mm (working copy) @@ -1,4 +1,5 @@ -/* { dg-do compile } */ +/* { dg-do assemble } */ +/* { dg-options "-save-temps" } */ template struct Vec { @@ -11,7 +12,7 @@ typedef struct { Vec fvec; float fscalar; double dscalar; - Vec chVec; + Vec chVec; int iscalar; } anonymous; @@ -23,4 +24,5 @@ const char *enc3 = @encode(anonymous); /* { dg-final { scan-assembler "{Vec=ffi}" } } */ /* { dg-final { scan-assembler "{Vec=ddi}" } } */ -/* { dg-final { scan-assembler "{?={Vec=ddi} {Vec=ffi}fd{Vec=cci}i}" } } */ +/* { dg-final { scan-file "encode-2.o" "{?={Vec=ddi} {Vec=ffi}fd{Vec=cci}i}" } } +/* { dg-final cleanup-saved-temps } */ Index: gcc/testsuite/obj-c++.dg/encode-3.mm =================================================================== --- gcc/testsuite/obj-c++.dg/encode-3.mm (revision 161768) +++ gcc/testsuite/obj-c++.dg/encode-3.mm (working copy) @@ -18,7 +18,7 @@ typedef struct { int iscalar; long z; long long zz; - Vec cv; + Vec cv; } anonymous; //Vec dd; @@ -44,7 +44,7 @@ int main(void) { if (strcmp (enc2, "{Vec=dd" L "q}")) _exit(-(__LINE__)); - if (strcmp (enc3, "{?=f[10d]i" L "q{Vec=rcrc" L "q}}")) + if (strcmp (enc3, "{?=f[10d]i" L "q{Vec=rcrc" L "q}}")) _exit(-(__LINE__));