summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp0x/variadic-value1.C
blob: 301bd54631cff00c3d42d08298b9cca63b690f2b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
// PR c++/52796
// { dg-options "-std=c++0x -pedantic-errors" }

inline void *operator new(__SIZE_TYPE__ s, void *p) { return p; }

struct A
{
  int i;
  template<class... Ts>
  A(Ts&&... ts): i(ts...) { }
};

static union {
  unsigned char c[sizeof(A)];
  int i;
};

int main()
{
  i = 0xdeadbeef;
  new(c) A;
  if (i != 0)
    __builtin_abort();
}