summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.brendan/delete2.C
blob: a917003432ff0aff0de5f286aa068d65ddb39d0e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// { dg-do run  }
// GROUPS passed operator-delete
// Check that using the delete operator with a null pointer
// is allowed (as called for by The Book, pg. 259)

extern "C" int printf (const char *, ...); 

struct base {
	int member;
};

base* bp;

void test ()
{
	delete bp;
}

int main ()
{
	bp = (base *) 0;
	test ();

	printf ("PASS\n");
	return 0;
}