https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84046
--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Zero sized object occupies zero bytes, if you have an array of them, necessarily all the elements of the array need to have the same address. While individual variables could be in theory padded, it would be a waste of address space for something that doesn't need to occupy any address space. Furthermore, in your testcase the objects are common variables, so it is the linker that allocates them. If you need unique addresses, just don't use zero sized objects, if you don't mind them, forcing everyone to have unique addresses might be a misoptimization for them.