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

* [Bug target/102068] [AIX] field alignment ignores packed
  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 ` 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
  2 siblings, 0 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

David Edelsohn <dje at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2021-08-25
             Status|UNCONFIRMED                 |NEW

--- Comment #1 from David Edelsohn <dje at gcc dot gnu.org> ---
Confirmed.

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

* [Bug target/102068] [AIX] field alignment ignores packed
  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
  2 siblings, 0 replies; 4+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-08-27  1:16 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by David Edelsohn <dje@gcc.gnu.org>:

https://gcc.gnu.org/g:5faf7120398c9bf290758891a975da1f727d631a

commit r12-3178-g5faf7120398c9bf290758891a975da1f727d631a
Author: David Edelsohn <dje.gcc@gmail.com>
Date:   Thu Aug 26 17:14:18 2021 -0400

    aix: packed struct alignment [PR102068]

    Further fixes to structure alignment when the structure is packed
    and contains double.  This patch checks for packed attribute
    at the top level.

    gcc/ChangeLog:

            PR target/102068
            * config/rs6000/rs6000.c (rs6000_adjust_field_align): Use
            computed alignment if the entire struct has attribute packed.

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

* [Bug target/102068] [AIX] field alignment ignores packed
  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
  2 siblings, 0 replies; 4+ messages in thread
From: dje at gcc dot gnu.org @ 2021-08-27 14:13 UTC (permalink / raw)
  To: gcc-bugs

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

David Edelsohn <dje at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #3 from David Edelsohn <dje at gcc dot gnu.org> ---
Fixed partially.

^ 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).