From patchwork Fri Nov 3 11:08:12 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thomas Schwinge X-Patchwork-Id: 161241 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:8f47:0:b0:403:3b70:6f57 with SMTP id j7csp944557vqu; Fri, 3 Nov 2023 04:08:45 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEMnt0rn6vY1XC26uWIOP/r9rrv/uAcMQmztcHCemGI+WqZt43tQEdsap+z3+ohtIofpvLc X-Received: by 2002:a05:6830:2709:b0:6d3:194f:f132 with SMTP id j9-20020a056830270900b006d3194ff132mr8784698otu.30.1699009724835; Fri, 03 Nov 2023 04:08:44 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1699009724; cv=pass; d=google.com; s=arc-20160816; b=Rq6z/aYr1nFPp0OOSc4cijyuTVFmFoWYvllvks7b4LhwdsZ4/uYDGbK9Z9OW6YI1h9 8s2ytaYIxWT4iYb7b0FAcoNHI7vB5z5vpX+wNgDyN3tTszNTj/C0qsE8beTvvsi0WUsB fWfdWyV2NhHZCijHDqv+NdraDqSq1D2sOWGl+eAaCoBcgb+4cZhlYnPwB9aYsVKmUHFc qc+XtQzLClTsTT71+60/9pjlbc36euFK1EfCOp+00aGMOGwluI2Q8cLSqfEGd+XHzxcr uAFX1VQTbmqB7J0qWT4W0sVrJJRZLlkGzT0xEw5K9yv0ygb+4pk5jMMYxWIowjJTLrMR tPsA== 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=JwbRrf3YebYlz6Qkc7Gq1PyQejcawKqJ7l+2k7R9IJ8=; fh=33FMJg+zv+6ZeEjAJjE1pDjK01DxLgM8jDRnAnc+lPs=; b=hudqO6zilmsCLn8+U0DY8hDwbz5kbd1VLwVSSUYGAtCJTIac74Ufh8XEru82/BPaMA 8xb66zi98W9l+BBDwRy1TPjfmFUO0JrK3BZr/xDSiiGCY9A0ShtPw82dCxib1BgXU5e7 cmThQb1wc3f/kWIqp28dfH114sAIaZxkVgmcKCS/bk7v9Yza0E7+KpVXkykj4gDmw4qm LrVaFQTg+cs3AxFFrAH5YJnHOMu2lxAr+hw5Zeq9fXmXASo0wkuVj1o6+ds6sk3GBUBf nJyZAnCEe0Af8qVtJ9eR4ptuTidOF87bvlEpeI87t04EwufxYCIizRIXtuTlIgNPA78I BF3Q== 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 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from server2.sourceware.org (server2.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id 12-20020ac84e8c000000b004198ca326a2si1362635qtp.507.2023.11.03.04.08.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Nov 2023 04:08:44 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; 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 8.43.85.97 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 922E43858C2B for ; Fri, 3 Nov 2023 11:08:44 +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 106913858D28 for ; Fri, 3 Nov 2023 11:08:19 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 106913858D28 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 106913858D28 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=1699009702; cv=none; b=k6lh+XFCix49Zpa4EZBsM6eIF+LB5zFQOwfTJ8fXaxtt//yOvZHq90V8kg1r2hLXTJJdef2+N3wtWb/F213fWF+fq2Yb5RzKTDcKpJ6DChMxAqSI02E/44TKyEisIK6NklDYJLGsu9Fx6yVpxa/rFbFa3GsHBerKesuHz+LReRc= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1699009702; c=relaxed/simple; bh=8w9HbVEAZm2kT0sSRJnJMq/6KH/kmF9gd9EXoMbzVgU=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=gs0ceFvpUYXw2sI251dNQVC9V7MFtJWLdCTVTqoD/x6ZzMBDzmTg7y+Kh9fNhBuCu0IxA8xmBf9eu1K4nZtMS2h155a2NJ6fAR7A40niXBjhimnpsemABGOC8sJJuo5+LhjmKm0u56kjjBRTE+xGrnfFjfYcLfZLD4pHXbNwsbY= ARC-Authentication-Results: i=1; server2.sourceware.org X-CSE-ConnectionGUID: pCcQWRSdQe6b2JSvggrTKQ== X-CSE-MsgGUID: 8YuFOe8cS+CcdgxV7PwXGA== X-IronPort-AV: E=Sophos;i="6.03,273,1694764800"; d="scan'208,223";a="21757749" Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa3.mentor.iphmx.com with ESMTP; 03 Nov 2023 03:08:18 -0800 IronPort-SDR: MumluB7Lf+txMGC/cwlApewG7cYuKbq17ObWFT82LzX7O6/TZOmCSnZz9pyvE9fYUKqLs/m7yw 9dYFmzWr9ed2pc/Vp9qWmFVyIj/RhOSOnrwaScyWvsg3accYSHC48qEEiJ7VMQKRwfaBIA218L KuvIgz+inzYG0P3oCja7pWCXguQzHV3/PmzY+aFd+19FQRXt2Z/jakbAMubfEJ/QwMRJka30bp YnUhvIsDWaiGo9SYqba+DKp6xtDhQON0rZ+X3EC2oBazXkKlShBzyu/iOv2GAoT+SQWvP8KpTI iGE= From: Thomas Schwinge To: , Jason Merrill CC: Jonathan Wakely , Nathan Sidwell Subject: Skip a number of 'g++.dg/compat/' 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:08:12 +0100 Message-ID: <87jzqzt7qb.fsf@euler.schwinge.homeip.net> MIME-Version: 1.0 X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: svr-ies-mbx-10.mgc.mentorg.com (139.181.222.10) 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: 1781540821117627128 X-GMAIL-MSGID: 1781540821117627128 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/compat/' parts of this pushed to master branch in commit e5919951b8cb0dc8af5b80dc747416fb60a9835b "Skip a number of 'g++.dg/compat/' 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 e5919951b8cb0dc8af5b80dc747416fb60a9835b 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/compat/' 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: g++.dg/compat/eh/ctor1 cp_compat_main_tst.o compile [-PASS:-]{+UNSUPPORTED:+} g++.dg/compat/eh/ctor1 cp_compat_x_tst.o [-compile-]{+compile: exception handling disabled+} [-PASS:-]{+UNSUPPORTED:+} g++.dg/compat/eh/ctor1 cp_compat_y_tst.o [-compile-]{+compile: exception handling disabled+} [-PASS:-]{+UNRESOLVED:+} g++.dg/compat/eh/ctor1 cp_compat_x_tst.o-cp_compat_y_tst.o link [-PASS:-]{+UNRESOLVED:+} g++.dg/compat/eh/ctor1 cp_compat_x_tst.o-cp_compat_y_tst.o execute 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/compat/eh/ctor1_main.C: Specify 'dg-require-effective-target exceptions_enabled'. * g++.dg/compat/eh/ctor2_main.C: Likewise. * g++.dg/compat/eh/dtor1_main.C: Likewise. * g++.dg/compat/eh/filter1_main.C: Likewise. * g++.dg/compat/eh/filter2_main.C: Likewise. * g++.dg/compat/eh/new1_main.C: Likewise. * g++.dg/compat/eh/nrv1_main.C: Likewise. * g++.dg/compat/eh/spec3_main.C: Likewise. * g++.dg/compat/eh/template1_main.C: Likewise. * g++.dg/compat/eh/unexpected1_main.C: Likewise. * g++.dg/compat/init/array5_main.C: Likewise. --- gcc/testsuite/g++.dg/compat/eh/ctor1_main.C | 2 ++ gcc/testsuite/g++.dg/compat/eh/ctor2_main.C | 2 ++ gcc/testsuite/g++.dg/compat/eh/dtor1_main.C | 2 ++ gcc/testsuite/g++.dg/compat/eh/filter1_main.C | 2 ++ gcc/testsuite/g++.dg/compat/eh/filter2_main.C | 2 ++ gcc/testsuite/g++.dg/compat/eh/new1_main.C | 2 ++ gcc/testsuite/g++.dg/compat/eh/nrv1_main.C | 2 ++ gcc/testsuite/g++.dg/compat/eh/spec3_main.C | 2 ++ gcc/testsuite/g++.dg/compat/eh/template1_main.C | 2 ++ gcc/testsuite/g++.dg/compat/eh/unexpected1_main.C | 2 ++ gcc/testsuite/g++.dg/compat/init/array5_main.C | 2 ++ 11 files changed, 22 insertions(+) diff --git a/gcc/testsuite/g++.dg/compat/eh/ctor1_main.C b/gcc/testsuite/g++.dg/compat/eh/ctor1_main.C index a188b46da86..1598d9db0f8 100644 --- a/gcc/testsuite/g++.dg/compat/eh/ctor1_main.C +++ b/gcc/testsuite/g++.dg/compat/eh/ctor1_main.C @@ -4,6 +4,8 @@ // Split into pieces for binary compatibility testing October 2002 +// Explicit { dg-require-effective-target exceptions_enabled } so that dependent tests don't turn UNRESOLVED for '-fno-exceptions'. + extern void ctor1_x (void); int diff --git a/gcc/testsuite/g++.dg/compat/eh/ctor2_main.C b/gcc/testsuite/g++.dg/compat/eh/ctor2_main.C index 58836e26eba..f79c8a2e756 100644 --- a/gcc/testsuite/g++.dg/compat/eh/ctor2_main.C +++ b/gcc/testsuite/g++.dg/compat/eh/ctor2_main.C @@ -4,6 +4,8 @@ // Split into pieces for binary compatibility testing October 2002 +// Explicit { dg-require-effective-target exceptions_enabled } so that dependent tests don't turn UNRESOLVED for '-fno-exceptions'. + extern void ctor2_x (void); int main () diff --git a/gcc/testsuite/g++.dg/compat/eh/dtor1_main.C b/gcc/testsuite/g++.dg/compat/eh/dtor1_main.C index 962fa64274b..1550d7403c6 100644 --- a/gcc/testsuite/g++.dg/compat/eh/dtor1_main.C +++ b/gcc/testsuite/g++.dg/compat/eh/dtor1_main.C @@ -5,6 +5,8 @@ // Split into pieces for binary compatibility testing October 2002 +// Explicit { dg-require-effective-target exceptions_enabled } so that dependent tests don't turn UNRESOLVED for '-fno-exceptions'. + extern void dtor1_x (void); int diff --git a/gcc/testsuite/g++.dg/compat/eh/filter1_main.C b/gcc/testsuite/g++.dg/compat/eh/filter1_main.C index 2a8fca42c31..39eb6e4b66d 100644 --- a/gcc/testsuite/g++.dg/compat/eh/filter1_main.C +++ b/gcc/testsuite/g++.dg/compat/eh/filter1_main.C @@ -2,6 +2,8 @@ // Split into pieces for binary compatibility testing October 2002 +// Explicit { dg-require-effective-target exceptions_enabled } so that dependent tests don't turn UNRESOLVED for '-fno-exceptions'. + extern void filter1_x (void); int diff --git a/gcc/testsuite/g++.dg/compat/eh/filter2_main.C b/gcc/testsuite/g++.dg/compat/eh/filter2_main.C index 866199c6b30..43ecf8a946b 100644 --- a/gcc/testsuite/g++.dg/compat/eh/filter2_main.C +++ b/gcc/testsuite/g++.dg/compat/eh/filter2_main.C @@ -3,6 +3,8 @@ // Split into pieces for binary compatibility testing October 2002 +// Explicit { dg-require-effective-target exceptions_enabled } so that dependent tests don't turn UNRESOLVED for '-fno-exceptions'. + extern void filter2_x (void); int diff --git a/gcc/testsuite/g++.dg/compat/eh/new1_main.C b/gcc/testsuite/g++.dg/compat/eh/new1_main.C index ee4cad8e50d..a557c9d1814 100644 --- a/gcc/testsuite/g++.dg/compat/eh/new1_main.C +++ b/gcc/testsuite/g++.dg/compat/eh/new1_main.C @@ -4,6 +4,8 @@ // Split into pieces for binary compatibility testing October 2002 +// Explicit { dg-require-effective-target exceptions_enabled } so that dependent tests don't turn UNRESOLVED for '-fno-exceptions'. + extern void new1_x (void); int diff --git a/gcc/testsuite/g++.dg/compat/eh/nrv1_main.C b/gcc/testsuite/g++.dg/compat/eh/nrv1_main.C index 3b76b5c8824..5df3c51f634 100644 --- a/gcc/testsuite/g++.dg/compat/eh/nrv1_main.C +++ b/gcc/testsuite/g++.dg/compat/eh/nrv1_main.C @@ -3,6 +3,8 @@ // Split into pieces for binary compatibility testing October 2002 +// Explicit { dg-require-effective-target exceptions_enabled } so that dependent tests don't turn UNRESOLVED for '-fno-exceptions'. + extern void nrv1_x (void); int diff --git a/gcc/testsuite/g++.dg/compat/eh/spec3_main.C b/gcc/testsuite/g++.dg/compat/eh/spec3_main.C index 3f0e919b2ea..8255fc19eeb 100644 --- a/gcc/testsuite/g++.dg/compat/eh/spec3_main.C +++ b/gcc/testsuite/g++.dg/compat/eh/spec3_main.C @@ -3,6 +3,8 @@ // Split into pieces for binary compatibility testing October 2002 +// Explicit { dg-require-effective-target exceptions_enabled } so that dependent tests don't turn UNRESOLVED for '-fno-exceptions'. + extern void spec3_x (void); int diff --git a/gcc/testsuite/g++.dg/compat/eh/template1_main.C b/gcc/testsuite/g++.dg/compat/eh/template1_main.C index 2d169808c46..5ff13276071 100644 --- a/gcc/testsuite/g++.dg/compat/eh/template1_main.C +++ b/gcc/testsuite/g++.dg/compat/eh/template1_main.C @@ -3,6 +3,8 @@ // Split into pieces for binary compatibility testing October 2002 +// Explicit { dg-require-effective-target exceptions_enabled } so that dependent tests don't turn UNRESOLVED for '-fno-exceptions'. + extern void template1_x (void); int diff --git a/gcc/testsuite/g++.dg/compat/eh/unexpected1_main.C b/gcc/testsuite/g++.dg/compat/eh/unexpected1_main.C index 1658db77e32..99e667dedf9 100644 --- a/gcc/testsuite/g++.dg/compat/eh/unexpected1_main.C +++ b/gcc/testsuite/g++.dg/compat/eh/unexpected1_main.C @@ -3,6 +3,8 @@ // Split into pieces for binary compatibility testing October 2002 +// Explicit { dg-require-effective-target exceptions_enabled } so that dependent tests don't turn UNRESOLVED for '-fno-exceptions'. + extern void unexpected1_x (); int diff --git a/gcc/testsuite/g++.dg/compat/init/array5_main.C b/gcc/testsuite/g++.dg/compat/init/array5_main.C index 96b2cc4b12b..814411e66d6 100644 --- a/gcc/testsuite/g++.dg/compat/init/array5_main.C +++ b/gcc/testsuite/g++.dg/compat/init/array5_main.C @@ -5,6 +5,8 @@ // Incorrect construction and destruction of multi-dimensional // array of class. +// Explicit { dg-require-effective-target exceptions_enabled } so that dependent tests don't turn UNRESOLVED for '-fno-exceptions'. + extern void array5_x (void); int -- 2.34.1