URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Only display areas with differences |
Details |
Blame |
View Log
Rev 305 |
Rev 338 |
// { dg-do run }
|
// { dg-do run }
|
// GROUPS passed constructors
|
// GROUPS passed constructors
|
// Check that global level object constructors get called.
|
// Check that global level object constructors get called.
|
|
|
extern "C" int printf (const char *, ...);
|
extern "C" int printf (const char *, ...);
|
|
|
struct base {
|
struct base {
|
int f1;
|
int f1;
|
int f2;
|
int f2;
|
base (int arg1, int arg2);
|
base (int arg1, int arg2);
|
};
|
};
|
|
|
|
|
base global_base(0x55, 0xff);
|
base global_base(0x55, 0xff);
|
|
|
int main ()
|
int main ()
|
{
|
{
|
if ((global_base.f1 != 0x55) || (global_base.f2 != 0xff))
|
if ((global_base.f1 != 0x55) || (global_base.f2 != 0xff))
|
{ printf ("FAIL\n"); return 1; }
|
{ printf ("FAIL\n"); return 1; }
|
else
|
else
|
printf ("PASS\n");
|
printf ("PASS\n");
|
}
|
}
|
|
|
base::base(int arg1, int arg2)
|
base::base(int arg1, int arg2)
|
{
|
{
|
f1 = arg1;
|
f1 = arg1;
|
f2 = arg2;
|
f2 = arg2;
|
}
|
}
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.