#include <algorithm> #include <string> void patch(std::string& s) { std::replace(s.begin(),s.end(),'.','-'); } gcc replace.C In file included from /opt/rh/devtoolset-8/root/usr/include/c++/8/bits/uniform_int_dist.h:35, from /opt/rh/devtoolset-8/root/usr/include/c++/8/bits/stl_algo.h:66, from /opt/rh/devtoolset-8/root/usr/include/c++/8/algorithm:62, from replace.C:1: /opt/rh/devtoolset-8/root/usr/include/c++/8/limits:1677:7: internal compiler error: Segmentation fault max() _GLIBCXX_USE_NOEXCEPT { return __DBL_MAX__; } ^~~ Please submit a full bug report, with preprocessed source if appropriate. See <http://bugzilla.redhat.com/bugzilla> for instructions. Preprocessed source stored into /tmp/ccFTVYLT.out file, please attach this to your bugreport.
Same code compile on x86 on same version of compiler.
I can't reproduce this with latest trunk on ppc64le. Can you please provide a preprocessed source file for this ICE?
Created attachment 48110 [details] Pre-processed file created using -save-temps
Still can't reproduce with mainline trunk/9/8. Since I happen to work on DTS, I've also tried devtoolset-8-gcc-8.2.1-3.el7.ppc64le and devtoolset-8-gcc-8.3.1-3.2.el7.ppc64le but couldn't reproduce it either. Did you use any special options not mentioned in this bug report?
No options. Same failure with -O2. System is a RHEL 7.5. Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/opt/rh/devtoolset-8/root/usr/libexec/gcc/ppc64le-redhat-linux/8/lto-wrapper Target: ppc64le-redhat-linux Configured with: ../configure --enable-bootstrap --enable-languages=c,c++,fortran,lto --prefix=/opt/rh/devtoolset-8/root/usr --mandir=/opt/rh/devtoolset-8/root/usr/share/man --infodir=/opt/rh/devtoolset-8/root/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-shared --enable-threads=posix --enable-checking=release --enable-targets=powerpcle-linux --disable-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-8.3.1-20190311/obj-ppc64le-redhat-linux/isl-install --disable-libmpx --enable-gnu-indirect-function --enable-secureplt --with-long-double-128 --with-cpu-32=power8 --with-tune-32=power8 --with-cpu-64=power8 --with-tune-64=power8 --build=ppc64le-redhat-linux Thread model: posix gcc version 8.3.1 20190311 (Red Hat 8.3.1-3) (GCC) No error with: gcc -std=gnu++98 replace.C gcc -std=gnu++03 replace.C Error with: gcc -std=gnu++11 replace.C gcc -std=gnu++17 replace.C
*** Bug 94519 has been marked as a duplicate of this bug. ***
Too old libgmp got picked up. Setting LD_LIBRARY_PATH=/lib64 solved the issue.