https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117808
Bug ID: 117808 Summary: Internal compiler error when using Ada 'Image attribute for record (-gnat2022) Product: gcc Version: 12.3.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: ada Assignee: unassigned at gcc dot gnu.org Reporter: commaperiodsemicolon at gmail dot com CC: dkm at gcc dot gnu.org Target Milestone: --- Created attachment 59723 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=59723&action=edit Sources for reproducing the bug. This bug was discovered while attempting to use the 'Image for any type feature introduced in Ada2022. Complete set of source files which reproduce the bug included in the attachment. - GCC Version: 12.3.0 (x86_64-linux-gnu) - System Type: Linux pop-os 6.9.3-76060903-generic #202405300957~1732141768~22.04~f2697e1 SMP PREEMPT_DYNAMIC Wed N x86_64 x86_64 x86_64 GNU/Linux - GCC configuration: gcc -v Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/11/lto-wrapper OFFLOAD_TARGET_NAMES=nvptx-none:amdgcn-amdhsa OFFLOAD_TARGET_DEFAULT=1 Target: x86_64-linux-gnu Configured with: ../src/configure -v --with-pkgversion='Ubuntu 11.4.0-1ubuntu1~22.04' --with-bugurl=file:///usr/share/doc/gcc-11/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++,m2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-11 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-bootstrap --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --enable-default-pie --with-system-zlib --enable-libphobos-checking=release --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-werror --enable-cet --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none=/build/gcc-11-XeT9lY/gcc-11-11.4.0/debian/tmp-nvptx/usr,amdgcn-amdhsa=/build/gcc-11-XeT9lY/gcc-11-11.4.0/debian/tmp-gcn/usr --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu --with-build-config=bootstrap-lto-lean --enable-link-serialization=2 Thread model: posix Supported LTO compression algorithms: zlib zstd gcc version 11.4.0 (Ubuntu 11.4.0-1ubuntu1~22.04) - Command Line: x86_64-linux-gnu-gcc-12 -c -gnat2022 capturevideo.adb - Compiler Output: x86_64-linux-gnu-gcc-12 -c -gnat2022 capturevideo.adb +===========================GNAT BUG DETECTED==============================+ | 12.3.0 (x86_64-linux-gnu) GCC error: | | in build_binary_op, at ada/gcc-interface/utils2.cc:1270 | | Error detected at capturevideo.adb:31:44 | | Compiling capturevideo.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). capturevideo.adb asm_generic_int_ll64_h.ads linux_videodev2_h.ads x86_64_linux_gnu_bits_types_struct_timeval_h.ads x86_64_linux_gnu_bits_types_h.ads linux_types_h.ads x86_64_linux_gnu_bits_types_struct_timespec_h.ads types.ads linux_v4l2_controls_h.ads capturevideo.adb:25:05: warning: variable "Capability" is read but never assigned [-gnatwv] capturevideo.adb:31:51: warning: "cropcap" may be referenced before it has a value [enabled by default] linux_videodev2_h.ads:1314:33: warning: probably incorrect record layout [enabled by default] linux_videodev2_h.ads:1340:33: warning: probably incorrect record layout [enabled by default] linux_videodev2_h.ads:1367:33: warning: probably incorrect record layout [enabled by default] linux_videodev2_h.ads:1437:33: warning: probably incorrect record layout [enabled by default] linux_videodev2_h.ads:1617:33: warning: probably incorrect record layout [enabled by default] linux_videodev2_h.ads:1703:33: warning: probably incorrect record layout [enabled by default] linux_videodev2_h.ads:1850:33: warning: probably incorrect record layout [enabled by default] linux_videodev2_h.ads:1858:33: warning: probably incorrect record layout [enabled by default] linux_videodev2_h.ads:1892:33: warning: probably incorrect record layout [enabled by default] linux_videodev2_h.ads:1901:33: warning: probably incorrect record layout [enabled by default] linux_videodev2_h.ads:1930:33: warning: probably incorrect record layout [enabled by default] linux_videodev2_h.ads:1939:33: warning: probably incorrect record layout [enabled by default] linux_videodev2_h.ads:1994:33: warning: probably incorrect record layout [enabled by default] linux_videodev2_h.ads:2079:33: warning: probably incorrect record layout [enabled by default] linux_videodev2_h.ads:2097:33: warning: probably incorrect record layout [enabled by default] linux_videodev2_h.ads:2106:33: warning: probably incorrect record layout [enabled by default] compilation abandoned gnatmake: "capturevideo.adb" compilation error