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
/
torture
/
uninit-pr112766.C
blob
028056e92d93f24f0bbccfe3e5d597c9aff19d68
1
// { dg-do compile }
2
// { dg-additional-options "-Wuninitialized" }
3
4
void* operator new[](__SIZE_TYPE__, void* __p) ;
5
6
class Result
7
{
8
public:
9
Result();
10
~Result();
11
};
12
13
void *foo(long nElements, void *p)
14
{
15
return p ? new((int*)p) Result[nElements] : new Result[nElements]; // { dg-bogus "uninitialized" }
16
}
17