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

            Bug ID: 121162
           Summary: GNAT hang with `-gcodeview -fgnat-encodings=all` (but
                    not just with `-gcodeview`)
           Product: gcc
           Version: 15.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: ada
          Assignee: unassigned at gcc dot gnu.org
          Reporter: andrew.teylu at vector dot com
                CC: dkm at gcc dot gnu.org
  Target Milestone: ---

For the following file:

```
package MINIMAL_HANG is
   type RANGE_TYPE is range 1 .. 11;
   function SOME_FUNCTION (str : String) return String;
end MINIMAL_HANG;
package body MINIMAL_HANG is
   type NULL_RECORD is record
      null;
   end record;
   ARRAY_VAR : array (RANGE_TYPE) of NULL_RECORD;
   function SOME_FUNCTION (str : String) return String is
   begin
      return str;
   end SOME_FUNCTION;
end MINIMAL_HANG;
```

and with the following steps:

```
gnatchop -w input.txt
gnat-x86_64-windows64-15.1.0-2/bin/gcc.exe -g -gcodeview -c minimal_hang.adb #
doesn't hang
gnat-x86_64-windows64-15.1.0-2/bin/gcc.exe -g -gcodeview -fgnat-encodings=all
-c minimal_hang.adb # hangs
```

Then `gcc` doesn't appear to terminate.

GCC version:

```
Using built-in specs.
COLLECT_GCC=Z:\home\avj\gnat-x86_64-windows64-15.1.0-2\bin\gcc.exe
COLLECT_LTO_WRAPPER=Z:/home/avj/gnat-x86_64-windows64-15.1.0-2/bin/../libexec/gcc/x86_64-w64-
mingw32/15.1.0/lto-wrapper.exe
Target: x86_64-w64-mingw32
Configured with: ../src/configure
--prefix=/aaa/GNAT-FSF-builds/sbx/x86_64-windows64/gcc/inst
all
--with-build-time-tools=/aaa/GNAT-FSF-builds/sbx/x86_64-windows64/binutils/install/bin
--
enable-languages=c,ada,c++ --enable-libstdcxx --enable-libstdcxx-threads
--enable-libada --di
sable-nls --without-libiconv-prefix --disable-libstdcxx-pch --enable-lto
--disable-multilib -
-enable-threads=win32
--with-native-system-header-dir=/aaa/GNAT-FSF-builds/sbx/x86_64-windows
64/gcc/install/include --with-gnu-ld --with-gnu-as
--with-mpfr=/aaa/GNAT-FSF-builds/sbx/x86_6
4-windows64/mpfr/install
--with-gmp=/aaa/GNAT-FSF-builds/sbx/x86_64-windows64/gmp/install --w
ith-mpc=/aaa/GNAT-FSF-builds/sbx/x86_64-windows64/mpc/install
--with-isl=/aaa/GNAT-FSF-builds
/sbx/x86_64-windows64/isl/install --build=x86_64-w64-mingw32
Thread model: win32
Supported LTO compression algorithms: zlib
gcc version 15.1.0 (GCC)
```

Compiler taken from here:
https://github.com/alire-project/GNAT-FSF-builds/releases/tag/gnat-15.1.0-2
  • [Bug ada/121162] New: GNAT han... andrew.teylu at vector dot com via Gcc-bugs

Reply via email to