The following well-formed code causes ICE on GCC 4.7.0 20120218 (experimental). ////////////////////////////////////////////////////////////// template<typename T, T v> struct integral_constant { typedef T value_type; static constexpr value_type value = v; constexpr operator value_type() { return value; } }; template<typename T> struct B { B() noexcept(integral_constant<bool, noexcept(T())>()) // <- ICE : v_() {} T v_; }; int main() { B<int> b; } ////////////////////////////////////////////////////////////// If I use the static constexpr `value' instread of the constexpr conversion function, the ICE disappears.
Created attachment 26741 [details] Output of -v option and preprocessed file
I'm sorry. I forgot to write that this ICE appears with -std=c++11 option.
Dup. *** This bug has been marked as a duplicate of bug 54207 ***