https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90687
Bug ID: 90687 Summary: [9 regression] ICE in ocp_convert, at cp/cvt.c:766 Product: gcc Version: 9.1.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: kutdanila at yandex dot ru Target Milestone: --- Found some internal compiler error while updating g++ to the 9th version that was not an issue in 8.3. #include <string> #include <unordered_map> std::string foo(int kind) { const std::unordered_map<int, std::string> map; return true ? map.find(kind)->second : throw 1; } If removing const from unordered_map, everything works fine. Compiler options are `g++-9 -std=c++14 test.cpp`