Bug 2106968

Summary: c++: internal compiler error: Segmentation fault signal terminated program cc1plus
Product: Red Hat Developer Toolset Reporter: mxd <553977606>
Component: gccAssignee: Martin Cermak <mcermak>
gcc sub component: gcc-toolset-12 QA Contact: Martin Cermak <mcermak>
Status: CLOSED NEXTRELEASE Docs Contact:
Severity: unspecified    
Priority: unspecified CC: ahajkova, fweimer, jakub, mpolacek, ohudlick, sipoyare
Version: unspecified   
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-07-14 18:26:43 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description mxd 2022-07-14 02:17:20 UTC
Description of problem:
When compiling Clickhouse, some error occurs:[c++: internal compiler error: Segmentation fault signal terminated program cc1plus], and the compile is 
terminated.

Version-Release number of selected component (if applicable):
g++ -v
[
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/opt/rh/devtoolset-11/root/usr/libexec/gcc/x86_64-redhat-linux/11/lto-wrapper
Target: x86_64-redhat-linux
Configured with: ../configure --enable-bootstrap --enable-languages=c,c++,fortran,lto --prefix=/opt/rh/devtoolset-11/root/usr --mandir=/opt/rh/devtoolset-11/root/usr/share/man --infodir=/opt/rh/devtoolset-11/root/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 --with-linker-hash-style=gnu --with-default-libstdcxx-abi=gcc4-compatible --enable-plugin --enable-initfini-array --with-isl=/builddir/build/BUILD/gcc-11.2.1-20220127/obj-x86_64-redhat-linux/isl-install --enable-gnu-indirect-function --with-tune=generic --with-arch_32=x86-64 --build=x86_64-redhat-linux
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 11.2.1 20220127 (Red Hat 11.2.1-9) (GCC)
]
uname -a
[Linux a5b054e3ad79 5.10.16.3-microsoft-standard-WSL2 #1 SMP Fri Apr 2 22:23:49 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux]

How reproducible:
Compile clickhouse again.

Steps to Reproduce:
1.git clone https://github.com/ClickHouse/ClickHouse.git
2.cd ClickHouse
3.git submodule update --init --recursive
4.mkdir build;cd build
5.cmake -DENABLE_CCACHE=0 ../
6.ninja clickhouse

Actual results:
Compile failed.

Expected results:
Compile Succ.

Additional info:
ninja --version
[1.11.0.git]

Comment 3 Marek Polacek 2022-07-14 18:26:43 UTC
This seems to be a combination of https://gcc.gnu.org/PR101715 (already in DTS 11 gcc)
and https://gcc.gnu.org/PR102479 (not present in DTS 11 gcc though it was backported to
GCC 11).  It's not a problem with a C++20 feature.

I'm not sure if this is worth a z-stream.  It's going to be fixed in DTS 12.

Comment 4 mxd 2022-07-18 01:42:13 UTC
(In reply to Marek Polacek from comment #3)
> This seems to be a combination of https://gcc.gnu.org/PR101715 (already in
> DTS 11 gcc)
> and https://gcc.gnu.org/PR102479 (not present in DTS 11 gcc though it was
> backported to
> GCC 11).  It's not a problem with a C++20 feature.
> 
> I'm not sure if this is worth a z-stream.  It's going to be fixed in DTS 12.

Thank you for your answer. I'll use another older stable gcc version and try again.