http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52282
--- Comment #3 from andyg1001 at hotmail dot co.uk 2012-05-04 16:22:21 UTC --- This ICE still occurs in the release version of gcc 4.7.0. Here is the output from compiling the attached test-case as is: $ g++-4.7 -std=c++11 ice.cpp ice.cpp: In instantiation of ‘struct Z<const int*, (& a)>’: ice.cpp:39:33: required from here ice.cpp:11:41: internal compiler error: in finish_decltype_type, at cp/semantics.c:5277 Please submit a full bug report, with preprocessed source if appropriate. See <file:///usr/share/doc/gcc-4.7/README.Bugs> for instructions. Preprocessed source stored into /tmp/ccPyRnUB.out file, please attach this to your bugreport. And if the lines in the test-case marked "ICE" are commented out, then this is the output: $ g++-4.7 -std=c++11 ice.cpp ice.cpp:47:1: error: non-constant condition for static assertion ice.cpp:47:43: error: expression ‘b<10>’ does not designate a constexpr function ice.cpp:48:1: error: non-constant condition for static assertion ice.cpp:48:43: error: expression ‘b<10>’ does not designate a constexpr function ice.cpp:64:1: error: non-constant condition for static assertion ice.cpp:64:56: error: expression ‘0u’ does not designate a constexpr function ice.cpp:65:1: error: non-constant condition for static assertion ice.cpp:65:56: error: expression ‘0u’ does not designate a constexpr function ice.cpp:66:1: error: non-constant condition for static assertion ice.cpp:66:56: error: expression ‘0u’ does not designate a constexpr function ice.cpp:67:1: error: non-constant condition for static assertion ice.cpp:67:56: error: expression ‘0u’ does not designate a constexpr function ice.cpp:70:1: error: non-constant condition for static assertion ice.cpp:70:43: error: expression ‘C::c2’ does not designate a constexpr function ice.cpp:71:1: error: non-constant condition for static assertion ice.cpp:71:43: error: expression ‘C::c2’ does not designate a constexpr function The attached test-case compiles and runs successfully under clang with one small change as shown in this diff (this doesn't affect the test-case under gcc): --- ice.cpp +++ ice.cpp @@ -53,6 +53,7 @@ static_assert(Z_<int(*)(), &b<10>>::value() == 10, "oops"); // ICE constexpr struct C { + constexpr C() = default; constexpr int c1() const { return 10; } static constexpr int c2() { return 10; } } c;