From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id EFE083891C29; Sat, 1 May 2021 20:31:32 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org EFE083891C29 From: "f.b.brokken at rug dot nl" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/100288] [11/12 Regression] g++-11 internal error and fails to precompile a concept Date: Sat, 01 May 2021 20:31:32 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 11.0 X-Bugzilla-Keywords: ice-on-invalid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: f.b.brokken at rug dot nl X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: ppalka at gcc dot gnu.org X-Bugzilla-Target-Milestone: 11.2 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 May 2021 20:31:33 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D100288 --- Comment #4 from Frank B. Brokken --- Dear ppalka at gcc dot gnu.org, you wrote: >=20 > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D100288 >=20 > Patrick Palka changed: >=20 > What |Removed |Added > -------------------------------------------------------------------------= --- > Keywords| |ice-on-invalid-code > See Also| |https://gcc.gnu.org/bugz= ill > | |a/show_bug.cgi?id=3D99599 >=20 > --- Comment #3 from Patrick Palka --- > Agreed, the testcase looks invalid much like PR99599. One workaround for > avoiding the constraint recursion here would be to change the signature of >=20 > template > inline void operator<<(CSVTabIns &&tab, Type const &value) >=20 > to something like >=20 > template > U, OstreamInsert= able > Type> > inline void operator<<(U &&tab, Type const &value) >=20 > so that the constraint OstreamInsertable is checked on this overloa= d only > if the first argument to << has the expected type. >=20 > --=20 > You are receiving this mail because: > You reported the bug. Hi Patrick, Thanks for your e-mail. Since (AFAICS) you directly and only sent your e-mail to me I'm wondering whether you want me to comment on your e-mail. It's getting kind of late he= re, but I could send a more extensive reply tomorrow. Let me know if that's what you want. I tried your suggestion, and it seems to solve the issue. But at the same t= ime it puzzles me why=20 template inline void operator<<(CSVTabIns &&tab, Type const &value) {} won't be instantiated for FMT in inline void operator<<(CSVTabIns &tab, FMT::FMTHline hline) { tab << (*hline)(1); // insert hline in the next column } when FMT defines FMTHline as 'typedef FMT (*FMTHline)(unsigned)' and=20 std::ostream &operator<<(std::ostream &out, FMT const &fmt) is declared. I would have expected that=20 tab << (*hline)(1); // insert hline in the next column would cause the compiler to instantiate=20 template inline void operator<<(CSVTabIns &&tab, Type const &value) {} for Type =3D FMT. Maybe I'm missing something here? And it's also not something that caused t= he compiler's internal error.=