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

Subversion Repositories openrisc

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc1/] [gcc/] [testsuite/] [g++.old-deja/] [g++.law/] [global-init1.C] - Diff between revs 305 and 338

Only display areas with differences | Details | Blame | View Log

Rev 305 Rev 338
// { 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");
}
}
 
 

powered by: WebSVN 2.1.0

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