annotate gcc/testsuite/g++.dg/lookup/crash3.C @ 158:494b0b89df80 default tip

...
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Mon, 25 May 2020 18:13:55 +0900
parents 84e7813d76e9
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 // { dg-do compile }
kono
parents:
diff changeset
2 // Contributed by Wolfgang Wieser <wwieser at gmx dot de>
kono
parents:
diff changeset
3 // PR c++/15967: ICE with ambiguous operator new
kono
parents:
diff changeset
4
kono
parents:
diff changeset
5 typedef __SIZE_TYPE__ size_t;
kono
parents:
diff changeset
6
131
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
7 struct A { void *operator new(size_t s){ return 0; } }; // { dg-message "operator new" }
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
8 struct B { void *operator new(size_t s){ return 0; } }; // { dg-message "operator new" }
111
kono
parents:
diff changeset
9
kono
parents:
diff changeset
10 struct C : A,B {};
kono
parents:
diff changeset
11
131
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
12 void crash()
111
kono
parents:
diff changeset
13 {
kono
parents:
diff changeset
14 C *c=new C(); // { dg-error "ambiguous" }
kono
parents:
diff changeset
15 }