Fix PR c++/48656
gcc/cp/
* semantics.c (finish_call_expr): Don't forget BASELINK nodes when
considering call expressions involving a member function.
gcc/testsuite/
* gcc/testsuite/g++.dg/template/inherit7.C: New test case.
From-SVN: r173123
+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
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)))
{
+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
--- /dev/null
+// 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();
+ }
+};