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 384 |
// { dg-do run }
|
// { dg-do run }
|
// GROUPS passed initialization
|
// GROUPS passed initialization
|
// global-init file
|
// global-init file
|
// Message-Id: <9212021756.AA12639@grumpy.pocs.com>
|
// Message-Id: <9212021756.AA12639@grumpy.pocs.com>
|
// From: wp@pocs.com (Wolfgang Polak)
|
// From: wp@pocs.com (Wolfgang Polak)
|
// Subject: Initializers - gcc 2.2.2 (g++), SPARC, SunOS 4.1.1
|
// Subject: Initializers - gcc 2.2.2 (g++), SPARC, SunOS 4.1.1
|
// Date: Wed, 2 Dec 92 09:56:01 PST
|
// Date: Wed, 2 Dec 92 09:56:01 PST
|
|
|
#include
|
#include
|
struct S { int a; int c; };
|
struct S { int a; int c; };
|
int i = 3;
|
int i = 3;
|
S s = {6, i};
|
S s = {6, i};
|
S * the_s () { return &s; }
|
S * the_s () { return &s; }
|
int main ()
|
int main ()
|
{
|
{
|
S * cls = the_s ();
|
S * cls = the_s ();
|
if (cls->a != 6)
|
if (cls->a != 6)
|
{ printf ("FAIL\n"); return 1; }
|
{ printf ("FAIL\n"); return 1; }
|
else
|
else
|
printf ("PASS\n");
|
printf ("PASS\n");
|
}
|
}
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.