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

--- Comment #4 from Martin Sebor <msebor at gcc dot gnu.org> ---
The alignment is respected for members of other types than char so the order of
the attributes doesn't seem to matter here (it does matter in pr89950):

$ cat pr89968-2.c && gcc -S -O2 -Wall -fdump-tree-optimized=/dev/stdout
pr89968-2.c 
struct S
{
  char c;
  __attribute__ ((aligned (64), packed, vector_size (1024))) int v;   // okay
};

int f (void) { return sizeof (struct S); }        // 1088
int g (void) { return __alignof__ (struct S); }   // 64

__attribute__ ((aligned (64), vector_size (1024))) int v1;
int h1 (void) { return __alignof__ (v1); }        // 1024

__attribute__ ((vector_size (1024), aligned (64))) int v2;
int h2 (void) { return __alignof__ (v2); }        // 64




;; Function f (f, funcdef_no=0, decl_uid=1909, cgraph_uid=1, symbol_order=0)

f ()
{
  <bb 2> [local count: 1073741824]:
  return 1088;

}



;; Function g (g, funcdef_no=1, decl_uid=1912, cgraph_uid=2, symbol_order=1)

g ()
{
  <bb 2> [local count: 1073741824]:
  return 64;

}



;; Function h1 (h1, funcdef_no=2, decl_uid=1916, cgraph_uid=3, symbol_order=3)

h1 ()
{
  <bb 2> [local count: 1073741824]:
  return 1024;

}



;; Function h2 (h2, funcdef_no=5, decl_uid=1920, cgraph_uid=4, symbol_order=5)

h2 ()
{
  <bb 2> [local count: 1073741824]:
  return 64;

}

Reply via email to