Attempting to compile below program with Clang Assertion Trunk:
void *my_malloc(unsigned) __attribute__((alloc_size(1)));
struct Data { };
void test() {
struct Data *const data = my_malloc(sizeof(*xyz(data)));
int gi = __builtin_object_size(data, 0);
}
Compiler Explorer: https://godbolt.org/z/r1nbPY5Mo
Attempting to compile below program with Clang Assertion Trunk:
Stack dump: