diff options
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/cp/init.c | 2 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/cpp0x/alias-decl-73.C | 9 |
2 files changed, 10 insertions, 1 deletions
diff --git a/gcc/cp/init.c b/gcc/cp/init.c index b112328..1b161d5 100644 --- a/gcc/cp/init.c +++ b/gcc/cp/init.c @@ -2214,7 +2214,7 @@ build_offset_ref (tree type, tree member, bool address_p, if (!ok) return error_mark_node; if (DECL_STATIC_FUNCTION_P (t)) - return t; + return member; member = t; } else diff --git a/gcc/testsuite/g++.dg/cpp0x/alias-decl-73.C b/gcc/testsuite/g++.dg/cpp0x/alias-decl-73.C new file mode 100644 index 0000000..aae7786 --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/alias-decl-73.C @@ -0,0 +1,9 @@ +// 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; +}; |