------- Comment #4 from rguenth at gcc dot gnu dot org 2008-07-11 10:42 ------- Turns out this is a problem I already have a patch in my queue. Reduced testcase:
int __attribute__((noinline)) foo(int i) { int *p = __builtin_malloc (4 * sizeof(int)); *p = 0; p[i] = 1; return *p; } extern void abort (void); int main() { if (foo(0) != 1) abort (); return 0; } The bug is latent since forever. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36765