Source file (bug.cc): #include <type_traits> int main() { static_assert( std::is_constructible<int>::value, "" ); } Message: In file included from bug.cc:1:0: /usr/local/gcc-4.6.0/lib/gcc/x86_64-unknown-linux-gnu/4.6.0/../../../../include/c++/4.6.0/type_traits: In instantiation of ‘const bool std::__is_constructible_helper<int>::__value’: /usr/local/gcc-4.6.0/lib/gcc/x86_64-unknown-linux-gnu/4.6.0/../../../../include/c++/4.6.0/type_traits:683:12: instantiated from ‘std::is_constructible<int>’ bug.cc:7:42: instantiated from here /usr/local/gcc-4.6.0/lib/gcc/x86_64-unknown-linux-gnu/4.6.0/../../../../include/c++/4.6.0/type_traits:661:71: internal compiler error: Segmentation fault Please submit a full bug report, with preprocessed source if appropriate. See <http://gcc.gnu.org/bugs.html> for instructions.
Looks like a regression. Note, in any case std::is_constructible itself didn't change lately.
reduced template<typename Tp> Tp declval() noexcept; template<typename _Tp> class __is_constructible_helper { typedef char __one; typedef struct { char __arr[2]; } __two; template<typename _Tp1, typename... _Args1> static decltype(_Tp1(declval<_Args1>()...), __one()) __test(int); template<typename, typename...> static __two __test(...); public: static const bool __value = sizeof(__test<_Tp>(0)) == 1; }; int main() { return __is_constructible_helper<int>::__value; }
Mine.
Author: jason Date: Tue Mar 29 18:47:47 2011 New Revision: 171688 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=171688 Log: PR c++/48319 * pt.c (value_dependent_expression_p): Handle TEMPLATE_ID_EXPR. Added: branches/gcc-4_6-branch/gcc/testsuite/g++.dg/cpp0x/dependent1.C Modified: branches/gcc-4_6-branch/gcc/cp/ChangeLog branches/gcc-4_6-branch/gcc/cp/pt.c branches/gcc-4_6-branch/gcc/testsuite/ChangeLog
Author: jason Date: Tue Mar 29 18:47:56 2011 New Revision: 171689 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=171689 Log: PR c++/48319 * pt.c (value_dependent_expression_p): Handle TEMPLATE_ID_EXPR. Added: trunk/gcc/testsuite/g++.dg/cpp0x/dependent1.C Modified: trunk/gcc/cp/ChangeLog trunk/gcc/cp/pt.c trunk/gcc/testsuite/ChangeLog
Fixed.