From patchwork Mon Nov 21 14:24:12 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rainer Orth X-Patchwork-Id: 126800 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 9CEA0B71F0 for ; Tue, 22 Nov 2011 01:25:00 +1100 (EST) Received: (qmail 23989 invoked by alias); 21 Nov 2011 14:24:55 -0000 Received: (qmail 23971 invoked by uid 22791); 21 Nov 2011 14:24:54 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL, BAYES_00, RP_MATCHES_RCVD, T_TVD_MIME_NO_HEADERS X-Spam-Check-By: sourceware.org Received: from snape.CeBiTec.Uni-Bielefeld.DE (HELO smtp-relay.CeBiTec.Uni-Bielefeld.DE) (129.70.160.84) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 21 Nov 2011 14:24:16 +0000 Received: from localhost (localhost.CeBiTec.Uni-Bielefeld.DE [127.0.0.1]) by smtp-relay.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTP id 0C97415D for ; Mon, 21 Nov 2011 15:24:14 +0100 (CET) Received: from smtp-relay.CeBiTec.Uni-Bielefeld.DE ([127.0.0.1]) by localhost (malfoy.CeBiTec.Uni-Bielefeld.DE [127.0.0.1]) (amavisd-new, port 10024) with LMTP id mTuExAcGBeGc for ; Mon, 21 Nov 2011 15:24:13 +0100 (CET) Received: from manam.CeBiTec.Uni-Bielefeld.DE (manam.CeBiTec.Uni-Bielefeld.DE [129.70.161.120]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp-relay.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTPS id 35F5015C for ; Mon, 21 Nov 2011 15:24:13 +0100 (CET) Received: (from ro@localhost) by manam.CeBiTec.Uni-Bielefeld.DE (8.14.5+Sun/8.14.5/Submit) id pALEOChV015126; Mon, 21 Nov 2011 15:24:12 +0100 (MET) From: Rainer Orth To: gcc-patches@gcc.gnu.org Subject: [testsuite] Adapt c-c++-common/tm/malloc.c for Solaris headers with C++ Date: Mon, 21 Nov 2011 15:24:12 +0100 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (usg-unix-v) MIME-Version: 1.0 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 test fails on Solaris 2 when compiled as C++: FAIL: c-c++-common/tm/malloc.c -std=gnu++98 scan-tree-dump-times tmmark " malloc .666" 1 FAIL: c-c++-common/tm/malloc.c -std=gnu++11 scan-tree-dump-times tmmark " malloc .666" 1 It scans for ' malloc', but the Solaris 2 headers are C++aware and declare std::malloc, which also appears in the dump. Fixed like this, bootstrapped on i386-pc-solaris2.11 and x86_64-unknown-linux-gnu, installed on mainline. Rainer 2011-11-20 Rainer Orth * c-c++-common/tm/malloc.c: Scan tree dumps for std::malloc if *-*-solaris2* && c++. # HG changeset patch # Parent 14645d49968bcb44c9bae98bd2df933fc3253b3c Adapt c-c++-common/tm/malloc.c for Solaris headers with C++ diff --git a/gcc/testsuite/c-c++-common/tm/malloc.c b/gcc/testsuite/c-c++-common/tm/malloc.c --- a/gcc/testsuite/c-c++-common/tm/malloc.c +++ b/gcc/testsuite/c-c++-common/tm/malloc.c @@ -17,7 +17,9 @@ void foobar(void) z = (char *)malloc (666); } -/* { dg-final { scan-tree-dump-times " malloc .666" 1 "tmmark" } } */ +/* { dg-final { scan-tree-dump-times " malloc .666" 1 "tmmark" { target { ! { *-*-solaris2* && c++ } } } } } */ +/* Solaris 2 headers are C++-aware and declare std::malloc. */ +/* { dg-final { scan-tree-dump-times " std::malloc .666" 1 "tmmark" { target { *-*-solaris2* && c++ } } } } */ /* { dg-final { scan-tree-dump-times "__builtin__ITM_malloc" 1 "tmmark" } } */ /* { dg-final { scan-tree-dump-times "__builtin__ITM_calloc" 1 "tmmark" } } */ /* { dg-final { scan-tree-dump-times "__builtin__ITM_free" 2 "tmmark" } } */