Created attachment 508006 [details] Reduced bug trigger https://bugs.gentoo.org/638792 reports that GCC fail to compile matplotlib with -O2 with an "internal compiler error: Segmentation fault". I've tried to reduce the size of the file triggering the failure and have come down to the attached file. To reproduce, switch to the new sys-devel/gcc:6.4.0 compiler and `g++ -O2 a.cpp` should trigger it.
Created attachment 508008 [details] emerge --info sys-devel/gcc:6.4.0
`g++ -O -ftree-pre a.cpp` seems sufficient to trigger the segfault. It would be interesting to see whether this is fixed in gcc-7.
Same here with gcc-7.2. Both with -O2 and with -O -ftree-pre
*** This bug has been marked as a duplicate of bug 638792 ***