URL
https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk
Subversion Repositories openrisc_2011-10-31
[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.2.2/] [gcc/] [testsuite/] [g++.old-deja/] [g++.law/] [operators4.C] - Rev 154
Compare with Previous | Blame | View Log
// { dg-do assemble }
// GROUPS passed operators
// opr-del file
// From: rollins@bart.ee.queensu.ca (Mark Rollins)
// Date: Thu, 3 Sep 1992 22:01:03 -0400 Fri, 4 Sep 1992 02:00:25 GMT
// Subject: delete [size] pointer; Problem
// Message-ID: <92Sep3.220137edt.30@jarvis.csri.toronto.edu>
#include <complex>
typedef std::complex<double> Complex;
#include <stdio.h>
class Vector {
int size;
Complex *v;
public:
Vector(int s=1) { size = s; v = new Complex[size];};
~Vector() { delete [size] v;}// { dg-error "" } warning
};
void foo(int s)
{
Vector junk(s);
}
int main()
{
Vector* test;
for (int i=0;i<40;i++) // was 100000
foo(1000);
printf ("PASS\n");
}