Commit 7f3c03bf by Jason Merrill

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
parent 8ff02f96
......@@ -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
// 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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment