From patchwork Fri Nov 3 11:10:27 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thomas Schwinge X-Patchwork-Id: 161242 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:8f47:0:b0:403:3b70:6f57 with SMTP id j7csp945881vqu; Fri, 3 Nov 2023 04:11:02 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHh55J7+NH7FlGcGZNk12YOBs80Af0tInUE3YGe43thCVFDkRwMOhBtyRvnkaiGsvqyTJLU X-Received: by 2002:a05:622a:c7:b0:410:9089:6b74 with SMTP id p7-20020a05622a00c700b0041090896b74mr24584150qtw.15.1699009862040; Fri, 03 Nov 2023 04:11:02 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1699009862; cv=pass; d=google.com; s=arc-20160816; b=Fw5vnqjFcX5jn+ssJZ5nf5GGdHjKsxfRFXFKe2CSWtkNjx9yUBVmCZj/RamJjJqNBZ nj/JQLKGfz3SN/EB182mTICQKjgiOSLGFb9Ygq73RJnQWogaZlUDaZdj1YZOe/cZhLiA 1GFI2hUeW41AphhmONWYG0jqOZYQRgBeY9qD7bAF9HufjFuz61GRf1+zF5LYlkZSmShw Cdg2hGas2APh4+2aw8zcMrzjcvw8Bqk6DAVyJuYeBspKfiNaywvRhedPmBmSls7ML4pq wAa0ayZY/y3/6xjPCbe3QVhXQ1HBCLX2tYgZdCy7J/Xzu8pEtxr5RPnB2uTTW2c76Hu4 YYew== 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=5XKcEr7i9VNRBSSRSKCev8xDSjg+vRXaW+zrocaatws=; fh=33FMJg+zv+6ZeEjAJjE1pDjK01DxLgM8jDRnAnc+lPs=; b=QJZNyeVPiRFEpdbYipzurbZUnflh5MiFUeNzZoZLdF+kFXLhl/2RQL1KIHJAicZY2o aFCkNV2CUe+Bgc5u5Xvlm8FjJ5Bq11rAes5r9t9zyf9zORCibSnLYbleHYDJj1UrUNcp SglkXxH31ChNh9bO2wZ7WAD+yH3qr8vkVap3cOtLcbYYYNM1b36DLpdWVTCzJaU6l6QK 1lJh4bzoSnkQCGT4+DYLthbOHBDgzdIx/89Hz9CPewNT1NImSBZSNohK9GonQZNq9/hN 5CXURZLpI3q98VHzozRG5ohZbWnpOY/0/0uDW/IR0xUxW94l+tYmGMnQhDJj8TNZ7fX8 zVHA== 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 p8-20020a05622a048800b00419ccbf0021si1223293qtx.9.2023.11.03.04.11.01 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Nov 2023 04:11:02 -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 CB8B73858431 for ; Fri, 3 Nov 2023 11:11:01 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org 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 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 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: 1781540964860163306 X-GMAIL-MSGID: 1781540964860163306 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' testing"? 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üß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 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