public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/99492] New: double and double _Complex not aligned consistently on AIX
@ 2021-03-09 18:04 dje at gcc dot gnu.org
  2021-03-10  8:10 ` [Bug target/99492] " rguenth at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: dje at gcc dot gnu.org @ 2021-03-09 18:04 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 99492
           Summary: double and double _Complex not aligned consistently on
                    AIX
           Product: gcc
           Version: 11.0
            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*

extern "C" int printf(const char *, ...);
struct C {
    char c1;
    double _Complex c2;
};
struct D {
    char c1;
    double c2;
};
int main() {   
  printf("%lu\n", __alignof(double _Complex));
  printf("offsetof C.c2: %lu %lu\n", __builtin_offsetof(struct C, c2),
(unsigned long)&((struct C*)0)->c2);
  printf("%lu\n", __alignof(double));
  printf("offsetof D.c2: %lu %lu\n", __builtin_offsetof(struct D, c2),
(unsigned long)&((struct D*)0)->c2);
  return 0;
}

xlC/xlClang/clang on AIX all agree that D.c2 is at offset 4.

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

end of thread, other threads:[~2021-03-12  3:25 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-09 18:04 [Bug target/99492] New: double and double _Complex not aligned consistently on AIX dje at gcc dot gnu.org
2021-03-10  8:10 ` [Bug target/99492] " rguenth at gcc dot gnu.org
2021-03-10 18:00 ` dje at gcc dot gnu.org
2021-03-10 23:51 ` cvs-commit at gcc dot gnu.org
2021-03-12  3:25 ` 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).