From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from esa3.mentor.iphmx.com (esa3.mentor.iphmx.com [68.232.137.180]) by sourceware.org (Postfix) with ESMTPS id A180A3858D28 for ; Fri, 3 Nov 2023 11:10:37 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org A180A3858D28 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 A180A3858D28 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=68.232.137.180 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1699009839; cv=none; b=iQUAnMfHvJEwnLKn/xkzvzeqxt2oglX6+8p16Cg3IZMerBCJXcMpJ8kB0p6oaz/hUUwC6jJ+tHUqdaNKhRvTawjpiJ2WDzZ3nSYeoQOYlk20DuIlzt1vvsp28jE7SAjxKfmtWtlTZrhF5sbgLQyrMcXHopN9u3U4jj70jSsmSmA= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1699009839; c=relaxed/simple; bh=hZALtX5XxjIMYsMYWfca0fmOMbhM0IZQbjsLQ+vWltk=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=gXKSB7D+O3eAX4iPoZzVVZQ5ad/6dzsaq7SpZ6xREFqBjZL03YTK8suO8No5ec44W2cTHaNrv4Yole7sYXMuFvs+jolgEhIRP4KDbGs5azNHwTkzHZCzpGOT3wb+Wqbx12BgwcsVPS0HPid++DhaeaZ/YyIPL1hqGAuggOEBysM= ARC-Authentication-Results: i=1; server2.sourceware.org X-CSE-ConnectionGUID: yVRX/M7DShmV/zOcqvD7/Q== X-CSE-MsgGUID: wCc0+mDRTP+yknxVCDBHhA== X-IronPort-AV: E=Sophos;i="6.03,273,1694764800"; d="scan'208,223";a="21757936" Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa3.mentor.iphmx.com with ESMTP; 03 Nov 2023 03:10:36 -0800 IronPort-SDR: RX9nqRe3T8AriXLqZEVvQknpX90MEaxzLRPQNNCCNS6ONrv4Rhb32b+XiLCsaRzdrporLMo1j+ sDc3RvrcEdf5DVdn/IWiHvMiTr4aOkiagsxFzjLahQWuiMZNg0uC5dr44NsGJeOVbnqD6ILTKi qpfGHuMFZgZ6lua6S+vUO39NuvWh9PHnIf0NLntCnzm8h+J4NreEAs4+GuA+Qs/aSyuwmkoNXC 3S+euEf0ZsZy5MA+kIctWhT7ZgXhZ/V3hwkwN8se8Od0NVdPd6qLgkTUjilnS7BPuc2Np1EZhu SGw= From: Thomas Schwinge To: , Jason Merrill CC: Jonathan Wakely , Nathan Sidwell Subject: Skip a number of 'g++.dg/lto/' test cases for '-fno-exceptions' testing (was: Skip a number of C++ "split files" 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: <87ttv8engy.fsf@euler.schwinge.homeip.net> References: <873534qu9e.fsf@euler.schwinge.homeip.net> <87wn04eoyd.fsf@euler.schwinge.homeip.net> <87ttv8engy.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:10:27 +0100 Message-ID: <87h6m3t7mk.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-11.mgc.mentorg.com (139.181.222.11) 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-15T17:47:57+0200, I wrote: > [...], OK to push the attached > "Skip a number of C++ "split files" test cases for '-fno-exceptions' test= ing"? The 'g++.dg/lto/' parts of this pushed to master branch in commit 94782ed70796427e6f4b15b1c2df91cd7bef28e8 "Skip a number of 'g++.dg/lto/' test cases for '-fno-exceptions' testing", 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-lto-test-cases-for-fno-except.patch" >From 94782ed70796427e6f4b15b1c2df91cd7bef28e8 Mon Sep 17 00:00:00 2001 From: Thomas Schwinge Date: Wed, 7 Jun 2023 16:11:11 +0200 Subject: [PATCH] Skip a number of 'g++.dg/lto/' 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 "split files" test cases. For example: [-PASS:-]{+UNSUPPORTED:+} g++.dg/lto/20081109-1 cp_lto_20081109-1_0.o [-assemble, -fPIC -flto -flto-partition=1to1-]{+assemble: exception handling disabled+} [-PASS:-]{+UNRESOLVED:+} g++.dg/lto/20081109-1 cp_lto_20081109-1_0.o-cp_lto_20081109-1_0.o [-link,-]{+link+} -fPIC -flto -flto-partition=1to1 {+UNRESOLVED: g++.dg/lto/20081109-1 cp_lto_20081109-1_0.o-cp_lto_20081109-1_0.o execute -fPIC -flto -flto-partition=1to1+} The "compile"/"assemble" tests (either continue to work, or) result in the expected 'UNSUPPORTED: [...] compile: exception handling disabled', but dependent "link" and "execute" tests then turn UNRESOLVED. Specify 'dg-require-effective-target exceptions_enabled' for those test cases. gcc/testsuite/ * g++.dg/lto/20081109-1_0.C: Specify 'dg-require-effective-target exceptions_enabled'. * g++.dg/lto/20081109_0.C: Likewise. * g++.dg/lto/20091026-1_0.C: Likewise. * g++.dg/lto/pr87906_0.C: Likewise. * g++.dg/lto/pr88046_0.C: Likewise. --- gcc/testsuite/g++.dg/lto/20081109-1_0.C | 1 + gcc/testsuite/g++.dg/lto/20081109_0.C | 2 ++ gcc/testsuite/g++.dg/lto/20091026-1_0.C | 1 + gcc/testsuite/g++.dg/lto/pr87906_0.C | 1 + gcc/testsuite/g++.dg/lto/pr88046_0.C | 1 + 5 files changed, 6 insertions(+) diff --git a/gcc/testsuite/g++.dg/lto/20081109-1_0.C b/gcc/testsuite/g++.dg/lto/20081109-1_0.C index db0ba367fe8..7dc315b39ed 100644 --- a/gcc/testsuite/g++.dg/lto/20081109-1_0.C +++ b/gcc/testsuite/g++.dg/lto/20081109-1_0.C @@ -1,4 +1,5 @@ // { dg-lto-do link } +// Explicit { dg-require-effective-target exceptions_enabled } so that dependent tests don't turn UNRESOLVED for '-fno-exceptions'. // { dg-require-effective-target fpic } // { dg-lto-options {{-fPIC -flto -flto-partition=1to1}} } // { dg-extra-ld-options "-fPIC -flto -flto-partition=1to1 -r -fno-exceptions -flinker-output=nolto-rel" } diff --git a/gcc/testsuite/g++.dg/lto/20081109_0.C b/gcc/testsuite/g++.dg/lto/20081109_0.C index 93cfc67fff2..4746e1c7c46 100644 --- a/gcc/testsuite/g++.dg/lto/20081109_0.C +++ b/gcc/testsuite/g++.dg/lto/20081109_0.C @@ -1,3 +1,5 @@ +// Explicit { dg-require-effective-target exceptions_enabled } so that dependent tests don't turn UNRESOLVED for '-fno-exceptions'. + extern "C" { void abort (void);} int foo (int); diff --git a/gcc/testsuite/g++.dg/lto/20091026-1_0.C b/gcc/testsuite/g++.dg/lto/20091026-1_0.C index 06eff292cb6..ca0729c52f5 100644 --- a/gcc/testsuite/g++.dg/lto/20091026-1_0.C +++ b/gcc/testsuite/g++.dg/lto/20091026-1_0.C @@ -1,4 +1,5 @@ // { dg-lto-do link } +// Explicit { dg-require-effective-target exceptions_enabled } so that dependent tests don't turn UNRESOLVED for '-fno-exceptions'. // { dg-extra-ld-options "-r -nostdlib -flinker-output=nolto-rel" } #include "20091026-1_a.h" diff --git a/gcc/testsuite/g++.dg/lto/pr87906_0.C b/gcc/testsuite/g++.dg/lto/pr87906_0.C index 6a04cd5c6f0..623c29ca007 100644 --- a/gcc/testsuite/g++.dg/lto/pr87906_0.C +++ b/gcc/testsuite/g++.dg/lto/pr87906_0.C @@ -1,4 +1,5 @@ // { dg-lto-do link } +// Explicit { dg-require-effective-target exceptions_enabled } so that dependent tests don't turn UNRESOLVED for '-fno-exceptions'. // { dg-require-effective-target fpic } // { dg-require-effective-target shared } // { dg-lto-options { { -O -fPIC -flto } } } diff --git a/gcc/testsuite/g++.dg/lto/pr88046_0.C b/gcc/testsuite/g++.dg/lto/pr88046_0.C index 734ce86e9b8..99224b5011f 100644 --- a/gcc/testsuite/g++.dg/lto/pr88046_0.C +++ b/gcc/testsuite/g++.dg/lto/pr88046_0.C @@ -1,5 +1,6 @@ // { dg-lto-do link } // { dg-lto-options { { -O2 -fPIC -flto } } } +// Explicit { dg-require-effective-target exceptions_enabled } so that dependent tests don't turn UNRESOLVED for '-fno-exceptions'. // { dg-require-effective-target shared } // { dg-require-effective-target fpic } // { dg-extra-ld-options "-shared -g" } -- 2.34.1 --=-=-=--