8sa1-gcc/gcc/testsuite/g++.old-deja/g++.law/arm13.C

17 lines
312 B
C++
Raw Normal View History

1997-08-19 03:34:40 -04:00
// GROUPS passed ARM-compliance
#include <stdio.h>
#include <stdlib.h>
inline void *operator new(size_t, void *place) { return place; }
void* malloc(size_t);
void free(void*);
main()
{
int* p = (int*) malloc(sizeof(int));
(void) new (p) int(1);
p->int::~int();
free(p);
printf ("PASS\n");
}