https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84080
Bug ID: 84080 Summary: the compiler crashes when compiling the following sample file Product: gcc Version: 7.2.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: fabio at cannizzo dot net Target Milestone: --- The command # g++ -c prova.cpp -o prova.o prova.cpp:9:42: internal compiler error: Segmentation fault template <> auto foo<ca1>() { return a1; } ^ cause a g++ crash with the following input file: // prova.cpp enum aa {a1}; enum bb {b1}; enum cc {ca1, cb1}; template <cc n, typename T> T foo(); template <> auto foo<ca1>() { return a1; } template <> auto foo<cb1>() { return b1; } Tested on Linux Arch