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
* auto-profile.c (afdo_annotate_cfg): Use update_max_bb_count.
[official-gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
init
/
new47.C
blob
acd52d7993bf193a53600a83525354cf2253a534
1
// PR c++/70448
2
// { dg-do compile }
3
// { dg-options "-Wall" }
4
5
typedef __typeof__ (sizeof 0) size_t;
6
void *operator new (size_t, void *p) { return p; }
7
void *operator new[] (size_t, void *p) { return p; }
8
struct S { size_t s; };
9
void bar (S *);
10
11
void
12
foo (unsigned int s)
13
{
14
char t[sizeof (S) + s];
15
S *f = new (t) S;
16
bar (f);
17
f = new (t) S[1];
18
bar (f);
19
}