------- Comment #7 from rguenth at gcc dot gnu dot org 2009-05-20 15:26 ------- On a second thought this transformation is even wrong for non-indirect references.
extern "C" void abort (void); inline void *operator new (__SIZE_TYPE__, void *__p) throw () { return __p; } int __attribute__((noinline)) foo(void) { float f = 0; int *i = new (&f) int (1); return *(int *)&f; } int main() { if (foo() != 1) abort (); return 0; } it is wrong to turn the float read into an int read converted via a VIEW_CONVERT_EXPR. I will remove all this VIEW_CONVERT_EXPR generation again. -- rguenth at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |REOPENED Resolution|FIXED | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38747