Mercurial > hg > CbC > CbC_gcc
comparison gcc/testsuite/g++.dg/lookup/crash3.C @ 111:04ced10e8804
gcc 7
author | kono |
---|---|
date | Fri, 27 Oct 2017 22:46:09 +0900 |
parents | |
children | 84e7813d76e9 |
comparison
equal
deleted
inserted
replaced
68:561a7518be6b | 111:04ced10e8804 |
---|---|
1 // { dg-do compile } | |
2 // Contributed by Wolfgang Wieser <wwieser at gmx dot de> | |
3 // PR c++/15967: ICE with ambiguous operator new | |
4 | |
5 typedef __SIZE_TYPE__ size_t; | |
6 | |
7 struct A { void *operator new(size_t s){} }; // { dg-message "operator new" } | |
8 struct B { void *operator new(size_t s){} }; // { dg-message "operator new" } | |
9 | |
10 struct C : A,B {}; | |
11 | |
12 int crash() | |
13 { | |
14 C *c=new C(); // { dg-error "ambiguous" } | |
15 } |