aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2023-04-19 10:01:04 +0200
committerJakub Jelinek <jakub@redhat.com>2023-04-19 10:01:04 +0200
commit794ffdb0fb6312ce07af0bfc797bef9f4cff4c61 (patch)
tree4102e49615e8d7d0b44f23627330107ce4e41eaf
parentcbddd574a78529b9176eb28253c20a335daefbb4 (diff)
downloadgcc-794ffdb0fb6312ce07af0bfc797bef9f4cff4c61.zip
gcc-794ffdb0fb6312ce07af0bfc797bef9f4cff4c61.tar.gz
gcc-794ffdb0fb6312ce07af0bfc797bef9f4cff4c61.tar.bz2
testsuite: Fix up pr109524.C for -std=c++23 [PR109524]
This testcase was reduced such that it isn't valid C++23, so with my usual testing with GXX_TESTSUITE_STDS=98,11,14,17,20,2b it fails: FAIL: g++.dg/pr109524.C -std=gnu++2b (test for excess errors) .../gcc/testsuite/g++.dg/pr109524.C: In function 'nn hh(nn)': .../gcc/testsuite/g++.dg/pr109524.C:35:12: error: cannot bind non-const lvalue reference of type 'nn&' to an rvalue of type 'nn' .../gcc/testsuite/g++.dg/pr109524.C:17:6: note: initializing argument 1 of 'nn::nn(nn&)' The following patch fixes that and I've verified it doesn't change anything on what the test was testing, it still ICEs in r13-7198 and passes in r13-7203, now in all language modes (except for 98 where it is intentionally UNSUPPORTED). 2023-04-19 Jakub Jelinek <jakub@redhat.com> PR tree-optimization/109524 * g++.dg/pr109524.C (nn::nn): Change argument type from nn & to const nn &.
-rw-r--r--gcc/testsuite/g++.dg/pr109524.C2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/testsuite/g++.dg/pr109524.C b/gcc/testsuite/g++.dg/pr109524.C
index a560839..644c757 100644
--- a/gcc/testsuite/g++.dg/pr109524.C
+++ b/gcc/testsuite/g++.dg/pr109524.C
@@ -14,7 +14,7 @@ struct _Guard {
};
struct nn {
int * _M_dataplus;
- nn(nn &)
+ nn(const nn &)
{
f();
_Guard __guard;