From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 88EBA3858408; Thu, 3 Feb 2022 11:57:32 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 88EBA3858408 From: "bjorn@xn--rombobjrn-67a.se" To: gcc-bugs@gcc.gnu.org Subject: [Bug lto/104366] New: Regression: infinite loop in add_sibling_attributes Date: Thu, 03 Feb 2022 11:57:32 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: lto X-Bugzilla-Version: 12.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: bjorn@xn--rombobjrn-67a.se 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 attachments.created 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: Thu, 03 Feb 2022 11:57:32 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D104366 Bug ID: 104366 Summary: Regression: infinite loop in add_sibling_attributes Product: gcc Version: 12.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: lto Assignee: unassigned at gcc dot gnu.org Reporter: bjorn@xn--rombobjrn-67a.se CC: marxin at gcc dot gnu.org Target Milestone: --- Created attachment 52339 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=3D52339&action=3Dedit source code for reproducing the problem Compiling certain Ada source files with -g -flto -ffat-lto-objects triggers what looks like infinite tail recursion in add_sibling_attributes in dwarf2out.c. This began when GCC 12 landed in Fedora Rawhide. It does not happen in GCC 11. Removing either -g, -flto or -ffat-lto-objects, or append= ing -fno-lto, works around the problem. It seems to be specific to 64-bit arches. Builds consistently continue runn= ing indefinitely on all of Fedora's four 64-bit arches, but not on the two 32-b= it arches. I have investigated only on x86-64. It's probably more or less specific to Ada, because otherwise it would have caused lots and lots of failures in the recent Fedora mass rebuild. # gcc --version gcc (GCC) 12.0.1 20220129 (Red Hat 12.0.1-0) # rpm -q gcc-gnat gcc-gnat-12.0.1-0.4.fc36.x86_64 To reproduce: gnatchop sources.ada gcc -c -g -flto -ffat-lto-objects posix-process_environment.adb=