From 6cd0d4dedf23a8a6e0b884539f0b70990ed77938 Mon Sep 17 00:00:00 2001 From: Nathan Sidwell Date: Mon, 11 Sep 2000 14:21:08 +0000 Subject: [PATCH] explicit82.C: New test. * g++.old-deja/g++.pt/explicit82.C: New test. * g++.old-deja/g++.pt/explicit83.C: New test. From-SVN: r36316 --- gcc/testsuite/ChangeLog | 5 ++++ gcc/testsuite/g++.old-deja/g++.pt/explicit82.C | 18 +++++++++++++ gcc/testsuite/g++.old-deja/g++.pt/explicit83.C | 35 ++++++++++++++++++++++++++ 3 files changed, 58 insertions(+) create mode 100644 gcc/testsuite/g++.old-deja/g++.pt/explicit82.C create mode 100644 gcc/testsuite/g++.old-deja/g++.pt/explicit83.C diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 73b4889..fdd07e0 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2000-09-11 Nathan Sidwell + + * g++.old-deja/g++.pt/explicit82.C: New test. + * g++.old-deja/g++.pt/explicit83.C: New test. + 2000-09-10 Zack Weinberg * gcc.dg/asm-names.c: New test. diff --git a/gcc/testsuite/g++.old-deja/g++.pt/explicit82.C b/gcc/testsuite/g++.old-deja/g++.pt/explicit82.C new file mode 100644 index 0000000..844ff94 --- /dev/null +++ b/gcc/testsuite/g++.old-deja/g++.pt/explicit82.C @@ -0,0 +1,18 @@ +// Build don't link: +// Copyright (C) 2000 Free Software Foundation, Inc. +// Contributed by Nathan Sidwell 7 Sep 2000 + +// Bug 508. We failed to set/clear lastiddecl appropriately for +// operator names. + +struct A {}; + +template void foo (A, int); +template void operator<< (A, int); + +int main() +{ + A a; + operator<< (a, 0); + foo (a, 0); +} diff --git a/gcc/testsuite/g++.old-deja/g++.pt/explicit83.C b/gcc/testsuite/g++.old-deja/g++.pt/explicit83.C new file mode 100644 index 0000000..dd6e766 --- /dev/null +++ b/gcc/testsuite/g++.old-deja/g++.pt/explicit83.C @@ -0,0 +1,35 @@ +// Build don't link: +// Copyright (C) 2000 Free Software Foundation, Inc. +// Contributed by Nathan Sidwell 7 Sep 2000 + +// Bug 512. Conversion operator functions in template_id's were always +// being looked up in global scope. + +class C +{ +public: + + template + void f () {} + + template + operator int () + { return 0; + } +}; + +template void C::f (); + +template C::operator int (); + +template C::operator int (); + +typedef int (C::* ptrmem_t) (); + +template +void foo () +{ +} + +template void +foo<&C::operator int, &C::operator int > (); -- 2.7.4