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/] [ctors8.C] - Blame information for rev 338

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 305 jeremybenn
// { dg-do run  }
2
// GROUPS passed constructors
3
// ctor file
4
// Message-Id: <199212160609.AA18247@phecda.cs.sfu.ca>
5
// From: Taj Khattra 
6
// Subject: gcc 2.3.1 global ctor bug ?
7
// Date: Tue, 15 Dec 92 22:09:37 PST
8
 
9
#include 
10
 
11
struct foo {
12
     foo() : index(-1) {}
13
     int index;
14
};
15
 
16
foo *arr = new foo[2];
17
 
18
int main()
19
{
20
  if (arr[0].index == -1
21
      && arr[1].index == -1)
22
    printf ("PASS\n");
23
  else
24
    { printf ("FAIL\n"); return 1; }
25
}

powered by: WebSVN 2.1.0

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