https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121163
Bug ID: 121163
Summary: GNAT hang with `-g -gcodeview` (but not with just
`-g`)
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 LOCAL_IO is
function GET_NEXT return Integer;
end LOCAL_IO;
package body LOCAL_IO is
type TEXT_TYPE is record
null;
end record;
DESCRIPTORS : array (1 .. 2) of TEXT_TYPE;
function GET_NEXT return Integer is
begin
return 1;
end GET_NEXT;
end LOCAL_IO;
```
and the following steps:
```
gnatchop -w input.txt
gnat-x86_64-windows64-15.1.0-2/bin/gcc.exe -g -c local_io.adb # doesn't hang
gnat-x86_64-windows64-15.1.0-2/bin/gcc.exe -g -gcodeview -c local_io.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/install
--with-build-time-tools=/aaa/GNAT-FSF-builds/sbx/x86_64-windows64/binutils/install/bin
--enab
le-languages=c,ada,c++ --enable-libstdcxx --enable-libstdcxx-threads
--enable-libada --disable-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-windows64/gcc/install/include
--with-gnu-ld --with-gnu-as
--with-mpfr=/aaa/GNAT-FSF-builds/sbx/x86_64-windows64/
mpfr/install --with-gmp=/aaa/GNAT-FSF-builds/sbx/x86_64-windows64/gmp/install
--with-mpc=/aaa/GNAT-FSF-builds/sbx/x86_64-windows64/mpc/install
--with-isl=/aaa/GNAT-FSF-builds/sbx/x86_64-wind
ows64/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