[Bug lto/104366] New: Regression: infinite loop in add_sibling_attributes

2022-02-03 Thread bjorn--- via 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: bj...@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

[Bug ada/118459] New: [15 regression] System.Object_Reader.Format_Error on s390x

2025-01-13 Thread bjorn--- via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118459

Bug ID: 118459
   Summary: [15 regression] System.Object_Reader.Format_Error on
s390x
   Product: gcc
   Version: 15.0
   URL: https://kojipkgs.fedoraproject.org/work/tasks/7662/127
837662/build.log
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: ada
  Assignee: unassigned at gcc dot gnu.org
  Reporter: bj...@xn--rombobjrn-67a.se
CC: dkm at gcc dot gnu.org
  Target Milestone: ---
  Host: s390x-redhat-linux-gnu
Target: s390x-redhat-linux-gnu
 Build: s390x-redhat-linux-gnu

Rebuilding Fedora's GPRbuild package with GCC 15 on s390x, the compilation
appears to work, but the gprconfig executable it produces fails the smoke test:

gprconfig --batch -o /dev/null --validate
raised SYSTEM.OBJECT_READER.FORMAT_ERROR :
System.Object_Reader.ELF64_Ops.Initialize: unrecognized architecture
Load address: 0x2aa1b38

The same version of GPRbuild (including gprconfig) works when built with
Fedora's gcc-gnat-14.2.1-6.fc42.s390x package. Thus I'm labeling this as a
regression.