https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91210
Bug ID: 91210 Summary: Segmentation fault in random.tcc when compiling GCC 9.1 on linux powerpc(ppc) 64 Product: gcc Version: 9.1.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: m.marko08154711 at gmail dot com Target Milestone: --- Created attachment 46611 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=46611&action=edit config.log The following error occurs during compilation of GCC 9.1: --- make[5]: Entering directory `/opt/build/gcc/deploy/gcc-9.1.0/powerpc64-unknown-linux-gnu/libstdc++-v3/include' mkdir -p ./powerpc64-unknown-linux-gnu/bits/stdc++.h.gch mkdir -p ./powerpc64-unknown-linux-gnu/bits/stdc++.h.gch /opt/build/gcc/deploy/gcc-9.1.0/host-powerpc64-unknown-linux-gnu/gcc/xgcc -shared-libgcc -B/opt/build/gcc/deploy/gcc-9.1.0/host-powerpc64-unknown-linux-gnu/gcc -nostdinc++ -L/opt/build/gcc/deploy/gcc-9.1.0/powerpc64-unknown-linux-gnu/libstdc++-v3/src -L/opt/build/gcc/deploy/gcc-9.1.0/powerpc64-unknown-linux-gnu/libstdc++-v3/src/.libs -L/opt/build/gcc/deploy/gcc-9.1.0/powerpc64-unknown-linux-gnu/libstdc++-v3/libsupc++/.libs -B/opt/gcc-9.1.0-visibility/powerpc64-unknown-linux-gnu/bin/ -B/opt/gcc-9.1.0-visibility/powerpc64-unknown-linux-gnu/lib/ -isystem /opt/gcc-9.1.0-visibility/powerpc64-unknown-linux-gnu/include -isystem /opt/gcc-9.1.0-visibility/powerpc64-unknown-linux-gnu/sys-include -fno-checking -x c++-header -nostdinc++ -g -O2 -D_GNU_SOURCE -I/opt/build/gcc/deploy/gcc-9.1.0/powerpc64-unknown-linux-gnu/libstdc++-v3/include/powerpc64-unknown-linux-gnu -I/opt/build/gcc/deploy/gcc-9.1.0/powerpc64-unknown-linux-gnu/libstdc++-v3/include -I/opt/build/gcc/deploy/gcc-9.1.0/libstdc++-v3/libsupc++ -O2 -g -std=gnu++0x /opt/build/gcc/deploy/gcc-9.1.0/libstdc++-v3/include/precompiled/stdc++.h \ -o powerpc64-unknown-linux-gnu/bits/stdc++.h.gch/O2ggnu++0x.gch /opt/build/gcc/deploy/gcc-9.1.0/host-powerpc64-unknown-linux-gnu/gcc/xgcc -shared-libgcc -B/opt/build/gcc/deploy/gcc-9.1.0/host-powerpc64-unknown-linux-gnu/gcc -nostdinc++ -L/opt/build/gcc/deploy/gcc-9.1.0/powerpc64-unknown-linux-gnu/libstdc++-v3/src -L/opt/build/gcc/deploy/gcc-9.1.0/powerpc64-unknown-linux-gnu/libstdc++-v3/src/.libs -L/opt/build/gcc/deploy/gcc-9.1.0/powerpc64-unknown-linux-gnu/libstdc++-v3/libsupc++/.libs -B/opt/gcc-9.1.0-visibility/powerpc64-unknown-linux-gnu/bin/ -B/opt/gcc-9.1.0-visibility/powerpc64-unknown-linux-gnu/lib/ -isystem /opt/gcc-9.1.0-visibility/powerpc64-unknown-linux-gnu/include -isystem /opt/gcc-9.1.0-visibility/powerpc64-unknown-linux-gnu/sys-include -fno-checking -x c++-header -nostdinc++ -g -O2 -D_GNU_SOURCE -I/opt/build/gcc/deploy/gcc-9.1.0/powerpc64-unknown-linux-gnu/libstdc++-v3/include/powerpc64-unknown-linux-gnu -I/opt/build/gcc/deploy/gcc-9.1.0/powerpc64-unknown-linux-gnu/libstdc++-v3/include -I/opt/build/gcc/deploy/gcc-9.1.0/libstdc++-v3/libsupc++ -O2 -g /opt/build/gcc/deploy/gcc-9.1.0/libstdc++-v3/include/precompiled/stdc++.h -o powerpc64-unknown-linux-gnu/bits/stdc++.h.gch/O2g.gch In file included from /opt/build/gcc/deploy/gcc-9.1.0/powerpc64-unknown-linux-gnu/libstdc++-v3/include/random:51, from /opt/build/gcc/deploy/gcc-9.1.0/libstdc++-v3/include/precompiled/stdc++.h:108: /opt/build/gcc/deploy/gcc-9.1.0/powerpc64-unknown-linux-gnu/libstdc++-v3/include/bits/random.tcc: In function ‘_RealType std::generate_canonical(_UniformRandomNumberGenerator&)’: /opt/build/gcc/deploy/gcc-9.1.0/powerpc64-unknown-linux-gnu/libstdc++-v3/include/bits/random.tcc:3328:54: in ‘constexpr’ expansion of ‘std::log(2.0e+0l)’ /opt/build/gcc/deploy/gcc-9.1.0/powerpc64-unknown-linux-gnu/libstdc++-v3/include/bits/random.tcc:3328:44: internal compiler error: Segmentation fault 3328 | const size_t __log2r = std::log(__r) / std::log(2.0L); | ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~ Please submit a full bug report, with preprocessed source if appropriate. See <https://gcc.gnu.org/bugs/> for instructions. make[5]: *** [powerpc64-unknown-linux-gnu/bits/stdc++.h.gch/O2ggnu++0x.gch] Error 1 make[5]: *** Waiting for unfinished jobs.... In file included from /opt/build/gcc/deploy/gcc-9.1.0/powerpc64-unknown-linux-gnu/libstdc++-v3/include/random:51, from /opt/build/gcc/deploy/gcc-9.1.0/libstdc++-v3/include/precompiled/stdc++.h:108: /opt/build/gcc/deploy/gcc-9.1.0/powerpc64-unknown-linux-gnu/libstdc++-v3/include/bits/random.tcc: In function ‘_RealType std::generate_canonical(_UniformRandomNumberGenerator&)’: /opt/build/gcc/deploy/gcc-9.1.0/powerpc64-unknown-linux-gnu/libstdc++-v3/include/bits/random.tcc:3328:54: in ‘constexpr’ expansion of ‘std::log(2.0e+0l)’ /opt/build/gcc/deploy/gcc-9.1.0/powerpc64-unknown-linux-gnu/libstdc++-v3/include/bits/random.tcc:3328:44: internal compiler error: Segmentation fault 3328 | const size_t __log2r = std::log(__r) / std::log(2.0L); | ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~ Please submit a full bug report, with preprocessed source if appropriate. See <https://gcc.gnu.org/bugs/> for instructions. make[5]: *** [powerpc64-unknown-linux-gnu/bits/stdc++.h.gch/O2g.gch] Error 1 make[5]: Leaving directory `/opt/build/gcc/deploy/gcc-9.1.0/powerpc64-unknown-linux-gnu/libstdc++-v3/include' make[4]: *** [all-recursive] Error 1 make[4]: Leaving directory `/opt/build/gcc/deploy/gcc-9.1.0/powerpc64-unknown-linux-gnu/libstdc++-v3' make[3]: *** [all] Error 2 make[3]: Leaving directory `/opt/build/gcc/deploy/gcc-9.1.0/powerpc64-unknown-linux-gnu/libstdc++-v3' make[2]: *** [all-stage2-target-libstdc++-v3] Error 2 make[2]: Leaving directory `/opt/build/gcc/deploy/gcc-9.1.0' make[1]: *** [stage2-bubble] Error 2 make[1]: Leaving directory `/opt/build/gcc/deploy/gcc-9.1.0' make: *** [all] Error 2 --- Tried with default GCC (4.4.7 20120313 (Red Hat 4.4.7-23)), GCC 6.4.0 and GCC 8.3.0.