r16-5173-g52a24bcec9388a fixed this testcase, but I think it's
worthwhile still adding this reduced test for it to the modules.exp set
of tests so we don't need to rely on libstdc++ tests for it yet.
PR c++/122646
gcc/testsuite/ChangeLog:
* g++.dg/modules/friend-10_a.C: New test.
* g++.dg/modules/friend-10_b.C: New test.
Signed-off-by: Nathaniel Shead <nathanieloshead@gmail.com>
--- /dev/null
+// PR c++/122646
+// { dg-additional-options "-fmodules -fconcepts" }
+// { dg-module-cmi M }
+
+export module M;
+
+template <typename T>
+struct zip_view_iterator {
+ void operator-(int) {}
+ friend void operator-(zip_view_iterator, zip_view_iterator)
+ requires requires(T x) { x.begin() - x.begin(); }
+ {}
+};
+
+struct ref_view {
+ ref_view begin();
+};
+
+export template <typename X> void foo() {
+ zip_view_iterator<ref_view>{} - X();
+}
--- /dev/null
+// PR c++/122646
+// { dg-additional-options "-fmodules -fconcepts" }
+
+import M;
+template void foo<int>();