From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1643) id 6C4F93858C54; Wed, 7 Jun 2023 08:55:56 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6C4F93858C54 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1686128156; bh=VvcGT+5O03Nrc6IXqoXbF8LCpaJPQtpIJHtaIqMdoDM=; h=From:To:Subject:Date:From; b=wUIFIP4xvrPAlyVzt2a+pLxSK1orBmqEiEvAOUsVrWnlNJz11Vcm8FiXjnWJn7Gse 654R6t5WFVbHQHkX/5aEYZCqQLC480XNharnv/J17Mj30vSkQK2zxLnXknxo/BXA8X AyjMgHe1yd5Vhb+E5sBBNGAESJPy+i/a1qJeyt/M= MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Thomas Schwinge To: gcc-cvs@gcc.gnu.org, libstdc++-cvs@gcc.gnu.org Subject: [gcc r14-1604] Support 'UNSUPPORTED: [...]: exception handling disabled' for libstdc++ testing X-Act-Checkin: gcc X-Git-Author: Thomas Schwinge X-Git-Refname: refs/heads/master X-Git-Oldrev: 00bfc503cc3b3e8f354afeac9b482649418fb70f X-Git-Newrev: 5faaabef3819434d13fcbf749bd07bfc98ca7c3c Message-Id: <20230607085556.6C4F93858C54@sourceware.org> Date: Wed, 7 Jun 2023 08:55:56 +0000 (GMT) List-Id: https://gcc.gnu.org/g:5faaabef3819434d13fcbf749bd07bfc98ca7c3c commit r14-1604-g5faaabef3819434d13fcbf749bd07bfc98ca7c3c Author: Thomas Schwinge Date: Wed Jun 7 08:46:38 2023 +0200 Support 'UNSUPPORTED: [...]: exception handling disabled' for libstdc++ testing Verbatim copy of what was added to 'gcc/testsuite/lib/gcc-dg.exp:gcc-dg-prune' in Subversion r279246 (Git commit a9046e9853024206bec092dd63e21e152cb5cbca) "[MSP430] -Add fno-exceptions multilib". This greatly improves 'make check-target-libstdc++-v3' results for, for example, x86_64-pc-linux-gnu with: RUNTESTFLAGS='--target_board=unix/-fno-exceptions\{,-m32\}' libstdc++-v3/ * testsuite/lib/prune.exp (libstdc++-dg-prune): Support 'UNSUPPORTED: [...]: exception handling disabled'. Diff: --- libstdc++-v3/testsuite/lib/prune.exp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/libstdc++-v3/testsuite/lib/prune.exp b/libstdc++-v3/testsuite/lib/prune.exp index 2d2349e7cba..be6d16c26e5 100644 --- a/libstdc++-v3/testsuite/lib/prune.exp +++ b/libstdc++-v3/testsuite/lib/prune.exp @@ -79,6 +79,18 @@ proc libstdc++-dg-prune { system text } { # Ignore dsymutil warning (tool bug is actually in the linker) regsub -all "(^|\n)\[^\n\]*could not find object file symbol for symbol\[^\n\]*" $text "" text + # 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" + } + + if [regexp "(^|\n)\[^\n\]*: error: #error .__cpp_exceptions." $text] { + return "::unsupported::exception handling disabled" + } + } + foreach p $additional_prunes { if { [string length $p] > 0 } { # Following regexp matches a complete line containing $p.