OSDN Git Service

PR c++/13092
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / g++.dg / template / non-dependent10.C
diff --git a/gcc/testsuite/g++.dg/template/non-dependent10.C b/gcc/testsuite/g++.dg/template/non-dependent10.C
new file mode 100644 (file)
index 0000000..369e137
--- /dev/null
@@ -0,0 +1,21 @@
+// { dg-do compile }
+
+// Origin: Giovanni Bajo <giovannibajo@libero.it>
+
+// Two-phase name lookup for address of member:
+// Detecting error during parsing
+
+struct S
+{
+  char i;
+};
+
+template<int S::*p>
+struct X
+{};
+
+template <class T>
+struct Foo
+{
+  X<&S::i> x;  // { dg-error "convert|no type" }
+};