------- Comment #5 from info at hex-rays dot com 2009-11-24 11:02 ------- What is embarrassing is that the compiler does not issue at least a warning and changes the alignment depending on some very obscure factor. I understand why it happens but really do not like it.
If I add one more line to myadd.cpp, after the include lines: std::set<int> my_intset2; the compiler will generate another copy of the set<int> ctor, but it will be different from the one in gcc_align_bug.o You could at least check the both ctors are identical at the linking time and issue a warning. On the other hand, now I realized that such a bug should have been filled very long ago... -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42158