From 7f3c03bfc1e4fac5c38000ec182b2f35ebcc849f Mon Sep 17 00:00:00 2001 From: Jason Merrill Date: Tue, 24 Apr 2018 11:54:56 -0400 Subject: [PATCH] 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. From-SVN: r259606 --- gcc/testsuite/c-c++-common/attr-aligned-1.c | 8 ++++---- 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 struct A -- 2.30.2