public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r13-6664] testsuite: Fix up g++.dg/cpp2a/concepts-lambda3.C [PR108972]
@ 2023-03-14 15:19 Jakub Jelinek
  0 siblings, 0 replies; only message in thread
From: Jakub Jelinek @ 2023-03-14 15:19 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:7f22d1c83e74c41116300bebac2e4c492c90b03d

commit r13-6664-g7f22d1c83e74c41116300bebac2e4c492c90b03d
Author: Jakub Jelinek <jakub@redhat.com>
Date:   Tue Mar 14 16:18:47 2023 +0100

    testsuite: Fix up g++.dg/cpp2a/concepts-lambda3.C [PR108972]
    
    On Fri, Mar 10, 2023 at 01:49:38PM -0500, Jason Merrill via Gcc-patches wrote:
    > gcc/testsuite/ChangeLog:
    >
    >       * g++.dg/cpp2a/concepts-lambda3.C: Run at lower std levels,
    >       but expect errors.
    
    I'm seeing
    +UNRESOLVED: g++.dg/cpp2a/concepts-lambda3.C  -std=c++11 compilation failed to produce executable
    +UNRESOLVED: g++.dg/cpp2a/concepts-lambda3.C  -std=c++14 compilation failed to produce executable
    +UNRESOLVED: g++.dg/cpp2a/concepts-lambda3.C  -std=c++17 compilation failed to produce executable
    +UNRESOLVED: g++.dg/cpp2a/concepts-lambda3.C  -std=c++98 compilation failed to produce executable
    with this change, and if I test with
    GXX_TESTSUITE_STDS=98,11,14,17,20,2b make check-g++ -k RUNTESTFLAGS="--target_board=unix\{-m32,-m64,-m64/-fconcepts\} dg.exp=concepts-lambda3.C"
    I see even FAILs for the -fconcepts case, so apparently even -std=c++17
    -fconcepts isn't enough to make it compile without errors.
    
    The following patch will expect errors for all of c++17_down and will
    make the test dg-do compile for that case too, such that the UNRESOLVED
    stuff is gone.
    
    2023-03-14  Jakub Jelinek  <jakub@redhat.com>
    
            PR c++/108972
            PR testsuite/109129
            * g++.dg/cpp2a/concepts-lambda3.C: Use dg-do run only for c++20,
            for c++17_down dg-do compile.  Expect dg-excess-errors for c++17_down
            rather than ! concepts.

Diff:
---
 gcc/testsuite/g++.dg/cpp2a/concepts-lambda3.C | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-lambda3.C b/gcc/testsuite/g++.dg/cpp2a/concepts-lambda3.C
index b18e6b62aa4..7a8eea6deb1 100644
--- a/gcc/testsuite/g++.dg/cpp2a/concepts-lambda3.C
+++ b/gcc/testsuite/g++.dg/cpp2a/concepts-lambda3.C
@@ -1,5 +1,6 @@
-// { dg-do run }
-// { dg-excess-errors "" { target { ! concepts } } } (PR108972)
+// { dg-do run { target c++20 } }
+// { dg-do compile { target c++17_down } }
+// { dg-excess-errors "" { target { c++17_down } } } (PR108972)
 
 template<typename T>
 concept C1 = __is_same_as(T, int)

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-03-14 15:19 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-14 15:19 [gcc r13-6664] testsuite: Fix up g++.dg/cpp2a/concepts-lambda3.C [PR108972] Jakub Jelinek

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).