diff options
author | jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4> | 2018-04-24 15:54:56 +0000 |
---|---|---|
committer | jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4> | 2018-04-24 15:54:56 +0000 |
commit | 7beb55005802afa8afacf52bcb01452e344b7201 (patch) | |
tree | ebd5a06c7e7b097f1f191fa80b63c8393c1ca05d | |
parent | 071a674882318d57b8ec33f7e6ca5c64c4c84904 (diff) |
Testsuite fixes for C++11 alignof change.
gcc/testsuite:
* c-c++-common/attr-aligned-1.c: Use __alignof__ in C++11.
* g++.dg/cpp0x/alignas4.C: Expect 4-byte alignment on x86.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@259606 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/testsuite/c-c++-common/attr-aligned-1.c | 8 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/cpp0x/alignas4.C | 3 |
2 files changed, 6 insertions, 5 deletions
diff --git a/gcc/testsuite/c-c++-common/attr-aligned-1.c b/gcc/testsuite/c-c++-common/attr-aligned-1.c index 671e86baeb6..26b62393ac0 100644 --- a/gcc/testsuite/c-c++-common/attr-aligned-1.c +++ b/gcc/testsuite/c-c++-common/attr-aligned-1.c @@ -17,8 +17,8 @@ main () } #if defined(__cplusplus) && __cplusplus >= 201103L -static_assert (alignof (S) == 2 * alignof (double), "alignment of S"); -static_assert (alignof (T) == 2 * alignof (double), "alignment of T"); -static_assert (alignof (const S) == 2 * alignof (double), "alignment of const S"); -static_assert (alignof (const T) == 2 * alignof (double), "alignment of const T"); +static_assert (alignof (S) == 2 * __alignof__ (double), "alignment of S"); +static_assert (alignof (T) == 2 * __alignof__ (double), "alignment of T"); +static_assert (alignof (const S) == 2 * __alignof__ (double), "alignment of const S"); +static_assert (alignof (const T) == 2 * __alignof__ (double), "alignment of const T"); #endif diff --git a/gcc/testsuite/g++.dg/cpp0x/alignas4.C b/gcc/testsuite/g++.dg/cpp0x/alignas4.C index baa56eb8ac5..b66fa651bc2 100644 --- a/gcc/testsuite/g++.dg/cpp0x/alignas4.C +++ b/gcc/testsuite/g++.dg/cpp0x/alignas4.C @@ -1,6 +1,7 @@ // PR c++/59012 // { dg-do compile { target c++11 } } -// { dg-final { scan-assembler "align 8" { target { { i?86-*-* x86_64-*-* } && { ! *-*-darwin* } } } } } +// { dg-final { scan-assembler "align 8" { target { { i?86-*-* x86_64-*-* } && { { ! ia32 } && { ! *-*-darwin* } } } } } } +// { dg-final { scan-assembler "align 4" { target ia32 } } } template <class... T> struct A |