Add testcase of PR c++/92542, already fixed.
authorPaolo Carlini <paolo.carlini@oracle.com>
Fri, 17 Jan 2020 19:02:21 +0000 (20:02 +0100)
committerPaolo Carlini <paolo.carlini@oracle.com>
Fri, 17 Jan 2020 19:02:21 +0000 (20:02 +0100)
PR c++/92542
* g++.dg/pr92542.C: New.

gcc/testsuite/g++.dg/pr92542.C [new file with mode: 0644]

diff --git a/gcc/testsuite/g++.dg/pr92542.C b/gcc/testsuite/g++.dg/pr92542.C
new file mode 100644 (file)
index 0000000..d71f515
--- /dev/null
@@ -0,0 +1,15 @@
+template<typename T>
+struct S
+{
+  S(T, T) { }
+};
+
+char* begin();
+char* end();
+
+void
+test01()
+{
+  S s(begin(). end());  // { dg-error "request for member" "" { target c++17 } }
+  // { dg-error "missing" "" { target c++14_down } .-1 }
+}