https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66787
Bug ID: 66787 Summary: gcc fails tail call elimination Product: gcc Version: 4.9.2 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: denmark114 at naver dot com Target Milestone: --- Created attachment 35921 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=35921&action=edit source file In the attached `test.cpp`, BlendingTable::create and BlendingTable::print are two tail-recursive functions with the same form. gcc will optimize BlendingTable::print as a loop but it fails to do so for BlendingTable::create, resulting in stack overflow.