http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54781
--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-12-17 11:25:53 UTC --- (In reply to comment #4) > Sounds more like a latent issue to me. Yes, removing invalid MEM_EXPRs would > be ok - but where do we dispatch to the tree oracle by-passing ao_ref_from_mem > which should reject this as well? Isn't this happening on the GIMPLE level? It doesn't bypass ao_ref_from_mem, but that function doesn't reject it. base in 282 base = ao_ref_base (ref); is ARRAY_REF with first operand VAR_DECL (z) and second operand a SSA_NAME. So, neither of the: 291 /* If this is a pointer dereference of a non-SSA_NAME punt. 292 ??? We could replace it with a pointer to anything. */ 293 if ((INDIRECT_REF_P (base) 294 || TREE_CODE (base) == MEM_REF) 295 && TREE_CODE (TREE_OPERAND (base, 0)) != SSA_NAME) 296 return false; 297 if (TREE_CODE (base) == TARGET_MEM_REF 298 && TMR_BASE (base) 299 && TREE_CODE (TMR_BASE (base)) != SSA_NAME) 300 return false; tests actually result in return false.