@regehr This must be related to the fact that malloc can be optimized away, right? If I write something like
int f(void) {
int *p = malloc(sizeof(int));
*p = 42;
int i = *p;
free(p);
return i;
}
then it's valid to optimize it to
int f(void) {
return 42;
}