aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorMark Mitchell <mark@codesourcery.com>2003-07-10 19:19:09 +0000
committerMark Mitchell <mmitchel@gcc.gnu.org>2003-07-10 19:19:09 +0000
commit584672eef4775f2ceaaa390e6d9757898077ae2c (patch)
tree79a6e4ceb419974d0f2d651cb5f06cc0db8e4a1a /gcc
parenta9189cc05f6b6ef8fca0022dab0fe16d01e04fa1 (diff)
downloadgcc-584672eef4775f2ceaaa390e6d9757898077ae2c.zip
gcc-584672eef4775f2ceaaa390e6d9757898077ae2c.tar.gz
gcc-584672eef4775f2ceaaa390e6d9757898077ae2c.tar.bz2
re PR c++/9411 ([New parser] Template function lookup problem)
PR c++/9411 * parser.c (cp_parser_postfix_expression): Check dependency of functions. PR c++/9411 * g++.dg/template/explicit2.C: New test. From-SVN: r69196
Diffstat (limited to 'gcc')
-rw-r--r--gcc/cp/ChangeLog6
-rw-r--r--gcc/cp/parser.c1
-rw-r--r--gcc/testsuite/ChangeLog3
-rw-r--r--gcc/testsuite/g++.dg/template/explicit2.C10
4 files changed, 20 insertions, 0 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index e91e535..1d64a22 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,9 @@
+2003-07-10 Mark Mitchell <mark@codesourcery.com>
+
+ PR c++/9411
+ * parser.c (cp_parser_postfix_expression): Check dependency of
+ functions.
+
2003-07-09 Mark Mitchell <mark@codesourcery.com>
PR c++/10032
diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c
index 60ec069..8a76eac 100644
--- a/gcc/cp/parser.c
+++ b/gcc/cp/parser.c
@@ -3846,6 +3846,7 @@ cp_parser_postfix_expression (cp_parser *parser, bool address_p)
&& (type_dependent_expression_p (instance)
|| (!BASELINK_P (fn)
&& TREE_CODE (fn) != FIELD_DECL)
+ || type_dependent_expression_p (fn)
|| any_type_dependent_arguments_p (args)))
{
postfix_expression
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 100c0ed..363378c0 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,5 +1,8 @@
2003-07-10 Mark Mitchell <mark@codesourcery.com>
+ PR c++/9411
+ * g++.dg/template/explicit2.C: New test.
+
PR c++/10032
* g++.dg/warn/pedantic1.C: New test.
diff --git a/gcc/testsuite/g++.dg/template/explicit2.C b/gcc/testsuite/g++.dg/template/explicit2.C
new file mode 100644
index 0000000..79941cd
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/explicit2.C
@@ -0,0 +1,10 @@
+struct X {
+ template <class B> void foo(B);
+};
+
+template <class D>
+void bar() {
+ X().foo<D>(1);
+}
+
+template void bar<int> ();