|
|
|
|
|
by jlebar
2249 days ago
|
|
> even without LTO, the compiler knows what malloc and free do at a semantic level. int *a = ...;
int b = *a;
malloc(42);
b = *a;
printf(b);
If malloc is an opaque function, can the compiler nonetheless eliminate the second `b = *a` load as dead because it "knows what malloc does"? Certainly not, right? |
|
Interestingly, the compiler emits no call to malloc, even. What!?