https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109113
Bug ID: 109113
Summary: internal compiler error: in
output_constructor_regular_field, at varasm.cc:5521
Product: gcc
Version: 12.2.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
Assignee: unassigned at gcc dot gnu.org
Reporter: noe.lopez at epitech dot eu
Target Milestone: ---
Created attachment 54650
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=54650&action=edit
The minimal code example
Hello :), I've recently come across an internal compiler error when trying to
compile my code.
The error seems to be triggered by assigning the result of a malloc of the size
of a structure containing static arrays of another structure containing static
arrays ???
It's a little complicated but I've done my best to produce a minimal example of
the bug that can be compiled with the following command:
`gcc minimal.c`
Here's my gcc -v output:
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib64/gcc/x86_64-unknown-linux-gnu/12.2.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: /builddir/gcc-12.2.0/configure
--build=x86_64-unknown-linux-gnu --enable-gnu-unique-object
--enable-vtable-verify --prefix=/usr --mandir=/usr/share/man
--infodir=/usr/share/info --libexecdir=/usr/lib64 --libdir=/usr/lib64
--enable-threads=posix --enable-__cxa_atexit --disable-multilib
--with-system-zlib --enable-shared --enable-lto --enable-plugins
--enable-linker-build-id --disable-werror --disable-nls --enable-default-pie
--enable-default-ssp --enable-checking=release --disable-libstdcxx-pch
--with-isl --with-linker-hash-style=gnu --disable-sjlj-exceptions
--disable-target-libiberty --disable-libssp
--enable-languages=c,c++,objc,obj-c++,fortran,lto,go,ada
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 12.2.0 (GCC)
Here's the compiler output:
minimal.c:50:1: internal compiler error: in output_constructor_regular_field,
at varasm.cc:5521
50 | int main(void) {}
| ^~~
0x7f514864820b __libc_start_call_main
../sysdeps/nptl/libc_start_call_main.h:58
0x7f51486482bb __libc_start_main_impl
../csu/libc-start.c:381
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.