repo.or.cz
/
gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Fortran: Fix PR 47485.
[gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
cpp0x
/
initlist-new6.C
blob
0ef27806acf81dbdc8f2b3bef42766e0e34b2aac
1
// PR c++/105265
2
// { dg-do run { target c++11 } }
3
4
int c;
5
6
class Block
7
{
8
public:
9
Block(int n) : data{new char[n]}, size{n}
10
{
11
++c;
12
}
13
14
~Block()
15
{
16
--c;
17
delete[] data;
18
}
19
20
private:
21
char* data;
22
int size;
23
};
24
25
struct Cargo
26
{
27
Block const& block;
28
};
29
30
int main()
31
{
32
{
33
Cargo* c = new Cargo{{4000}};
34
delete c;
35
}
36
if (c != 0)
37
__builtin_abort ();
38
return 0;
39
}