diff options
author | Patrick Palka <ppalka@redhat.com> | 2024-01-30 12:30:32 -0500 |
---|---|---|
committer | Patrick Palka <ppalka@redhat.com> | 2024-01-30 12:30:32 -0500 |
commit | 1a4c47e10e8ba06f04de2d41a040ba1494843a01 (patch) | |
tree | bee3a6166bff6b28b09a925f12d2f824ce73ae4a | |
parent | 209fc1e5f6c67e55e579b69f617b0b678b1bfdf0 (diff) | |
download | gcc-1a4c47e10e8ba06f04de2d41a040ba1494843a01.zip gcc-1a4c47e10e8ba06f04de2d41a040ba1494843a01.tar.gz gcc-1a4c47e10e8ba06f04de2d41a040ba1494843a01.tar.bz2 |
c++: add original testcase [PR67898]
The original testcase from this PR (fixed by r14-8291) seems rather
different from the others, so let's add it to the testsuite.
PR c++/67898
gcc/testsuite/ChangeLog:
* g++.dg/cpp0x/temp_default8.C: New test.
-rw-r--r-- | gcc/testsuite/g++.dg/cpp0x/temp_default8.C | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/cpp0x/temp_default8.C b/gcc/testsuite/g++.dg/cpp0x/temp_default8.C new file mode 100644 index 0000000..505c67d --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/temp_default8.C @@ -0,0 +1,14 @@ +// PR c++/67898 +// { dg-do compile { target c++11 } } + +void f(int); +void f(float); + +template<class T, T F, T G, bool b = F == G> struct X { }; + +template<class T> +void test() { + X<void(T), f, f>(); +} + +template void test<int>(); |