OSDN Git Service

PR c++/14123
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / g++.dg / other / ptrmem5.C
diff --git a/gcc/testsuite/g++.dg/other/ptrmem5.C b/gcc/testsuite/g++.dg/other/ptrmem5.C
new file mode 100644 (file)
index 0000000..75a78b2
--- /dev/null
@@ -0,0 +1,12 @@
+// PR 14123
+
+struct a
+{
+  int x[8];
+};
+
+int main()
+{
+  int a::*n[8];
+  n = &a::x;                    // { dg-error "int \\(a::\\*\\)" }
+}