Compile the following code: struct c { int a, b; /*constexpr*/ c() : a(1), b(2) { } }; c v; The variable v will be defined with: .bss .align 16 .type v, @object .size v, 8 v: .zero 8 The variable has alignment 16! If you uncomment the constexpr and compile with -std=gnu++11 it can be seen that the compiler does know what the correct alignment is: .globl v .data .align 4 .type v, @object .size v, 8 v: .long 1 .long 2 This happens with the current svn version as well as with 4.7.0.
In GCC 4.9.0 we produce: .align 4 .type v, @object .size v, 8 v: .zero 8 While in GCC 5+, GCC produces: .align 8 .type v, @object .size v, 8 v: .zero 8 The GCC 4.9.0 change was r0-127682. The GCC 5 change was r5-5887. Which makes this a dup of bug 61296. *** This bug has been marked as a duplicate of bug 61296 ***