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
Daily bump.
[gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
warn
/
pr98413.C
blob
877871ad2c476a15cfd24e3b8f1b607540fdcd2e
1
/* PR c++/98413 - ICE on placement new and member pointer
2
{ dg-do compile }
3
{ dg-options "-Wall" } */
4
5
void* operator new (__SIZE_TYPE__, void *p) { return p; }
6
7
struct A { int m; } a;
8
9
void fc (int A::*p)
10
{
11
new (&(a.*p)) char;
12
}
13
14
void fi (int A::*p)
15
{
16
new (&(a.*p)) int;
17
}
18
19
void fB (int A::*p)
20
{
21
struct B { int a[2]; };
22
new (&(a.*p)) B; // { dg-warning "\\\[-Wplacement-new" }
23
}