/* This ICEd the official mingw 4.6.1 with: 'internal compiler error: in cxx_eval_logical_expression at cp/semantics.c:6487' (I had the same result on gcc 4.7.0 20110813 from www.equation.com) */ #include <type_traits> static constexpr bool value = std::integral_constant<bool,true>() && std::integral_constant<bool,true>();
fails the gcc_assert in cxx_eval_logical_expression
reduced template <class T> struct integral_constant { typedef T value_type; constexpr operator value_type() { return true; } }; static constexpr bool value = integral_constant<bool>() && true;
Author: jason Date: Tue Sep 27 02:12:42 2011 New Revision: 179228 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=179228 Log: PR c++/50508 * semantics.c (cxx_eval_logical_expression): Use tree_int_cst_equal rather than ==. Added: trunk/gcc/testsuite/g++.dg/cpp0x/constexpr-typedef1.C Modified: trunk/gcc/cp/ChangeLog trunk/gcc/cp/semantics.c trunk/gcc/testsuite/ChangeLog
Author: jason Date: Tue Sep 27 02:18:56 2011 New Revision: 179231 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=179231 Log: PR c++/50508 * semantics.c (cxx_eval_logical_expression): Use tree_int_cst_equal rather than ==. Added: branches/gcc-4_6-branch/gcc/testsuite/g++.dg/cpp0x/constexpr-typedef1.C Modified: branches/gcc-4_6-branch/gcc/cp/ChangeLog branches/gcc-4_6-branch/gcc/cp/semantics.c branches/gcc-4_6-branch/gcc/testsuite/ChangeLog
Fixed for 4.6.2.