https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108398
--- Comment #3 from Siddhesh Poyarekar <siddhesh at gcc dot gnu.org> ---
Oops, sorry I messed up the reproducer, here's the correct one. The principles
don't really change though:
unsigned steps[2];
int main(void) {
unsigned n_steps = sizeof (steps) / sizeof (unsigned);
for (unsigned *io = steps; 0 < n_steps; io++) {
if (*io == 0) {
__builtin_printf ("%zu\n", __builtin_dynamic_object_size (io, 0));
if (__builtin_dynamic_object_size (io, 0) < sizeof (unsigned))
__builtin_abort ();
n_steps--;
io--;
}
}
return 0;
}