https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99965
Bug ID: 99965 Summary: segfault only happening with -O3 Product: gcc Version: 7.3.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: juanlucasrey at gmail dot com Target Milestone: --- Created attachment 50526 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50526&action=edit file to reproduce the following file runs fine with -O0, -O1 or -O2 but has a segmentation fault when compiled with -O3 g++ bug.cpp -o bug -O3 && ./bug I am executing this in a red hat docker container (if it matters)