OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.old-deja/] [g++.law/] [array1.C] - Blame information for rev 699

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 699 jeremybenn
// { dg-do run  }
2
// GROUPS passed arrays
3
// array file
4
// Message-Id: <9204120353.AA06266@cs.rice.edu>
5
// From: dougm@cs.rice.edu (Doug Moore)
6
// Subject: constructors not called on new'ed array elements
7
// Date: Sat, 11 Apr 92 22:53:35 CDT
8
 
9
#include 
10
 
11
int i = 0;
12
 
13
class foo
14
{
15
private:
16
  static foo *array;
17
public:
18
  foo()
19
    {
20
      i++;
21
    }
22
};
23
 
24
foo* foo::array = new foo [5];
25
 
26
int main()
27
{
28
  if (i != 5)
29
    { printf ("FAIL\n"); return 1; }
30
  else
31
    printf ("PASS\n");
32
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.