c++: Add testcases from some Issaquah DRs
authorJakub Jelinek <jakub@redhat.com>
Wed, 15 Feb 2023 08:34:41 +0000 (09:34 +0100)
committerJakub Jelinek <jakub@redhat.com>
Wed, 15 Feb 2023 08:34:41 +0000 (09:34 +0100)
commit1e7a87dc196ce750caa88f5d207bc4728455cca4
treeaf2b55c2a9245755532088ebfdbd50109f8a0011
parent86bc0909613e19e284b40fce9f9914e3a115bbe8
c++: Add testcases from some Issaquah DRs

The following patch adds testcases for 5 DRs.  In the DR2475, DR2530 and
CWG2691 my understanding is we already implement the desired behavior,
in DR2478 partially (I've added 2 dg-bogus there, I think we inherit
rather than overwrite DECL_DECLARED_CONSTINIT_P for explicit specialization
somewhere, still far better than clang++) and DR2673 on the other side the
DR was to codify the clang++ behavior rather than GCC.

Not 100% sure if it is better to commit the 2 with dg-bogus or just wait
until the actual fixes are implemented.  BTW, I've noticed
register_specialization does:
              FOR_EACH_CLONE (clone, fn)
                {
                  DECL_DECLARED_INLINE_P (clone)
                    = DECL_DECLARED_INLINE_P (fn);
                  DECL_SOURCE_LOCATION (clone)
                    = DECL_SOURCE_LOCATION (fn);
                  DECL_DELETED_FN (clone)
                    = DECL_DELETED_FN (fn);
                }
but not e.g. constexpr/consteval, have tried to cover that in a testcase
but haven't managed to do so.

2023-02-15  Jakub Jelinek  <jakub@redhat.com>

* g++.dg/DRs/dr2475.C: New test.
* g++.dg/DRs/dr2478.C: New test.
* g++.dg/DRs/dr2530.C: New test.
* g++.dg/DRs/dr2673.C: New test.
* c-c++-common/cpp/delimited-escape-seq-8.c: New test.
gcc/testsuite/c-c++-common/cpp/delimited-escape-seq-8.c [new file with mode: 0644]
gcc/testsuite/g++.dg/DRs/dr2475.C [new file with mode: 0644]
gcc/testsuite/g++.dg/DRs/dr2478.C [new file with mode: 0644]
gcc/testsuite/g++.dg/DRs/dr2530.C [new file with mode: 0644]
gcc/testsuite/g++.dg/DRs/dr2673.C [new file with mode: 0644]