From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 Content-Type: multipart/mixed; boundary="=-=-=" 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 List-Id: --=-=-= Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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' test= ing", see attached. Gr=C3=BC=C3=9Fe Thomas ----------------- Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstra=C3=9Fe 201= , 80634 M=C3=BCnchen; Gesellschaft mit beschr=C3=A4nkter Haftung; Gesch=C3= =A4ftsf=C3=BChrer: Thomas Heurung, Frank Th=C3=BCrauf; Sitz der Gesellschaf= t: M=C3=BCnchen; Registergericht M=C3=BCnchen, HRB 106955 --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename="0001-Skip-a-number-of-g-.dg-tree-prof-test-cases-for-fno-.patch" >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 --=-=-=--