URL
https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk
Only display areas with differences |
Details |
Blame |
View Log
Rev 305 |
Rev 338 |
// { dg-do run }
|
// { dg-do run }
|
// g++ 1.37.1 bug 900321_02
|
// g++ 1.37.1 bug 900321_02
|
|
|
// The following program exits with a nonzero status because the constructor
|
// The following program exits with a nonzero status because the constructor
|
// is not called 3 times as it should be. This program exits with a zero
|
// is not called 3 times as it should be. This program exits with a zero
|
// status when compiled with cfront 2.0.
|
// status when compiled with cfront 2.0.
|
|
|
// Cfront 2.0 passes this test.
|
// Cfront 2.0 passes this test.
|
|
|
// keywords: arrays, initialization, default constructor, operator new
|
// keywords: arrays, initialization, default constructor, operator new
|
|
|
int call_count = 0;
|
int call_count = 0;
|
|
|
struct struct0 {
|
struct struct0 {
|
struct0 ();
|
struct0 ();
|
};
|
};
|
|
|
struct0::struct0 () { call_count++; }
|
struct0::struct0 () { call_count++; }
|
|
|
typedef struct0 array[3]; // known dimension
|
typedef struct0 array[3]; // known dimension
|
|
|
int test ()
|
int test ()
|
{
|
{
|
new array;
|
new array;
|
return (call_count != 3);
|
return (call_count != 3);
|
}
|
}
|
|
|
int main () { return test (); }
|
int main () { return test (); }
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.