https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71076
Bug ID: 71076 Summary: Internal compiler error Product: gcc Version: 6.1.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: manisandro at gmail dot com Target Milestone: --- Following is with gcc version 6.1.1 20160510 (Red Hat 6.1.1-2) (GCC) Following code snippet compiled as g++ -c -O foo.cpp -o foo.o produces an ICE: foo.cpp: -------- extern "C" { extern float sqrtf (float); } template <class T> struct Foo { Foo(); T a() const; Foo<T> b() const; }; template <class T> Foo<T> Foo<T>::b() const { T x = a(); T y = x < 0 ? 0 : ::sqrtf (x); return y == T(0) ? Foo() : Foo(); } struct Bar { ~Bar(); }; void foo() { Bar bar; Foo<float> dir = Foo<float>().b(); }