From 00f14949396a96735e8a4dd5ee98e7f880b2352d Mon Sep 17 00:00:00 2001 From: Alexandre Oliva Date: Sun, 4 Oct 1998 15:31:58 +0000 Subject: [PATCH] overload5.C: New test... * g++.old-deja/g++.pt/overload5.C: New test; initialize variable with pointer to template function, for which no argument deduction is possible * g++.old-deja/g++.pt/overload4.C: New test; passing pointer to specialization of template function as argument to template function * g++.old-deja/g++.other/access2.C: New test; Inner class shouldn't have privileged access to Outer's names From-SVN: r22818 --- gcc/testsuite/ChangeLog | 13 +++++++++++++ gcc/testsuite/g++.old-deja/g++.other/access2.C | 12 ++++++++++++ gcc/testsuite/g++.old-deja/g++.pt/overload4.C | 12 ++++++++++++ gcc/testsuite/g++.old-deja/g++.pt/overload5.C | 6 ++++++ 4 files changed, 43 insertions(+) create mode 100644 gcc/testsuite/g++.old-deja/g++.other/access2.C create mode 100644 gcc/testsuite/g++.old-deja/g++.pt/overload4.C create mode 100644 gcc/testsuite/g++.old-deja/g++.pt/overload5.C diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index eea6d0c466d..b41d7ff6873 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,16 @@ +1998-10-04 Alexandre Oliva + + * g++.old-deja/g++.pt/overload5.C: New test; initialize variable + with pointer to template function, for which no argument deduction + is possible + + * g++.old-deja/g++.pt/overload4.C: New test; passing pointer to + specialization of template function as argument to template + function + + * g++.old-deja/g++.other/access2.C: New test; Inner class + shouldn't have privileged access to Outer's names + 1998-10-03 Alexandre Oliva * g++.old-deja/g++.pt/friend34.C: New test; name injection of diff --git a/gcc/testsuite/g++.old-deja/g++.other/access2.C b/gcc/testsuite/g++.old-deja/g++.other/access2.C new file mode 100644 index 00000000000..b981f2f324d --- /dev/null +++ b/gcc/testsuite/g++.old-deja/g++.other/access2.C @@ -0,0 +1,12 @@ +// Build don't link: +// Based on a test-case in the Standard, submitted by several people + +class Outer { + typedef int T; + class Inner { + T i; // ERROR - not accessible - XFAIL *-*-* + void f() { + T j; // ERROR - not accessible - XFAIL *-*-* + } + }; +}; diff --git a/gcc/testsuite/g++.old-deja/g++.pt/overload4.C b/gcc/testsuite/g++.old-deja/g++.pt/overload4.C new file mode 100644 index 00000000000..78e271b6a3e --- /dev/null +++ b/gcc/testsuite/g++.old-deja/g++.pt/overload4.C @@ -0,0 +1,12 @@ +// Build don't link: + +template void foo(T); + +template void bar(void (*)(T), T); + +void baz() { + bar(foo, 1); + bar(foo, 1); // explicit args for foo don't help - XFAIL *-*-* + bar(foo, 1); // not even here - XFAIL *-*-* + bar(foo, 1); // ICE - XFAIL *-*-* +} diff --git a/gcc/testsuite/g++.old-deja/g++.pt/overload5.C b/gcc/testsuite/g++.old-deja/g++.pt/overload5.C new file mode 100644 index 00000000000..f705c245a70 --- /dev/null +++ b/gcc/testsuite/g++.old-deja/g++.pt/overload5.C @@ -0,0 +1,6 @@ +// Build don't link: + +template void foo(); + +void (*bar)() = foo; +void (*baz)() = foo; // ERROR - can't deduce T - XFAIL *-*-*