This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] Fix ipa-reference clearing TREE_ADDRESSABLE on comparisons
- From: Richard Guenther <rguenther at suse dot de>
- To: gcc-patches at gcc dot gnu dot org
- Date: Mon, 11 Dec 2006 17:36:57 +0100 (CET)
- Subject: [PATCH] Fix ipa-reference clearing TREE_ADDRESSABLE on comparisons
This fixes an oversight in ipa-reference where it misses to scan
tcc_comparison class trees for operands that take the address of
a variable.
With the pending rework of the fortran allocator interface we then
ICE in verify_stmts on
D.1234_5 = D.2345_3 == &bvD.1245;
because this is the only place left where we take bvs address.
(gfortran.dg/alloc_comp_assign_4.f90 is the testcase that starts to
fail this way)
Bootstrapped and tested on x86_64-unknown-linux-gnu.
I'll check this in together with the allocator work if that is
approved.
Richard.
2006-12-11 Richard Guenther <rguenther@suse.de>
* ipa-reference.c (scan_for_static_refs): Also scan
tcc_comparison class trees.
Index: ipa-reference.c
===================================================================
*** ipa-reference.c (revision 119733)
--- ipa-reference.c (working copy)
*************** scan_for_static_refs (tree *tp,
*** 507,512 ****
--- 507,513 ----
switch (TREE_CODE_CLASS (TREE_CODE (rhs)))
{
case tcc_binary:
+ case tcc_comparison:
{
tree op0 = TREE_OPERAND (rhs, 0);
tree op1 = TREE_OPERAND (rhs, 1);