From patchwork Wed Feb 22 16:21:17 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kai Tietz X-Patchwork-Id: 142504 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 77C41B6F9F for ; Thu, 23 Feb 2012 03:22:08 +1100 (EST) Comment: DKIM? See http://www.dkim.org DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=gcc.gnu.org; s=default; x=1330532530; h=Comment: DomainKey-Signature:Received:Received:Received:Received: Received-SPF:Received:MIME-Version:Received:Received:Date: Message-ID:Subject:From:To:Content-Type:Mailing-List:Precedence: List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender: Delivered-To; bh=prFGJTVb17zc/5nk2lPL2ZE6xmU=; b=pWz1QBrGm4iH9/2 UhvNpDI2qpaE/jIae/kHxWhHI980JngbcRdpJmXK2UbAgPj3JL5oowLWSms2vaGX 6qugdjzBgEyLKzw5okOSE7evmtUfIp19t8NVUxwnSPm8gt/QfG/xGXsSRrW+ANEx TCfSDx1ziuuYJOon6uuVXthvWKSc= Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=gcc.gnu.org; h=Received:Received:X-SWARE-Spam-Status:X-Spam-Check-By:Received:Received:Received-SPF:Authentication-Results:Received:MIME-Version:Received:Received:Date:Message-ID:Subject:From:To:Content-Type:X-IsSubscribed:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=BTC/WKUJtCjV8N/yVXcrE1xFndgNWrFfG4IiaTGIJ2R0e0q1hURpwnugtIBIU7 4U2z7rb54OZ/0nCStI7xB6OZuswaGlWyRqXBZjb3G55KWIc1Tz1spZ9GOblVyKTi Tzyan39gs9mHwC6hbKoifLBIjvoschEFSQakfTAtpPQyc=; Received: (qmail 807 invoked by alias); 22 Feb 2012 16:22:03 -0000 Received: (qmail 782 invoked by uid 22791); 22 Feb 2012 16:22:01 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL, BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW X-Spam-Check-By: sourceware.org Received: from mail-tul01m020-f175.google.com (HELO mail-tul01m020-f175.google.com) (209.85.214.175) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 22 Feb 2012 16:21:18 +0000 Received: by obhx4 with SMTP id x4so256963obh.20 for ; Wed, 22 Feb 2012 08:21:17 -0800 (PST) Received-SPF: pass (google.com: domain of ktietz70@googlemail.com designates 10.60.22.228 as permitted sender) client-ip=10.60.22.228; Authentication-Results: mr.google.com; spf=pass (google.com: domain of ktietz70@googlemail.com designates 10.60.22.228 as permitted sender) smtp.mail=ktietz70@googlemail.com; dkim=pass header.i=ktietz70@googlemail.com Received: from mr.google.com ([10.60.22.228]) by 10.60.22.228 with SMTP id h4mr14590259oef.57.1329927677388 (num_hops = 1); Wed, 22 Feb 2012 08:21:17 -0800 (PST) MIME-Version: 1.0 Received: by 10.60.22.228 with SMTP id h4mr12539031oef.57.1329927677300; Wed, 22 Feb 2012 08:21:17 -0800 (PST) Received: by 10.182.33.103 with HTTP; Wed, 22 Feb 2012 08:21:17 -0800 (PST) Date: Wed, 22 Feb 2012 17:21:17 +0100 Message-ID: Subject: [patch testsuite/g++.dg]: Adjust some tests for *-*-mingw* targets From: Kai Tietz To: GCC Patches 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, this patch fixes some failures running the g++ testsuite for Windows native targets. ChangeLog 2012-02-22 Kai Tietz * g++.dg/opt/devirt2.C: Add rule for *-*-mingw* target. * opt/pr48549.C (long): Replace by long by __PTRDIFF_TYPE__ derived pdiff_t type. * g++.dg/torture/pr49720.C: Likewise Tested for i686-w64-mingw32, x86_64-w64-mingw32, and for x86_64-unknown-linux-gnu. Ok for apply? Regards, Kai Index: g++.dg/opt/devirt2.C =================================================================== --- g++.dg/opt/devirt2.C (revision 184483) +++ g++.dg/opt/devirt2.C (working copy) @@ -5,7 +5,9 @@ // { dg-additional-options "-mshort-calls" {target epiphany-*-*} } // Using -mno-abicalls avoids a R_MIPS_JALR .reloc. // { dg-additional-options "-mno-abicalls" { target mips*-*-* } } -// { dg-final { scan-assembler-times "xyzzy" 2 { target { ! { alpha*-*-* hppa*-*-* ia64*-*-hpux* sparc*-*-* } } } } } +// { dg-final { scan-assembler-times "xyzzy" 2 { target { ! { alpha*-*-* hppa*-*-* ia64*-*-hpux* sparc*-*-* *-*-mingw* } } } } } +// For *-*-mingw* there is additionally one .def match +// { dg-final { scan-assembler-times "xyzzy" 3 { target *-*-mingw* } } } // The IA64 and HPPA compilers generate external declarations in addition // to the call so those scans need to be more specific. // { dg-final { scan-assembler-times "br\[^\n\]*xyzzy" 2 { target ia64*-*-hpux* } } } Index: g++.dg/opt/pr48549.C =================================================================== --- g++.dg/opt/pr48549.C (revision 184483) +++ g++.dg/opt/pr48549.C (working copy) @@ -2,10 +2,13 @@ // { dg-do compile } // { dg-options "-fcompare-debug -O2" } +__extension__ typedef __PTRDIFF_TYPE__ pdiff_t; + void foo (void *from, void *to) { - long offset = reinterpret_cast (to) - reinterpret_cast (from); + pdiff_t offset = reinterpret_cast (to) + - reinterpret_cast (from); if (offset != static_cast (offset)) *(int *) 0xC0DE = 0; reinterpret_cast (from)[1] = offset; Index: g++.dg/torture/pr49720.C =================================================================== --- g++.dg/torture/pr49720.C (revision 184483) +++ g++.dg/torture/pr49720.C (working copy) @@ -1,8 +1,10 @@ /* { dg-do compile } */ +__extension__ typedef __PTRDIFF_TYPE__ pdiff_t; + extern char t_start[], t_end[], t_size[]; bool foo (void) { - long size = reinterpret_cast(t_size); + pdiff_t size = reinterpret_cast(t_size); return (size == t_end - t_start); }