public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/102068] New: [AIX] field alignment ignores packed
@ 2021-08-25 15:58 dje at gcc dot gnu.org
  2021-08-25 15:58 ` [Bug target/102068] " dje at gcc dot gnu.org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: dje at gcc dot gnu.org @ 2021-08-25 15:58 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 102068
           Summary: [AIX] field alignment ignores packed
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: dje at gcc dot gnu.org
  Target Milestone: ---
            Target: powerpc-ibm-aix*

struct __attribute__((packed, aligned(2))) S {
    double a;
    char b;
};

extern "C" int printf(const char*, ...);
int main() {
  printf("alignof %s is \t\t%lu\n","S\t",__alignof__(S));
}

GCC: S = 8
XLC: S = 2

typedef double Dbl __attribute__((__aligned__(2)));

struct S {
  Dbl d;
};

S s;

extern "C" int printf(const char*, ...);
int main() {
    printf("alignof %s is \t\t%lu\n","D\t",__alignof__(D));
    printf("alignof %s is \t\t%lu\n","S\t",__alignof__(S));
}

D = 2
GCC: S = 8
XLC: S = 2

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-08-27 14:13 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-25 15:58 [Bug target/102068] New: [AIX] field alignment ignores packed dje at gcc dot gnu.org
2021-08-25 15:58 ` [Bug target/102068] " dje at gcc dot gnu.org
2021-08-27  1:16 ` cvs-commit at gcc dot gnu.org
2021-08-27 14:13 ` dje at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).