https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83373
--- Comment #9 from Daniel Fruzynski <bugzi...@poradnik-webmastera.com> --- Thanks for explanation. In addition to allocation on stack, my app also uses custom allocator function like below. So in this case it also should work as expected. void* msg_alloc(int msg_id); ... Msg* msg = (Msg*)msg_alloc(ID_OF_MSG); ... Anyway, this new attribute looks useful for me, it probably could allow better diagnostics and optimization. However treating all [sub]objects without this attribute as a fixed size may break some existing code, so extra command line switch to enable old (current) behavior also would be needed. All of this probably needs separate issue here to track it.