------- Comment #17 from rguenth at gcc dot gnu dot org 2010-09-15 13:03 ------- points-to analysis does not honor GCCs type-punning through union extension (it works on x86_64 because ptr and asBits match in size and thus SRA cleans the code up before pointer-analysis). So PTA sees
ss1.0_1 = ss1; l.ptr = ss1.0_1; D.3244_2 = l.asBits; m.asBits = D.3244_2; D.3245_3 = m.ptr; data_4 = (void * *) D.3245_3; and it considers both D.3244_2 = l.asBits and m.asBits = D.3244_2 as irrelevant (as they do not involve pointers). Thus, m.ptr is never assigned to and the points-to set of data_4 ends up as empty which makes us remove the store *data_4 = s2.1_5. Thus, as a workaround you should make sure the asBits field matches pointer-size (so for example use uintptr_t isntead of uint64_t). -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45623