https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70484
Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Known to work| |4.3.4 Summary|Wrong optimization with |[4.9/5/6 Regression] Wrong |aliasing and access via |optimization with aliasing |char |and access via char Known to fail| |4.4.7, 4.8.5, 5.3.0 --- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> --- 4.3.4 works thus this is a regression (possibly DSE got enhanced, I do see the same bogus canon_true_dependence check there). extern void abort (void); int __attribute__((noinline,noclone)) f(int *pi, long *pl) { *pi = 1; *pl = 0; return *(char *)pi; } int main() { char a[sizeof (long)]; if (f ((int *)a, (long *)a) != 0) abort (); return 0; }