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
2014-01-30 Alangi Derick <alangiderick@gmail.com>
[official-gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
template
/
new11.C
blob
76f6c66997f5ba14511e4a09a6144e39eba6aa94
1
// PR c++/54984
2
// { dg-do run }
3
4
int n = 1;
5
6
void* operator new(__SIZE_TYPE__)
7
{
8
n = -1;
9
return &n;
10
}
11
12
template <class T>
13
struct Foo
14
{
15
Foo()
16
: x(new int)
17
{
18
if (*x != -1)
19
__builtin_abort();
20
}
21
22
int* x;
23
};
24
25
int main()
26
{
27
Foo<float> foo;
28
}