From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 8A8913854819; Tue, 9 Mar 2021 16:47:44 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8A8913854819 From: "jan.kratochvil at redhat dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug debug/99490] New: -gdwarf-5 -gsplit-dwarf puts .debug_rnglists to main file, not .dwo file Date: Tue, 09 Mar 2021 16:47:44 +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: unknown X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: jan.kratochvil at redhat dot com 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 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: Tue, 09 Mar 2021 16:47:44 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D99490 Bug ID: 99490 Summary: -gdwarf-5 -gsplit-dwarf puts .debug_rnglists to main file, not .dwo file Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: debug Assignee: unassigned at gcc dot gnu.org Reporter: jan.kratochvil at redhat dot com Target Milestone: --- FAIL: gcc-11.0.0-0.19.fc35.x86_64 PASS: clang-12.0.0-0.1.rc1.fc35.x86_64 double p_ext=3D3.14,e_ext=3D2.71; int main(void) { double q,f; { volatile double p=3Dp_ext; q=3Dp/1.1; } { volatile double e=3De_ext; f=3De/1.1; } return q+f; } clang -o range-clang range.c -Wall -O3 -gdwarf-5 -gsplit-dwarf;gcc -o range-gcc.s range.c -Wall -O3 -gdwarf-5 -gsplit-dwarf llvm-readelf -WS range-{clang,gcc}{,.dwo} | egrep '^File:|debug_rnglists' File: range-clang File: range-clang.dwo [ 6] .debug_rnglists.dwo PROGBITS 0000000000000000 0001d4 000017 00 = E=20 0 0 1 Actual: File: range-gcc [33] .debug_rnglists PROGBITS 0000000000000000 004c0a 000049 00= =20=20=20=20=20 0 0 1 File: range-gcc.dwo Expected: File: range-gcc File: range-gcc.dwo [33] .debug_rnglists PROGBITS 0000000000000000 004c0a 000049 00= =20=20=20=20=20 0 0 1 DWARF-5 spec: "The .debug_rnglists.dwosection contains range lists referenced by any DW_AT_ranges attributes in the split DWARF object." "Range lists are contained in a separate object file section called .debug_rnglists or .debug_rnglists.dwo (in split units)." Reproducer from attached .s files: : clang -S -o range-clang.s range.c -Wall -O3 -gdwarf-5 -gsplit-dwarf;clang= -o range-clang range-clang.s -Wall -gdwarf-5 -gsplit-dwarf;: gcc -S -o range-g= cc.s range.c -Wall -O3 -gdwarf-5 -gsplit-dwarf;gcc -o range-gcc range-gcc.s -Wall -gdwarf-5 -gsplit-dwarf=