https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106109
Bug ID: 106109 Summary: Internal compiler error Product: gcc Version: 12.1.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: philip.deegan at gmail dot com Target Milestone: --- Hi, With the release of FC36 and GCC12, we've begun to get an internal compiler error for the following code, https://github.com/PHAREHUB/PHARE/blob/master/tests/core/data/electrons/test_electrons.cpp#L464-L519 Firstly it says "invalid use of auto", but adding "-> void" to the lambda resolves this, however following that we get an internal compiler error. ``` /io/tests/core/data/electrons/test_electrons.cpp: In member function ‘void ElectronsTest_ThatElectronsVelocityEqualIonVelocityMinusJ_Test<gtest_TypeParam_>::TestBody() [with gtest_TypeParam_ = std::pair<PHARE::core::DimConst<3>, PHARE::core::InterpConst<1> >]’: /io/tests/core/data/electrons/test_electrons.cpp:519:10: internal compiler error: Segmentation fault 519 | check(this->Vex, this->Vix, this->Jx, Ne, GridYee::JxToMoments); | ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Please submit a full bug report, with preprocessed source. See <http://bugzilla.redhat.com/bugzilla> for instructions. Preprocessed source stored into /tmp/ccCpGiQv.out file, please attach this to your bugreport. ninja: build stopped: subcommand failed. ``` ``` gcc -v Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/12/lto-wrapper OFFLOAD_TARGET_NAMES=nvptx-none OFFLOAD_TARGET_DEFAULT=1 Target: x86_64-redhat-linux Configured with: ../configure --enable-bootstrap --enable-languages=c,c++,fortran,objc,obj-c++,ada,go,d,lto --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-shared --enable-threads=posix --enable-checking=release --enable-multilib --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-gcc-major-version-only --enable-libstdcxx-backtrace --with-linker-hash-style=gnu --enable-plugin --enable-initfini-array --with-isl=/builddir/build/BUILD/gcc-12.1.1-20220507/obj-x86_64-redhat-linux/isl-install --enable-offload-targets=nvptx-none --without-cuda-driver --enable-offload-defaulted --enable-gnu-indirect-function --enable-cet --with-tune=generic --with-arch_32=i686 --build=x86_64-redhat-linux --with-build-config=bootstrap-lto --enable-link-serialization=1 Thread model: posix Supported LTO compression algorithms: zlib zstd gcc version 12.1.1 20220507 (Red Hat 12.1.1-1) (GCC) ``` ccCpGiQv.out is uploaded here: https://gist.github.com/PhilipDeegan/c47eb44c96f579aa62d23ab1b5f2daa0 Changing to use a free templated function fails. Commenting out the code inside the lambda fails. If you have any issues building, we provide some Dockerfiles. If this is in the wrong place please let me know. Happy to test things to help investigate. Thanks