* auto-profile.c (afdo_annotate_cfg): Use update_max_bb_count.
[official-gcc.git] / gcc / testsuite / g++.dg / init / elide5.C
blobe52d55fae6809f6ef00a0bd43de480f7d734a55c
1 // PR c++/71913
2 // { dg-do link { target c++11 } }
4 void* operator new(decltype(sizeof(1)), void* p) { return p; }
6 struct IndirectReturn {
7   IndirectReturn() {}
8   // Undefined so we get a link error if the indirect return value is copied
9   IndirectReturn(const IndirectReturn&);
10   IndirectReturn& operator=(const IndirectReturn&) = delete;
11   ~IndirectReturn() {}
14 IndirectReturn foo() { return IndirectReturn(); }
16 void bar(void* ptr) {
17   new (ptr) IndirectReturn(foo());
20 alignas (alignof (IndirectReturn))
21 unsigned char c[sizeof(IndirectReturn)];
23 int main()
25   bar(c);