[Bug c++/53401] [C++11] internal compiler error: Segmentation fault on infinite argument deduction of constexpr templates
pinskia at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Sun May 20 20:01:00 GMT 2012
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53401
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |diagnostic
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> 2012-05-20 19:15:39 UTC ---
t6.cc:11:16: error: template instantiation depth exceeds maximum of 900 (use
-ftemplate-depth= to increase the maximum) instantiating ‘struct index<-898>’
constexpr auto recursive_impl(index<N>) // Line 11
^
t6.cc:11:16: recursively required by substitution of ‘template<int N>
constexpr decltype (recursive_impl(index<(N - 1)>())) recursive_impl(index<N>)
[with int N = 0]’
t6.cc:11:16: required by substitution of ‘template<int N> constexpr decltype
(recursive_impl(index<(N - 1)>())) recursive_impl(index<N>) [with int N = 1]’
t6.cc:18:16: required by substitution of ‘template<int N> constexpr decltype
(recursive_impl(index<N>())) recursive() [with int N = 1]’
t6.cc:26:16: required from here
t6.cc:11:16: error: template instantiation depth exceeds maximum of 900 (use
-ftemplate-depth= to increase the maximum) instantiating ‘struct index<-899>’
t6.cc:11:16: recursively required by substitution of ‘template<int N>
constexpr decltype (recursive_impl(index<(N - 1)>())) recursive_impl(index<N>)
[with int N = 0]’
t6.cc:11:16: required by substitution of ‘template<int N> constexpr decltype
(recursive_impl(index<N>())) recursive() [with int N = 1]’
t6.cc:26:16: required from here
And then an infinite loop.
More information about the Gcc-bugs
mailing list