blob: 86d25f8e6f35a2cb5bd86c5c7a37a19281b0c301 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
// { dg-do run }
// Copyright (C) 1999 Free Software Foundation
// by Alexandre Oliva <oliva@dcc.unicamp.br>
// based on comp.std.c++ post by Alexander Schiemann <aschiem@math.uni-sb.de>
// execution test
#include <new>
#include <stdlib.h>
struct A {
A() { throw 0; }
void* operator new(size_t size, double = 0.0) { return ::operator new(size);}
void operator delete(void* p, double) { exit(0); }
void operator delete(void* p) { abort(); }
};
int main() { try { new A; } catch(...) {} }
|