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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.old-deja/] [g++.bugs/] [900321_02.C] - Blame information for rev 749

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 699 jeremybenn
// { dg-do run  }
2
// g++ 1.37.1 bug 900321_02
3
 
4
// The following program exits with a nonzero status because the constructor
5
// is not called 3 times as it should be.  This program exits with a zero
6
// status when compiled with cfront 2.0.
7
 
8
// Cfront 2.0 passes this test.
9
 
10
// keywords: arrays, initialization, default constructor, operator new
11
 
12
int call_count = 0;
13
 
14
struct struct0 {
15
  struct0 ();
16
};
17
 
18
struct0::struct0 () { call_count++; }
19
 
20
typedef struct0 array[3];       // known dimension
21
 
22
int test ()
23
{
24
  new array;
25
  return (call_count != 3);
26
}
27
 
28
int main () { return test (); }

powered by: WebSVN 2.1.0

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