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

            Bug ID: 120392
           Summary: GCC Segmentation Fault Cross Compiling C++ Source
           Product: gcc
           Version: 14.2.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: ad...@u-group13.org
  Target Milestone: ---

GCC (ARM C++ cross compiler, to be specific) segfaults when attempting to
compile the libcamera library (addon for Circle) using its standard
instructions with make. Compilation completes normally with v11.4.0 on my
laptop.

libcamera is cloned from commit 0b04195, make v4.4.1 was used, and the cross
compiler's version is v9.3.0

Error output is:

during GIMPLE pass: fnsplit
camerabuffer.cpp: In function 'CCameraBuffer::TPixel
CCameraBuffer::GetPixel(unsigned int, unsigned int)':
camerabuffer.cpp:265:1: internal compiler error: Segmentation fault
  265 | }
      | ^
unrecognized DWARF version in .debug_info at 6
unrecognized DWARF version in .debug_info at 6
unrecognized DWARF version in .debug_info at 6

Command triggering issue (as invoked by make):

arm-none-eabi-g++ -fno-exceptions -fno-rtti -nostdinc++ -DAARCH=32
-mcpu=arm1176jzf-s -marm -mfpu=vfp -mfloat-abi=hard -Wall -fsigned-char -g
-DUSE_USB_FIQ -D__circle__=490000 -DRASPPI=1 -DSTDLIB_SUPPORT=1
-D__VCCOREVER__=0x04000000 -U__unix__ -U__linux__  -I ../include -I
../circle/include -I ../circle/addon -I ../circle/app/lib -I
../circle/addon/vc4 -I ../circle/addon/vc4/interface/khronos/include  -O2
-ffreestanding -std=c++14 -Wno-aligned-new -c -o camerabuffer.o
camerabuffer.cpp

gcc -v output:

Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib64/gcc/x86_64-unknown-linux-gnu/14.2.1/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: /builddir/gcc-14.2.1+20250405/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 14.2.1 20250405 (GCC)

Operating system: Void Linux x64, kernel v6.12.29_1
CPU: AMD Ryzen 7 3700X

Reply via email to