http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58270
--- Comment #10 from Krzysztof Strasburger <strasbur at chkw386 dot ch.pwr.wroc.pl> --- Jakub, I do not care about C++ (never understood it), but commons are just commons. I see them from linker's perspective. How does the compiler treat variables belonging to that common - this is a different story. I examined the assembler outputs and I think that the real problem is that the compiler treats one-element array (dmem) in buggy.c as ordinary variable. somewhere. If dmem is declared as two-element array (so that nobody can assume blindly to which element data should go), then everything works correctly, regardless how it is declared elsewhere. It is an overoptimization IMHO, but I'm just a user.