[PATCH] Fix ipa-reference clearing TREE_ADDRESSABLE on comparisons

Richard Guenther rguenther@suse.de
Mon Dec 11 16:32:00 GMT 2006


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);



More information about the Gcc-patches mailing list