https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64236

Martin Sebor <msebor at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |msebor at gcc dot gnu.org

--- Comment #2 from Martin Sebor <msebor at gcc dot gnu.org> ---
I reproduced it with today's trunk configured for powerpc-linux-gnuspe but I
don't think it has anything to do with powerpc.  It looks like GCC simply takes
the last alignment instead of the strictest one.

$ cat u.cpp && /build/gcc-trunk-ppc/gcc/xgcc -B/build/gcc-trunk-ppc/gcc -c
-std=c++11 -xc++ -Wall -S u.cpp && cat u.s
struct alignas (32) alignas (8) A1 { int i; } a1 = { 0 };
struct alignas (8) alignas (32) A2 { int i; } a2 = { 0 };

struct __attribute__ ((aligned (32), aligned (8))) B1 { int i; } b1 = { 0 };
struct __attribute__ ((aligned (8), aligned (32))) B2 { int i; } b2 = { 0 };
    .file    "u.cpp"
    .globl a1
    .section    ".sbss","aw",@nobits
    .align 3
a1:
    .zero    8
    .size    a1, 8
    .type    a1, @object
    .globl a2
    .lcomm    a2,32,32
    .type    a2, @object
    .globl b1
    .align 3
b1:
    .zero    8
    .size    b1, 8
    .type    b1, @object
    .globl b2
    .lcomm    b2,32,32
    .type    b2, @object
    .ident    "GCC: (GNU) 5.0.0 20150225 (experimental)"
    .section    .note.GNU-stack,"",@progbits

Reply via email to