2010-09-10  Nathan Froyd  <froydnj@codesourcery.com>

	Issue #9120

	* release-notes-csl.xml (Compiler optimization improvements): New
	bullet.

	gcc/
	* gimple.c (is_gimple_min_invariant): Check for constant INDIRECT_REFs.

 2010-09-08  Tom de Vries  <tom@codesourcery.com>
 
 	gcc/

=== modified file 'gcc/gimple.c'
--- old/gcc/gimple.c	2010-06-22 17:23:11 +0000
+++ new/gcc/gimple.c	2010-09-15 16:47:52 +0000
@@ -2591,7 +2591,13 @@
 
   op = strip_invariant_refs (TREE_OPERAND (t, 0));
 
-  return op && (CONSTANT_CLASS_P (op) || decl_address_invariant_p (op));
+  if (!op)
+    return false;
+
+  if (TREE_CODE (op) == INDIRECT_REF)
+    return CONSTANT_CLASS_P (TREE_OPERAND (op, 0));
+  else
+    return CONSTANT_CLASS_P (op) || decl_address_invariant_p (op);
 }
 
 /* Return true if T is a gimple invariant address at IPA level

