Add an UNSPEC_PROLOGUE_USE to prevent the link register from being considered dead.
[official-gcc.git] / gcc / testsuite / g++.old-deja / g++.law / ctors15.C
blob32da1418f3de32a33edf7f9cec6e604982b87444
1 // GROUPS passed constructors
2 // ctor file
3 // Message-Id: <9303270404.28207@munta.cs.mu.OZ.AU>
4 // From: fjh@cs.mu.oz.au
5 // Subject: bug with new/delete of multidimensional array
6 // Date: Sat, 27 Mar 93 14:04:52 EST
8 #include <stdio.h>
9 #include <stdlib.h>
11 int construct = 0;
13 class Element {
14 public:
15     Element() { construct++; if (construct > 6) {printf ("FAIL\n"); exit(1);}}
16     ~Element() { }
19 typedef Element array[2];
21 int main() {
22     array *x;
23     x = new array[3];
24     delete x;
25     printf ("PASS\n");