This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Record missing equivalence
- From: Jeff Law <law at redhat dot com>
- To: "H.J. Lu" <hjl dot tools at gmail dot com>
- Cc: Richard Biener <richard dot guenther at gmail dot com>, gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 25 Mar 2013 22:00:31 -0600
- Subject: Re: Record missing equivalence
- References: <514A8FE6 dot 7060704 at redhat dot com> <CAFiYyc2GSN9Aw1Lpgb4MegLkiRS9vHGV-a=RHZVGpjGX48LAZw at mail dot gmail dot com> <5150A0A2 dot 5020400 at redhat dot com> <CAMe9rOob-M2ES1ir80Shkjr0wYZDYPyaQqGRfkovGEAYk3L9Ag at mail dot gmail dot com>
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<true>::_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<true>::_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.
* 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.
*** ../../GIT/gcc/gcc/tree-ssa-dom.c Mon Mar 25 13:03:11 2013
--- tree-ssa-dom.c Thu Mar 21 07:28:51 2013
*************** record_equivalences_from_incoming_edge (
*** 1153,1159 ****
/* 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)))
{
tree newval = fold_convert (TREE_TYPE (old_rhs), rhs);
record_equality (old_rhs, newval);
--- 1153,1160 ----
/* If the constant is in the range of the type of OLD_RHS,
then convert the constant and record the equivalence. */
! 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);