Patrick already fixed the primary cause of this bug. But while I was
looking at this testcase I noticed that with the qualified name k::o we
ended up with a plain FUNCTION_DECL, whereas without the k:: we got a
BASELINK. There seems to be no good reason not to return the BASELINK
in this case as well.
PR c++/100102
gcc/cp/ChangeLog:
* init.c (build_offset_ref): Return the BASELINK for a static
member function.
gcc/testsuite/ChangeLog:
* g++.dg/cpp0x/alias-decl-73.C: New test.
if (!ok)
return error_mark_node;
if (DECL_STATIC_FUNCTION_P (t))
- return t;
+ return member;
member = t;
}
else
--- /dev/null
+// PR c++/100102
+// { dg-do compile { target c++11 } }
+
+template <bool B1> using a = int;
+template <class T3, class T4> struct k {
+ static long o();
+ template <class T5> using n = a<bool(k::o)>;
+ n<int> q;
+};