------- Comment #3 from rguenth at gcc dot gnu dot org 2006-03-17 12:55 ------- For your warning patch another option is to simply only warn in either the first or the second VRP pass, not in the third which is the only one run after loop optimizations. Also you could ignore ADDR_EXPR (ARRAY_REF (...)) as these are not reading/writing to the memory. Instead for
D.1234_2 = &a[i]; *D.1234_2 = j; warn at the point of the INDIRECT_REF and lookup the DEF for D.1234_2 to check if it is defined as &ARRAY_REF (...) -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26726