public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug lto/104366] New: Regression: infinite loop in add_sibling_attributes
@ 2022-02-03 11:57 bjorn@xn--rombobjrn-67a.se
  2022-02-03 12:26 ` [Bug lto/104366] [12 Regression] " marxin at gcc dot gnu.org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: bjorn@xn--rombobjrn-67a.se @ 2022-02-03 11:57 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104366

            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=52339&action=edit
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 appending
-fno-lto, works around the problem.

It seems to be specific to 64-bit arches. Builds consistently continue running
indefinitely on all of Fedora's four 64-bit arches, but not on the two 32-bit
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

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2022-02-04 11:17 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-03 11:57 [Bug lto/104366] New: Regression: infinite loop in add_sibling_attributes bjorn@xn--rombobjrn-67a.se
2022-02-03 12:26 ` [Bug lto/104366] [12 Regression] " marxin at gcc dot gnu.org
2022-02-03 13:08 ` marxin at gcc dot gnu.org
2022-02-03 14:25 ` marxin at gcc dot gnu.org
2022-02-03 22:29 ` pinskia at gcc dot gnu.org
2022-02-04 10:04 ` [Bug debug/104366] " ebotcazou at gcc dot gnu.org
2022-02-04 11:10 ` cvs-commit at gcc dot gnu.org
2022-02-04 11:17 ` ebotcazou at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).