test:https://gcc.godbolt.org/z/j74z1qaT9 ``` int check_pointer (void) { int *pa = (int *) malloc (sizeof (int) * NUM); int *pb = (int *) malloc (sizeof (int) * NUM); return pa == pb; } ``` * llvm just return 0, while gcc not
Hmm, is it valid to optimize the malloc() calls away here?
optimizing away malloc() is on the border of validity I think since grabbing memory is an observable side-effect. Otherwise a duplicate of PR13962. *** This bug has been marked as a duplicate of bug 13962 ***