From: Alexandre Oliva Date: Sun, 11 Oct 1998 19:59:27 +0000 (+0000) Subject: ttp53.C: New test. X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=411e094cbee542f2e94492a72b9d62b8b00aaba2;p=platform%2Fupstream%2Fgcc.git ttp53.C: New test. * g++.old-deja/g++.pt/ttp53.C: New test. incorrect substitution of template parameter? From-SVN: r22996 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index e43637e..81ea86b 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,5 +1,8 @@ 1998-10-12 Alexandre Oliva + * g++.old-deja/g++.pt/ttp53.C: New test. incorrect substitution + of template parameter? + * g++.old-deja/g++.other/conv3.C: New test. conversion discards const diff --git a/gcc/testsuite/g++.old-deja/g++.pt/ttp53.C b/gcc/testsuite/g++.old-deja/g++.pt/ttp53.C new file mode 100644 index 0000000..694635d --- /dev/null +++ b/gcc/testsuite/g++.old-deja/g++.pt/ttp53.C @@ -0,0 +1,35 @@ +// Build don't link: + +// Submitted by Erez Louidor Lior + +template class H; +template +H foo(const H&); + +template +class H{ + +#ifdef OK +public: +#endif + template class Caster, typename Source> + static H cast(const H& s); // gets bogus error - candidate - XFAIL *-*-* + +#ifndef OK + template + friend H foo(const H&); +#endif + +}; + +template class caster; + +template +H foo(const H& s){ + return H::template cast(s); // gets bogus error - no match - XFAIL *-*-* +} + +int main(){ + H i; + foo(i); // gets bogus error - instantiated from here - XFAIL *-*-* +}