This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Question on tree-ssa-loop-im.c:for_each_index


VIEW_CONVERT_EXPR is tcc_reference, but we can have a statement like:

	x = <VIEW_CONVERT_EXPR some_type> 22;

What ends up happening here is that find_interesting_uses_stmt calls
find_interesting_uses_address, which goes down the references and
runs into the constant, which it doesn't know how to handle.  I think
the simplest fix is below.  It's certainly safe in that it converts
an ICE into not aborting and seems to do the right thing.  The test case
is in Ada and proprietary and it didn't seem worthwhile to make a small
one for something this simple.

Does the following look correct?

*** tree-ssa-loop-im.c	11 Mar 2005 09:05:10 -0000	2.31
--- tree-ssa-loop-im.c	19 Mar 2005 00:12:02 -0000
*************** for_each_index (tree *addr_p, bool (*cbc
*** 195,198 ****
--- 195,199 ----
  	case STRING_CST:
  	case RESULT_DECL:
+ 	case INTEGER_CST:
  	  return true;
  


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]