------- Comment #12 from rguenth at gcc dot gnu dot org 2006-07-10 13:00 ------- This seems to worked around on the mainline and also fails for 4.0.3.
Basically, on the mainline you can still see the behavior if using -fno-if-conversion. Short testcase: int foo (int *a, char * p) { int d; if (p) d = 1; else d = 2; a[0] = d; return p[d - 1]; } -- rguenth at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |rguenth at gcc dot gnu dot | |org Status|UNCONFIRMED |NEW Ever Confirmed|0 |1 Known to fail| |4.0.3 4.1.0 4.1.1 4.2.0 Known to work| |3.4.6 Last reconfirmed|0000-00-00 00:00:00 |2006-07-10 13:00:56 date| | Summary|[4.1/4.2 regression] Same |[4.0/4.1/4.2 regression] |value duplicated in two |Same value duplicated in two |different registers |different registers http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24609