aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp1z/aligned-new1.C
blob: 48e9e945766aa6a5d00ba62029929fccd49a40f2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// { dg-do run { target c++17 } }

#ifndef __STDCPP_DEFAULT_NEW_ALIGNMENT__
#error __STDCPP_DEFAULT_NEW_ALIGNMENT__ not defined
#endif

#include <cstdint>

struct alignas(64) A { int i; };

int main()
{
  A *p = new A;
  if (std::intptr_t(p) % 64 != 0)
    __builtin_abort();
}