repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
PR c++/86728 - C variadic generic lambda.
[official-gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
opt
/
flifetime-dse1.C
blob
733d28a794f4980b49418e6f1b7838f101034b2e
1
// { dg-options "-O3 -fno-lifetime-dse" }
2
// { dg-do run }
3
4
typedef __SIZE_TYPE__ size_t;
5
inline void * operator new (size_t, void *p) { return p; }
6
7
struct A
8
{
9
int i;
10
A() {}
11
~A() {}
12
};
13
14
int main()
15
{
16
int ar[1];
17
18
A* ap = new(ar) A;
19
ap->i = 42;
20
ap->~A();
21
22
if (ar[0] != 42) __builtin_abort();
23
}