From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 643AD39C500E; Fri, 12 Mar 2021 15:40:34 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 643AD39C500E From: "marxin at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug debug/99562] New: Invalid debug info: objdump: Warning: Location list starting at offset 0x9c3 is not terminated. Date: Fri, 12 Mar 2021 15:40:34 +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: 11.0 X-Bugzilla-Keywords: wrong-code 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 keywords 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: Fri, 12 Mar 2021 15:40:34 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D99562 Bug ID: 99562 Summary: Invalid debug info: objdump: Warning: Location list starting at offset 0x9c3 is not terminated. Product: gcc Version: 11.0 Status: UNCONFIRMED Keywords: wrong-code 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, mark at gcc dot gnu.org Target Milestone: --- The following produces an invalid debug info: cat fsize.ii template < class, class, class, class =3D void, class =3D void > struct exp= ression; template < class tag, class Arg1, class Arg2 > struct expression< tag, Arg1, Arg2 > {}; template < class Backend > class number { public: template < class tag, class Arg1, class Arg2, class Arg3, class Arg4 > void operator=3D(expression< tag, Arg1, Arg2, Arg3, Arg4 > e) { do_assign(e, int()); } template < class tag, class Arg1, class Arg2, class Arg3, class Arg4 > number(expression< tag, Arg1, Arg2, Arg3, Arg4 > e) { *this =3D e; } template < class tag, class Arg1, class Arg2, class Arg3, class Arg4 > void do_assign(expression< tag, Arg1, Arg2, Arg3, Arg4 > e, int) { Backend __trans_tmp_3 ; eval_multiply(m_backend, __trans_tmp_3, canonical_value(e)); } Backend m_backend; Backend canonical_value(number); }; enum cpp_integer_type { signed_magnitude }; enum cpp_int_check_type { unchecked }; template < unsigned =3D 0, unsigned =3D 0, cpp_integer_type =3D signed_magn= itude, cpp_int_check_type =3D unchecked, class =3D int > struct Trans_NS_backends_cpp_int_backend; struct cpp_int_base { bool m_alias; void allocator(); cpp_int_base() { { if (m_alias) allocator(); } } }; template < unsigned, unsigned, cpp_integer_type, cpp_int_check_type, class > struct Trans_NS_backends_cpp_int_backend : cpp_int_base {}; template < unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1, unsigned MinBits2, unsigned MaxBits2, cpp_integer_type SignType2, cpp_int_check_type Checked2, class Allocator2, unsigned MinBits3, unsigned MaxBits3, cpp_integer_type SignType3, cpp_int_check_type Checked3, class Allocator3 > void eval_multiply(Trans_NS_backends_cpp_int_backend< MinBits1, MaxBits1, SignTy= pe1, Checked1, Allocator1 >, Trans_NS_backends_cpp_int_backend< MinBits2, MaxBits2, SignTy= pe2, Checked2, Allocator2 >, Trans_NS_backends_cpp_int_backend< MinBits3, MaxBits3, SignTy= pe3, Checked3, Allocator3 >) { Trans_NS_backends_cpp_int_backend<> t0; __int128 limb_max =3D ~static_cast< unsigned long >(0); } class FSize { number< Trans_NS_backends_cpp_int_backend<> > _size; FSize(); }; expression< int, int, int > __trans_tmp_13; FSize::FSize() : _size(__trans_tmp_13) {} $ g++ -gdwarf-4 fsize.ii -c -g -O && objdump -g fsize.o >/dev/null objdump: Warning: Location list starting at offset 0x9c3 is not terminated. objdump: Warning: There is a hole [0x9f9 - 0xa0f] in .debug_loc section. objdump: Warning: Location list starting at offset 0xa8b is not terminated. objdump: Warning: There is a hole [0xac1 - 0xad7] in .debug_loc section. objdump: Warning: Location list starting at offset 0xb53 is not terminated. objdump: Warning: There is a hole [0xb89 - 0xb9f] in .debug_loc section. objdump: Warning: Location list starting at offset 0xc1b is not terminated. objdump: Warning: There is a hole [0xc51 - 0xc67] in .debug_loc section.=