aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc')
-rw-r--r--gcc/cp/ChangeLog6
-rw-r--r--gcc/cp/semantics.c3
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/g++.dg/template/inherit7.C21
4 files changed, 34 insertions, 1 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 163bee3..6b6d81bd 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,9 @@
+2011-04-28 Dodji Seketeli <dodji@redhat.com>
+
+ PR c++/48656
+ * semantics.c (finish_call_expr): Don't forget BASELINK nodes when
+ considering call expressions involving a member function.
+
2011-04-28 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/48530
diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c
index c636412..722e57f 100644
--- a/gcc/cp/semantics.c
+++ b/gcc/cp/semantics.c
@@ -2039,7 +2039,8 @@ finish_call_expr (tree fn, VEC(tree,gc) **args, bool disallow_virtual,
is not included in *ARGS even though it is considered to
be part of the list of arguments. Note that this is
related to CWG issues 515 and 1005. */
- || ((TREE_CODE (TREE_TYPE (fn)) == METHOD_TYPE)
+ || (((TREE_CODE (TREE_TYPE (fn)) == METHOD_TYPE)
+ || BASELINK_P (fn))
&& current_class_ref
&& type_dependent_expression_p (current_class_ref)))
{
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 7f3804b..b0d5e1c 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2011-04-28 Dodji Seketeli <dodji@redhat.com>
+
+ PR c++/48656
+ * g++.dg/template/inherit7.C: New test case.
+
2011-04-28 Richard Guenther <rguenther@suse.de>
PR tree-optimization/40052
diff --git a/gcc/testsuite/g++.dg/template/inherit7.C b/gcc/testsuite/g++.dg/template/inherit7.C
new file mode 100644
index 0000000..67afbca
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/inherit7.C
@@ -0,0 +1,21 @@
+// Origin: PR c++/48656
+// { dg-options "-std=c++0x" }
+// { dg-do compile }
+
+struct A {
+ int f();
+ int f(int);
+};
+
+template <typename> struct B : A
+{
+};
+
+template <typename T> struct C : B<T>
+{
+ void
+ g()
+ {
+ A::f();
+ }
+};