public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Thomas Schwinge <thomas@codesourcery.com>
To: <gcc-patches@gcc.gnu.org>, Jason Merrill <jason@redhat.com>
Cc: Jonathan Wakely <jwakely@redhat.com>, Nathan Sidwell <nathan@acm.org>
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'))
Date: Fri, 3 Nov 2023 12:12:44 +0100	[thread overview]
Message-ID: <87edh7t7ir.fsf@euler.schwinge.homeip.net> (raw)
In-Reply-To: <87r0qcemq3.fsf@euler.schwinge.homeip.net>

[-- Attachment #1: Type: text/plain, Size: 636 bytes --]

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' 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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Skip-a-number-of-g-.dg-tree-prof-test-cases-for-fno-.patch --]
[-- Type: text/x-diff, Size: 5986 bytes --]

From 3881d010dca9b5db5301f28e4a1e3a8e4bc40faa Mon Sep 17 00:00:00 2001
From: Thomas Schwinge <thomas@codesourcery.com>
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


  reply	other threads:[~2023-11-03 11:13 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <873534qu9e.fsf@euler.schwinge.homeip.net>
     [not found] ` <CACb0b4kDiwp5nEY952rbLAKy7_+iJey71z3WNMUxahTaLQt6vA@mail.gmail.com>
2023-06-07  7:13   ` Support 'UNSUPPORTED: [...]: exception handling disabled' for libstdc++ testing (was: Support in the GCC(/C++) test suites for '-fno-exceptions') Thomas Schwinge
2023-06-07  8:12     ` Jonathan Wakely
2023-06-07  9:08       ` Thomas Schwinge
2023-06-07 11:51         ` Jonathan Wakely
2023-06-07 15:56           ` Jonathan Wakely
2023-06-15 15:15   ` Skip a number of C++ test cases for '-fno-exceptions' " Thomas Schwinge
2023-06-15 15:47     ` 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')) Thomas Schwinge
2023-11-03 11:08       ` 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'))) Thomas Schwinge
2023-11-03 11:10       ` Skip a number of 'g++.dg/lto/' " Thomas Schwinge
2023-06-15 16:04     ` Skip a number of C++ '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')) Thomas Schwinge
2023-11-03 11:12       ` Thomas Schwinge [this message]
2023-09-08 13:30     ` Skip a number of C++ test cases for '-fno-exceptions' testing (was: Support in the GCC(/C++) test suites for '-fno-exceptions') Thomas Schwinge
2023-11-03 11:03       ` Thomas Schwinge
2023-11-03 11:15         ` Jakub Jelinek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87edh7t7ir.fsf@euler.schwinge.homeip.net \
    --to=thomas@codesourcery.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jason@redhat.com \
    --cc=jwakely@redhat.com \
    --cc=nathan@acm.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).