[backport from gcc-4.9/trunk r197082, fixes regression from r197060 ] List-Archive: Date: Mon, 25 Mar 2013 22:00:31 -0600 From: Jeff Law Subject: Re: Record missing equivalence On 03/25/2013 06:41 PM, H.J. Lu wrote: > This breaks the bootstrap on Linux/x86: > > http://gcc.gnu.org/ml/gcc-regression/2013-03/msg00148.html > > ../../../../../src-trunk/libstdc++-v3/src/c++98/mt_allocator.cc: In > member function 'std::size_t > __gnu_cxx::__pool::_M_get_thread_id()': > ../../../../../src-trunk/libstdc++-v3/src/c++98/mt_allocator.cc:620:3: > internal compiler error: tree check: expected integer_type or > enumeral_type or boolean_type or real_type or fixed_point_type, have > pointer_type in int_fits_type_p, at tree.c:8325 > __pool::_M_get_thread_id() Definitely the wrong version of the patch. It's missing the INTEGRAL_TYPE_P test that was added to fix this exact problem. This is the delta to get to the version that should have been checked in. gcc/ 2013-03-25 Jeff Law * tree-ssa-dom.c (record_equivalences_from_incoming_edge): Add missing check for INTEGRAL_TYPE_P that was missing due to checking in wrong version of prior patch. --- gcc-4.8.0/gcc/tree-ssa-dom.c.~1~ 2013-03-29 12:46:48.665032210 +0100 +++ gcc-4.8.0/gcc/tree-ssa-dom.c 2013-03-29 12:50:35.664343560 +0100 @@ -1153,7 +1153,8 @@ record_equivalences_from_incoming_edge ( /* If the constant is in the range of the type of OLD_RHS, then convert the constant and record the equivalence. */ - if (int_fits_type_p (rhs, TREE_TYPE (old_rhs))) + if (INTEGRAL_TYPE_P (TREE_TYPE (old_rhs)) + && int_fits_type_p (rhs, TREE_TYPE (old_rhs))) { tree newval = fold_convert (TREE_TYPE (old_rhs), rhs); record_equality (old_rhs, newval);