http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54954
--- Comment #7 from swalter at lexmark dot com --- (In reply to Andrew Pinski from comment #6) > The header file malloc.h (which is non-standard by the way) has the > attribute malloc on the malloc function call. > > So this is invalid. Sorry, can you spell that out for me? You're saying that the behavior I'm seeing is because I'm using malloc.h for the definition of malloc(), rather than stdlib.h? malloc.h's definition of malloc has __attribute__((malloc)), so that allows gcc to perform the optimization even when -fno-builtin in thrown?