Re: [PATCH] c++: modules ICE with typename friend declaration

2022-09-17 Thread Nathan Sidwell via Gcc-patches
On 9/16/22 11:54, Patrick Palka wrote: On Fri, 16 Sep 2022, Nathan Sidwell wrote: Thanks, this looks right. Sigh templates can mess up ones mental invariants! The test case should really be a foo_[ab].C kind, to test both sides of the streaming. Bonus points for using the template after

Re: [PATCH] c++: modules ICE with typename friend declaration

2022-09-16 Thread Bernhard Reutner-Fischer via Gcc-patches
On 16 September 2022 17:54:32 CEST, Patrick Palka via Gcc-patches wrote: >+++ b/gcc/testsuite/g++.dg/modules/typename-friend_a.C >@@ -0,0 +1,11 @@ >+// { dg-additional-options "-fmodules-ts" } >+export module foo; >+// { dg-module-cmi foo } >+ If that's a constant, repeating pain, you could

Re: [PATCH] c++: modules ICE with typename friend declaration

2022-09-16 Thread Patrick Palka via Gcc-patches
On Fri, 16 Sep 2022, Nathan Sidwell wrote: > Thanks, this looks right. Sigh templates can mess up ones mental invariants! > The test case should really be a foo_[ab].C kind, to test both sides of the > streaming. Bonus points for using the template after importing.  And you need > the

Re: [PATCH] c++: modules ICE with typename friend declaration

2022-09-16 Thread Nathan Sidwell via Gcc-patches
Thanks, this looks right. Sigh templates can mess up ones mental invariants! The test case should really be a foo_[ab].C kind, to test both sides of the streaming. Bonus points for using the template after importing. And you need the dg-module-cmi annotation to check /and then delete/ the gcm

[PATCH] c++: modules ICE with typename friend declaration

2022-09-15 Thread Patrick Palka via Gcc-patches
A couple of xtreme-header-* modules tests began ICEing in C++23 mode ever since r13-2650-g5d84a4418aa962 introduced into the dependently scoped friend declaration friend /* typename */ _OuterIter::value_type; ultimately because the streaming code assumes a TYPE_P friend must be a class type,