diff options
author | Patrick Palka <ppalka@redhat.com> | 2023-02-03 09:12:31 -0500 |
---|---|---|
committer | Patrick Palka <ppalka@redhat.com> | 2023-02-03 09:12:31 -0500 |
commit | e7930c6750d03b28d922ebbbace20ba9d8622c6a (patch) | |
tree | 9cb5a58ce1711377f7bdeb4489da975119130c2a /libgcc/enable-execute-stack-empty.c | |
parent | e8109bd87766be88e83fe88a44433dae16358a02 (diff) | |
download | gcc-e7930c6750d03b28d922ebbbace20ba9d8622c6a.zip gcc-e7930c6750d03b28d922ebbbace20ba9d8622c6a.tar.gz gcc-e7930c6750d03b28d922ebbbace20ba9d8622c6a.tar.bz2 |
c++: excessive satisfaction in check_methods [PR108579]
In check_methods we're unnecessarily checking satisfaction for all
constructors and assignment operators, even those that don't look like
copy/move special members. In the testcase below this manifests as an
unstable satisfaction error because the satisfaction result is first
determined to be false during check_methods (since A<int> is incomplete
at this point) and later true after completion of A<int>.
This patch fixes this simply by swapping the order of the
constraint_satisfied_p and copy/move_fn_p tests.
PR c++/108579
gcc/cp/ChangeLog:
* class.cc (check_methods): Swap order of constraints_satisfied_p
and copy/move_fn_p tests.
gcc/testsuite/ChangeLog:
* g++.dg/cpp2a/concepts-pr108579.C: New test.
Diffstat (limited to 'libgcc/enable-execute-stack-empty.c')
0 files changed, 0 insertions, 0 deletions