(root)/
gcc-13.2.0/
gcc/
testsuite/
c-c++-common/
attr-aligned-1.c
       1  /* PR c++/65690 */
       2  /* { dg-do run } */
       3  
       4  typedef double T[4][4] __attribute__((aligned (2 * __alignof__ (double))));
       5  void foo (const T);
       6  struct S { T s; };
       7  
       8  int
       9  main ()
      10  {
      11    if (__alignof__ (struct S) != 2 * __alignof__ (double)
      12        || __alignof__ (T) != 2 * __alignof__ (double)
      13        || __alignof__ (const struct S) != 2 * __alignof__ (double)
      14        || __alignof__ (const T) != 2 * __alignof__ (double))
      15      __builtin_abort ();
      16    return 0;
      17  }
      18  
      19  #if defined(__cplusplus) && __cplusplus >= 201103L
      20  static_assert (alignof (S) == 2 * __alignof__ (double), "alignment of S");
      21  static_assert (alignof (T) == 2 * __alignof__ (double), "alignment of T");
      22  static_assert (alignof (const S) == 2 * __alignof__ (double), "alignment of const S");
      23  static_assert (alignof (const T) == 2 * __alignof__ (double), "alignment of const T");
      24  #endif