diff options
author | Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> | 2001-05-20 13:22:24 +0000 |
---|---|---|
committer | Kriang Lerdsuwanakij <lerdsuwa@gcc.gnu.org> | 2001-05-20 13:22:24 +0000 |
commit | 3b82c249189ff6349ca7d8407258cb9745fd3b17 (patch) | |
tree | 01c01b3a7ce0d9f66d609c86a059f9074a0e0d40 /gcc | |
parent | 91ea548a25908e9f6f610b1e8e743a56418c352f (diff) | |
download | gcc-3b82c249189ff6349ca7d8407258cb9745fd3b17.zip gcc-3b82c249189ff6349ca7d8407258cb9745fd3b17.tar.gz gcc-3b82c249189ff6349ca7d8407258cb9745fd3b17.tar.bz2 |
pt.c (determine_specialization): Ignore artificial functions.
2001-05-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
* pt.c (determine_specialization): Ignore artificial functions.
2001-05-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
* g++.old-deja/g++.pt/spec41.C: New test.
From-SVN: r42342
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/cp/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/cp/pt.c | 3 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/testsuite/g++.old-deja/g++.pt/spec41.C | 10 |
4 files changed, 21 insertions, 0 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 233f804..42d2ae1 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,7 @@ +2001-05-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> + + * pt.c (determine_specialization): Ignore artificial functions. + 2001-05-20 Neil Booth <neil@daikokuya.demon.co.uk> * cp-tree.h (struct lang_identifier, C_RID_YYCODE): Update. diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index c0cd2eb..da0b0a6 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -1023,6 +1023,9 @@ determine_specialization (template_id, decl, targs_out, /* This is just an ordinary non-member function. Nothing can be a specialization of that. */ continue; + else if (DECL_ARTIFICIAL (fn)) + /* Cannot specialize functions that are created implicitly. */ + continue; else { tree decl_arg_types; diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index ac40b14..a39d8cc 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2001-05-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> + + * g++.old-deja/g++.pt/spec41.C: New test. + 2001-05-19 Joseph S. Myers <jsm28@cam.ac.uk> * gcc.c-torture/compile/20010114-1.x: Remove. diff --git a/gcc/testsuite/g++.old-deja/g++.pt/spec41.C b/gcc/testsuite/g++.old-deja/g++.pt/spec41.C new file mode 100644 index 0000000..aab53c0 --- /dev/null +++ b/gcc/testsuite/g++.old-deja/g++.pt/spec41.C @@ -0,0 +1,10 @@ +// Build don't link: + +// Origin: <mikes@nilenet.com> + +// Bug: Specialization of implicitly created function should be +// rejected. + +template<class T> class blah{}; +blah<char>::blah(){} // ERROR - invalid specialization +int main(){} |