aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.8/gcc/testsuite/g++.dg/template/arrow4.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.8/gcc/testsuite/g++.dg/template/arrow4.C')
-rw-r--r--gcc-4.8/gcc/testsuite/g++.dg/template/arrow4.C19
1 files changed, 19 insertions, 0 deletions
diff --git a/gcc-4.8/gcc/testsuite/g++.dg/template/arrow4.C b/gcc-4.8/gcc/testsuite/g++.dg/template/arrow4.C
new file mode 100644
index 000000000..89e782219
--- /dev/null
+++ b/gcc-4.8/gcc/testsuite/g++.dg/template/arrow4.C
@@ -0,0 +1,19 @@
+// PR c++/56895
+// { dg-do compile }
+
+void fn (int *);
+void fn (int);
+extern struct A { bool foo (); A bar (); } *a;
+
+template <int>
+void
+baz ()
+{
+ fn (a->bar().foo() ? 1 : 0);
+}
+
+void
+test ()
+{
+ baz<0> ();
+}