From patchwork Fri Nov 3 11:12:44 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thomas Schwinge X-Patchwork-Id: 161243 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:8f47:0:b0:403:3b70:6f57 with SMTP id j7csp947470vqu; Fri, 3 Nov 2023 04:13:26 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFH4xxk8WvVBRKl8NCgSQVib3vKREFCKF4EWQZWM1cxJVt9I1ovW2t1MdKP2urVv+q8G4kV X-Received: by 2002:a05:6870:a249:b0:1e9:9bad:8989 with SMTP id g9-20020a056870a24900b001e99bad8989mr24719949oai.25.1699010006203; Fri, 03 Nov 2023 04:13:26 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1699010006; cv=pass; d=google.com; s=arc-20160816; b=wdBVJigGeawu5WcyJoHMg/7QteLKZmSWpaMhGvicY12773lxgy+/EsvVEJq9UH/R3a YM46uqCnAX0hUubeavOl3C0ABNQPH6KXba/eOy1x3n0hnsxud7peVO78n96PpoZCA8Ow LGz5g8W/DZ9UCMdQpxm/DobX28R0fxTb64qZtBCmH8I9SqdRF8XxA2TGsxCf8nG1AnzK eIOdfmhedpb9N48Renz++d6IBwUv/A5lS/JTc2vkGVbfgvt0uZerXqn+/xhYzucnQdcF nKyug7pIxb2MHVOtnizxovn+7jE8hnpjZzj0/pBeGg1YGObcYenMR7paBUH5RAuiw4Lf xZig== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:mime-version:message-id:date :user-agent:references:in-reply-to:subject:cc:to:from:ironport-sdr :arc-filter:dmarc-filter:delivered-to; bh=sn7QZZh2HAyvurL2FrPLVarg/Noqy9X4hM06T8mDiM8=; fh=33FMJg+zv+6ZeEjAJjE1pDjK01DxLgM8jDRnAnc+lPs=; b=kylKLUf1GHJ/BC/HTbz5fJvS9Ss3GT2iRcRC+qrqevYkVICGUpBPwWpIDJwx/OCLEi lhMaxtZvlXgqBZIHKJX+aHueCBQ8P3ghnsIpRLtz5x+riheFGoZngoko1x6uNu3ZQDNi NE2GG3NMMYqncj9ag0L2FHbuTgrf2Cx+BBWTRuS4tNG8puVCG6OHTnRfzs6EsESuEsTx 0zw4tjNUQhHOQQZSap6rrEVpkb3HbkEjaATZJakgKx/R+xQpe1rc9KznyJFSFsB0hj5l IrQrVfHQ5BnN+uEVrhlWhH99D07VxONa87RUfeyGJ+7ivZemZh9rClO53Q0X6wLsHu2m F21w== ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from server2.sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id u3-20020ac858c3000000b0041e47735607si1228831qta.557.2023.11.03.04.13.26 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Nov 2023 04:13:26 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id EFBE33858423 for ; Fri, 3 Nov 2023 11:13:25 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from esa1.mentor.iphmx.com (esa1.mentor.iphmx.com [68.232.129.153]) by sourceware.org (Postfix) with ESMTPS id C35EE3858D28 for ; Fri, 3 Nov 2023 11:13:01 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org C35EE3858D28 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=mentor.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org C35EE3858D28 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=68.232.129.153 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1699009983; cv=none; b=C6/+BLO+80LlcUQNpBQi07/rJRH5eogHJRzPiG7TZzTW0UDm+/4d6Y2cdf7lUYt/P+tW0W7oCxLG/UxdS4CkRq9GZqyk0+DXC1MS3v1trrF48sCLOcgEH39aP8qk/RTktXY/roOLaAcpEilwqpmqfEIclGKWiZeUCeG8OPc2NFQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1699009983; c=relaxed/simple; bh=HuGpV6xrKoNu+iGQ1quA3X9k3jBeJXZXIdvYvu+Grxo=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=TE3PILQ4BqPVcAYuGeipNnXVAxOj4JCTXjDg6K5/995gQEICE9dvDIGJjWe27uIXmP+4WzVicYhKvkUy35CBR2e/FR8tIxZmvz7tyfAjOvHV+AUSs0J3lzFhSfDIDP0ionDvjkLcT2nqTHq8W69bqVv5T7Vi7xCiYMA9tu8E/s4= ARC-Authentication-Results: i=1; server2.sourceware.org X-CSE-ConnectionGUID: sIYaFbyDT3uru2Hs4KPppg== X-CSE-MsgGUID: zFYcOULRSk+rKV7Nb6F6rA== X-IronPort-AV: E=Sophos;i="6.03,273,1694764800"; d="scan'208,223";a="24602488" Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa1.mentor.iphmx.com with ESMTP; 03 Nov 2023 03:12:59 -0800 IronPort-SDR: bg/X/kzFTVayiutobmdEcueg0JgGXYTdIrmcwsljzgyY4KcrZO3U6F/kvInA875SfuDY00mjNA mv0dtGTDNhWtWsG53YizxDRfupCMBF0Tc3oaz+PKY8q0VC0rgIRCkQrr8F93fNElXRXyhGmgUf //U0ZIpOKmWDh9phGF/+hJLdkmhG+fFxMMn7O58z12f1fg2rzJSE41yG06p2EPexcyVQ5GKfCz g70pAKmpwYsQYNMm6/37NFlyevi73YdZO+d0Hizm2o7g+3wDuRfq16f2mN0RLN1UMh/Qbw93PJ fbk= From: Thomas Schwinge To: , Jason Merrill CC: Jonathan Wakely , Nathan Sidwell Subject: Skip a number of 'g++.dg/tree-prof/' test cases for '-fno-exceptions' testing (was: Skip a number of C++ test cases for '-fno-exceptions' testing (was: Support in the GCC(/C++) test suites for '-fno-exceptions')) In-Reply-To: <87r0qcemq3.fsf@euler.schwinge.homeip.net> References: <873534qu9e.fsf@euler.schwinge.homeip.net> <87wn04eoyd.fsf@euler.schwinge.homeip.net> <87r0qcemq3.fsf@euler.schwinge.homeip.net> User-Agent: Notmuch/0.29.3+94~g74c3f1b (https://notmuchmail.org) Emacs/28.2 (x86_64-pc-linux-gnu) Date: Fri, 3 Nov 2023 12:12:44 +0100 Message-ID: <87edh7t7ir.fsf@euler.schwinge.homeip.net> MIME-Version: 1.0 X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: svr-ies-mbx-12.mgc.mentorg.com (139.181.222.12) To svr-ies-mbx-10.mgc.mentorg.com (139.181.222.10) X-Spam-Status: No, score=-11.8 required=5.0 tests=BAYES_00, GIT_PATCH_0, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, SPF_HELO_PASS, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1781541116180882741 X-GMAIL-MSGID: 1781541116180882741 Hi! On 2023-06-15T18:04:04+0200, I wrote: > [...], OK to push the attached > "Skip a number of C++ 'g++.dg/tree-prof/' test cases for '-fno-exceptions' testing"? Pushed to master branch commit 3881d010dca9b5db5301f28e4a1e3a8e4bc40faa "Skip a number of 'g++.dg/tree-prof/' test cases for '-fno-exceptions' testing", see attached. Grüße Thomas ----------------- Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstraße 201, 80634 München; Gesellschaft mit beschränkter Haftung; Geschäftsführer: Thomas Heurung, Frank Thürauf; Sitz der Gesellschaft: München; Registergericht München, HRB 106955 From 3881d010dca9b5db5301f28e4a1e3a8e4bc40faa Mon Sep 17 00:00:00 2001 From: Thomas Schwinge Date: Wed, 14 Jun 2023 22:39:01 +0200 Subject: [PATCH] Skip a number of 'g++.dg/tree-prof/' test cases for '-fno-exceptions' testing Running 'make check' with: 'RUNTESTFLAGS=--target_board=unix/-fno-exceptions', 'error: exception handling disabled' is triggered for C++ 'throw' etc. usage, and per 'gcc/testsuite/lib/gcc-dg.exp:gcc-dg-prune': # If exceptions are disabled, mark tests expecting exceptions to be enabled # as unsupported. if { ![check_effective_target_exceptions_enabled] } { if [regexp "(^|\n)\[^\n\]*: error: exception handling disabled" $text] { return "::unsupported::exception handling disabled" } ..., which generally means: -PASS: [...] (test for excess errors) +UNSUPPORTED: [...]: exception handling disabled However, this doesn't work for 'g++.dg/tree-prof/' test cases. For example: [-PASS:-]{+UNSUPPORTED:+} g++.dg/tree-prof/indir-call-prof-2.C [-compilation, -fprofile-generate -D_PROFILE_GENERATE-]{+compilation: exception handling disabled+} [-PASS:-]{+UNRESOLVED:+} g++.dg/tree-prof/indir-call-prof-2.C execution, -fprofile-generate -D_PROFILE_GENERATE [-PASS:-]{+UNRESOLVED:+} g++.dg/tree-prof/indir-call-prof-2.C compilation, -fprofile-use -D_PROFILE_USE [-PASS:-]{+UNRESOLVED:+} g++.dg/tree-prof/indir-call-prof-2.C execution, -fprofile-use -D_PROFILE_USE Dependent tests turn UNRESOLVED if the first "compilation" runs into the expected 'UNSUPPORTED: [...] compile: exception handling disabled'. Specify 'dg-require-effective-target exceptions_enabled' for those test cases. gcc/testsuite/ * g++.dg/tree-prof/indir-call-prof-2.C: Specify 'dg-require-effective-target exceptions_enabled'. * g++.dg/tree-prof/partition1.C: Likewise. * g++.dg/tree-prof/partition2.C: Likewise. * g++.dg/tree-prof/partition3.C: Likewise. * g++.dg/tree-prof/pr51719.C: Likewise. * g++.dg/tree-prof/pr57451.C: Likewise. * g++.dg/tree-prof/pr59255.C: Likewise. --- gcc/testsuite/g++.dg/tree-prof/indir-call-prof-2.C | 1 + gcc/testsuite/g++.dg/tree-prof/partition1.C | 1 + gcc/testsuite/g++.dg/tree-prof/partition2.C | 1 + gcc/testsuite/g++.dg/tree-prof/partition3.C | 1 + gcc/testsuite/g++.dg/tree-prof/pr51719.C | 1 + gcc/testsuite/g++.dg/tree-prof/pr57451.C | 1 + gcc/testsuite/g++.dg/tree-prof/pr59255.C | 1 + 7 files changed, 7 insertions(+) diff --git a/gcc/testsuite/g++.dg/tree-prof/indir-call-prof-2.C b/gcc/testsuite/g++.dg/tree-prof/indir-call-prof-2.C index e20cc64d373..5b6f172b025 100644 --- a/gcc/testsuite/g++.dg/tree-prof/indir-call-prof-2.C +++ b/gcc/testsuite/g++.dg/tree-prof/indir-call-prof-2.C @@ -1,3 +1,4 @@ +/* Explicit { dg-require-effective-target exceptions_enabled } so that dependent tests don't turn UNRESOLVED for '-fno-exceptions'. */ /* { dg-options "-O" } */ int foo1(void) { return 0; } diff --git a/gcc/testsuite/g++.dg/tree-prof/partition1.C b/gcc/testsuite/g++.dg/tree-prof/partition1.C index d0dcbc4524b..8dd64aa27a5 100644 --- a/gcc/testsuite/g++.dg/tree-prof/partition1.C +++ b/gcc/testsuite/g++.dg/tree-prof/partition1.C @@ -1,3 +1,4 @@ +/* Explicit { dg-require-effective-target exceptions_enabled } so that dependent tests don't turn UNRESOLVED for '-fno-exceptions'. */ /* { dg-require-effective-target freorder } */ /* { dg-options "-O2 -freorder-blocks-and-partition" } */ diff --git a/gcc/testsuite/g++.dg/tree-prof/partition2.C b/gcc/testsuite/g++.dg/tree-prof/partition2.C index 0bc50fae98a..580d0e06c00 100644 --- a/gcc/testsuite/g++.dg/tree-prof/partition2.C +++ b/gcc/testsuite/g++.dg/tree-prof/partition2.C @@ -1,4 +1,5 @@ // PR middle-end/45458 +// Explicit { dg-require-effective-target exceptions_enabled } so that dependent tests don't turn UNRESOLVED for '-fno-exceptions'. // { dg-require-effective-target freorder } // { dg-options "-O2 -fnon-call-exceptions -freorder-blocks-and-partition" } diff --git a/gcc/testsuite/g++.dg/tree-prof/partition3.C b/gcc/testsuite/g++.dg/tree-prof/partition3.C index c62174aa4d3..6cd51cc157e 100644 --- a/gcc/testsuite/g++.dg/tree-prof/partition3.C +++ b/gcc/testsuite/g++.dg/tree-prof/partition3.C @@ -1,4 +1,5 @@ // PR middle-end/45566 +// Explicit { dg-require-effective-target exceptions_enabled } so that dependent tests don't turn UNRESOLVED for '-fno-exceptions'. // { dg-require-effective-target freorder } // { dg-options "-O2 -fnon-call-exceptions -freorder-blocks-and-partition" } diff --git a/gcc/testsuite/g++.dg/tree-prof/pr51719.C b/gcc/testsuite/g++.dg/tree-prof/pr51719.C index 01e81ff66ed..a4c99a1db87 100644 --- a/gcc/testsuite/g++.dg/tree-prof/pr51719.C +++ b/gcc/testsuite/g++.dg/tree-prof/pr51719.C @@ -1,4 +1,5 @@ // PR tree-optimization/51719 +// Explicit { dg-require-effective-target exceptions_enabled } so that dependent tests don't turn UNRESOLVED for '-fno-exceptions'. // { dg-options "-O -fpartial-inlining" } int diff --git a/gcc/testsuite/g++.dg/tree-prof/pr57451.C b/gcc/testsuite/g++.dg/tree-prof/pr57451.C index db0fcc1e8ef..8fbc1214095 100644 --- a/gcc/testsuite/g++.dg/tree-prof/pr57451.C +++ b/gcc/testsuite/g++.dg/tree-prof/pr57451.C @@ -1,3 +1,4 @@ +// Explicit { dg-require-effective-target exceptions_enabled } so that dependent tests don't turn UNRESOLVED for '-fno-exceptions'. // { dg-require-effective-target freorder } // { dg-options "-O2 -freorder-blocks-and-partition -g" } diff --git a/gcc/testsuite/g++.dg/tree-prof/pr59255.C b/gcc/testsuite/g++.dg/tree-prof/pr59255.C index 77f208a3a5f..6db136846d0 100644 --- a/gcc/testsuite/g++.dg/tree-prof/pr59255.C +++ b/gcc/testsuite/g++.dg/tree-prof/pr59255.C @@ -1,4 +1,5 @@ // PR c++/59255 +// Explicit { dg-require-effective-target exceptions_enabled } so that dependent tests don't turn UNRESOLVED for '-fno-exceptions'. // { dg-options "-std=c++11 -O2" } struct S -- 2.34.1