Introduce class rtx_reader
[official-gcc.git] / gcc / testsuite / g++.dg / ext / alignof2.C
blob912863ea164610b3f6e5d6d0aedf0e9bb18122df
1 // PRs 16387 and 16389
2 // We were treating alignof (sa.a) as alignof (typeof (sa.a)), which is
3 // wrong for some fields.
5 // { dg-do run }
6 // { dg-xfail-run-if "AIX ABI increases struct alignment for first member double" { powerpc-ibm-aix* } { "*" } { "" } }
8 extern "C" void abort();
10 struct A
12   double a; 
13 } sa;
15 struct B
17   char c;
18   double b;
19 } sb;
21 int main()
23   if (__alignof (sa) != __alignof (sa.a)
24       || __alignof (sb) != __alignof (sb.b))
25     abort();