Mercurial > hg > CbC > CbC_gcc
view gcc/testsuite/g++.dg/ext/alignof2.C @ 131:84e7813d76e9
gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 07:37:49 +0900 |
parents | 04ced10e8804 |
children | 1830386684a0 |
line wrap: on
line source
// PRs 16387 and 16389 // We were treating alignof (sa.a) as alignof (typeof (sa.a)), which is // wrong for some fields. // { dg-do run } // { dg-xfail-run-if "AIX ABI increases struct alignment for first member double" { powerpc-ibm-aix* } } extern "C" void abort(); struct A { double a; } sa; struct B { char c; double b; } sb; int main() { if (__alignof (sa) != __alignof (sa.a) || __alignof (sb) != __alignof (sb.b)) abort(); }