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

            Bug ID: 119309
           Summary: Compiler continues to run indefinitely while
                    processing code that contains errors.
           Product: gcc
           Version: 15.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: ada
          Assignee: unassigned at gcc dot gnu.org
          Reporter: d.van.raaij at gmail dot com
                CC: dkm at gcc dot gnu.org
  Target Milestone: ---

Created attachment 60774
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=60774&action=edit
Reproducer

The compiler continues to run indefinitely while processing the code attached
to this report. The code is expected to be rejected as it contains errors.

A cursory look with gdb suggests that the compiler is stuck in a loop in
`Find_Direct_Name' in sem_ch8.adb:

6394          while Present (E2) loop                                 --  True
6395             if Is_Immediately_Visible (E2) then                  --  True
..
6408                if Scope (E) = Scope (E2)                         --  True
6409                  and then Ekind (E) = E_Package                  --  False
..
6419                   for J in Level + 1 .. Scope_Stack.Last loop    --  3 + 1
.. 3
..
6431             E2 := Homonym (E2);
6432          end loop;

*** Compiler output ***

$ gcc -c reproducer.ads
<no output, runs indefinitely>

*** Compiler version ***

$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/15/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none:amdgcn-amdhsa
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-redhat-linux
Configured with: ../configure --enable-bootstrap
--enable-languages=c,c++,fortran,objc,obj-c++,ada,go,d,m2,lto --prefix=/usr
--mandir=/usr/share/man --infodir=/usr/share/info
--with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-shared
--enable-threads=posix --enable-checking=release --enable-multilib
--with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions
--enable-gnu-unique-object --enable-linker-build-id
--with-gcc-major-version-only --enable-libstdcxx-backtrace
--with-libstdcxx-zoneinfo=/usr/share/zoneinfo --with-linker-hash-style=gnu
--enable-plugin --enable-initfini-array
--with-isl=/builddir/build/BUILD/gcc-15.0.1-build/gcc-15.0.1-20250225/obj-x86_64-redhat-linux/isl-install
--enable-offload-targets=nvptx-none,amdgcn-amdhsa --enable-offload-defaulted
--without-cuda-driver --enable-gnu-indirect-function --enable-cet
--with-tune=generic --with-arch_32=i686 --build=x86_64-redhat-linux
--with-build-config=bootstrap-lto --enable-link-serialization=1
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 15.0.1 20250225 (Red Hat 15.0.1-0) (GCC)
  • [Bug ada/119309] New: Compiler c... d.van.raaij at gmail dot com via Gcc-bugs

Reply via email to