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

            Bug ID: 123060
           Summary: [13/14/15/16 regression] ICE in fld_incomplete_type_of
                    when building gtkada with LTO
           Product: gcc
           Version: 16.0
            Status: UNCONFIRMED
          Keywords: ice-checking, ice-on-valid-code, lto
          Severity: normal
          Priority: P3
         Component: ada
          Assignee: unassigned at gcc dot gnu.org
          Reporter: sjames at gcc dot gnu.org
                CC: dkm at gcc dot gnu.org
  Target Milestone: ---

This starts to ICE with GCC 9 with checking.

```
$ gnatchop c
splitting c into:
   gtk-selection_data.adb
   gtk-selection_data.ads
   gtk.ads
   glib.ads
   glib-object.ads
   glib-gslist.ads
   glib-glist.ads
   gdk.ads
   gdk-display.ads
   gdk-event.ads
   cairo.ads
   gtkada.ads
   gtkada-types.ads
   glib-values.ads
   cairo-region.ads
   gdk-device_tool.ads
   glib-generic_properties.ads
   glib-properties.ads
   glib-types.ads
   gdk-rectangle.ads
   gdk-types.ads
   gdk-monitor.ads
   gdk-pixbuf.ads
   glib-error.ads
   gtkada-c.ads
   gtkada-bindings.ads
   gtkada-c.adb

$ gcc -c gtk-selection_data.adb -O2 -flto                                      
                                                                             
20:54:07 [1/5091]
during IPA pass: *free_lang_data
+===========================GNAT BUG DETECTED==============================+
| 16.0.0 20251206 (experimental) bc46466ec769663dbd8e65dfae11a8d031884504
(x86_64-pc-linux-gnu) GCC error:|
| in fld_incomplete_type_of, at ipa-free-lang-data.cc:262                  |
| Error detected around gdk-types.ads:293:4                                |
| Compiling gtk-selection_data.adb                                         |
| Please submit a bug report; see https://gcc.gnu.org/bugs/ .              |
| Use a subject line meaningful to you and us to track the bug.            |
| Include the entire contents of this bug box in the report.               |
| Include the exact command that you entered.                              |
| Also include sources listed below.                                       |
+==========================================================================+

Please include these source files with error report
Note that list may not be accurate in some cases,
so please double check that the problem can still
be reproduced with the set of files listed.
Consider also -gnatd.n switch (see debug.adb).

gtk-selection_data.adb
gtk-selection_data.ads
gtk.ads
glib.ads
glib-object.ads
glib-gslist.ads
glib-glist.ads
gdk.ads
gdk-display.ads
gdk-event.ads
cairo.ads
gtkada.ads
gtkada-types.ads
glib-values.ads
cairo-region.ads
gdk-device_tool.ads
glib-generic_properties.ads
glib-properties.ads
glib-types.ads
gdk-rectangle.ads
gdk-types.ads
gdk-monitor.ads
gdk-pixbuf.ads
glib-error.ads
gtkada-c.ads
gtkada-bindings.ads
gtkada-c.adb


raised TYPES.UNRECOVERABLE_ERROR : comperr.adb:422
```

```
$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-pc-linux-gnu/16/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-pc-linux-gnu
Configured with:
/var/tmp/portage.notmp/portage/sys-devel/gcc-16.0.9999/work/gcc-16.0.9999/configure
--host=x86_64-pc-linux-gnu --build=x86_64-pc-linux-gnu --prefix=/usr
--bindir=/usr/x86_64-pc-linux-gnu/gcc-bin/16
--includedir=/usr/lib/gcc/x86_64-pc-linux-gnu/16/include
--datadir=/usr/share/gcc-data/x86_64-pc-linux-gnu/16
--mandir=/usr/share/gcc-data/x86_64-pc-linux-gnu/16/man
--infodir=/usr/share/gcc-data/x86_64-pc-linux-gnu/16/info
--with-gxx-include-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/16/include/g++-v16
--disable-silent-rules --disable-dependency-tracking
--with-python-dir=/share/gcc-data/x86_64-pc-linux-gnu/16/python
--enable-libphobos --enable-objc-gc
--enable-languages=c,c++,d,objc,obj-c++,fortran,ada,cobol,algol68,m2,rust,jit
--enable-obsolete --enable-secureplt --disable-werror --with-system-zlib
--enable-nls --without-included-gettext --disable-libunwind-exceptions
--enable-checking=yes,extra,rtl --with-bugurl=https://bugs.gentoo.org/
--with-pkgversion='Gentoo Hardened 16.0.9999 p, commit
5407f4ee65e18ca1236b3a8ca36a43b9e15114e9' --with-gcc-major-version-only
--enable-libstdcxx-time --enable-lto --disable-libstdcxx-pch --enable-shared
--enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu
--enable-multilib --with-multilib-list=m32,mx32,m64 --disable-fixed-point
--with-abi=m64 --enable-targets=all --enable-offload-defaulted
--enable-offload-targets=nvptx-none --enable-libgomp --disable-libssp
--enable-libada --disable-cet --enable-systemtap --enable-valgrind-annotations
--enable-valgrind-interop --disable-vtable-verify --disable-libvtv --with-zstd
--with-isl --disable-isl-version-check --enable-default-pie --enable-host-pie
--enable-host-bind-now --enable-default-ssp --disable-fixincludes
--with-gxx-libcxx-include-dir=/usr/include/c++/v1 --enable-host-shared
--enable-libgdiagnostics --enable-linker-build-id --enable-linker-build-id
--enable-linker-build-id --enable-linker-build-id
--with-build-config='bootstrap-O3 bootstrap-lto'
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 16.0.0 20251206 (experimental)
bc46466ec769663dbd8e65dfae11a8d031884504 (Gentoo Hardened 16.0.9999 p, commit
5407f4ee65e18ca1236b3a8ca36a43b9e15114e9)
```

Reply via email to