From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 0A7EB385E00B; Wed, 25 Mar 2020 13:09:10 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0A7EB385E00B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1585141750; bh=b22Z/DvfDHPMA8PEJmvLTVv6XkU1T+8qQRr8br9iDbg=; h=From:To:Subject:Date:From; b=Sjz5RJwbwvQsYfZdjZj30kyWrnq90UVA2p6H6KTwuB9Vi54VtgoFAya/ulqnZWmv7 Z729GDDag4cAPlcH+yvXq15XQzZJRkGMYrwjQ1I3rBk9ClwTihN74jessVfHmzTq1s 9nVH4PoF11VS7xWvXIAthqr9EOMfYEIgFve0yNZk= From: "marxin at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: =?UTF-8?B?W0J1ZyBkZWJ1Zy85NDMyNl0gTmV3OiBnKys6IGVycm9yOiBwYWNr?= =?UTF-8?B?LmlpOiDigJgtZmNvbXBhcmUtZGVidWfigJkgZmFpbHVyZSAobGVuZ3RoKQ==?= Date: Wed, 25 Mar 2020 13:09:09 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: debug X-Bugzilla-Version: 10.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: marxin at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter cc target_milestone Message-ID: 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: Wed, 25 Mar 2020 13:09:10 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D94326 Bug ID: 94326 Summary: g++: error: pack.ii: =E2=80=98-fcompare-debug=E2=80=99 = failure (length) Product: gcc Version: 10.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: debug Assignee: unassigned at gcc dot gnu.org Reporter: marxin at gcc dot gnu.org CC: jakub at gcc dot gnu.org Target Milestone: --- This one is very old (at least GCC 4.8.0): $ cat pack.ii template class A { const int &m_fn1() { return 0; } public: template void m_fn2(_Kt) { m_fn1(); } }; class B { A<> _M_t; public: template auto m_fn3(_Kt p1) -> decltype(_M_t.m_fn2(p1)) { _M_t.m_fn2(p1); } }; struct C {}; void operator<(C, int) { B a; a.m_fn3(C{}); } $ g++ pack.ii -c -fcompare-debug -std=3Dc++11 pack.ii: In instantiation of =E2=80=98const int& A< >::m_fn1() [with =3D int]=E2=80=99: pack.ii:5:45: required from =E2=80=98void A< >::= m_fn2(_Kt) [with _Kt =3D C; =3D int]=E2=80=99 pack.ii:12:15: required from =E2=80=98decltype (((B*)this)->B::_M_t.A<>::m_fn2<_Kt>(p1)) B::m_fn3(_Kt) [with _Kt =3D C; de= cltype (((B*)this)->B::_M_t.A<>::m_fn2<_Kt>(p1)) =3D void]=E2=80=99 pack.ii:18:14: required from here pack.ii:2:31: warning: returning reference to temporary [-Wreturn-local-add= r] 2 | const int &m_fn1() { return 0; } | ^ g++: error: pack.ii: =E2=80=98-fcompare-debug=E2=80=99 failure (length)=