(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.target/
powerpc/
pr99557.c
       1  /* { dg-do run { target { powerpc*-ibm-aix* } } } */
       2  /* { dg-options "" } */
       3  
       4  void abort (void);
       5  
       6  struct A {
       7    double x[2];
       8    int y;
       9  };
      10  
      11  struct B {
      12    int i;
      13    struct A a;
      14  };
      15  
      16  struct N {
      17    double d[2];
      18  };
      19  
      20  struct S {
      21    struct N n;
      22    float f;
      23  };
      24  
      25  struct T {
      26    char c;
      27    struct S s;
      28  };
      29  
      30  int main() {   
      31    if (__alignof(struct A) != 8)
      32      abort();
      33  
      34    if (__alignof(struct B) != 4)
      35      abort();
      36  
      37    if (__builtin_offsetof(struct B, a) != 4)
      38      abort();
      39  
      40    if (__alignof(struct N) != 8)
      41      abort();
      42  
      43    if (__alignof(struct S) != 8)
      44      abort();
      45  
      46    if (__alignof(struct T) != 4)
      47      abort();
      48  
      49    if (__builtin_offsetof(struct T, s) != 4)
      50      abort();
      51  
      52    return 0;
      53  }