OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc1/] [gcc/] [testsuite/] [g++.old-deja/] [g++.law/] [init9.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 initialization
3
// init file
4
// From: Richard Speed 
5
// Date:     Sun, 6 Jun 1993 15:19:41 -0600 (MDT)
6
// Subject:  excess elements in aggr initzer
7
// Message-ID: 
8
 
9
extern "C" int printf (const char *, ...);
10
 
11
class samp {
12
        int a;
13
public:
14
        samp(int n) { a = n; }
15
        int get_a() { return a; }
16
};
17
 
18
int main() {
19
        samp ob[4] [2] = {  // Generated Error
20
                1, 2,
21
                3, 4,
22
                5, 6,
23
                7, 8,
24
        };
25
        int i;
26
 
27
        if (ob[0][0].get_a() == 1 && ob[0][1].get_a() == 2
28
            && ob[1][0].get_a() == 3 && ob[1][1].get_a() == 4
29
            && ob[2][0].get_a() == 5 && ob[2][1].get_a() == 6
30
            && ob[3][0].get_a() == 7 && ob[3][1].get_a() == 8)
31
          printf ("PASS\n");
32
        else
33
          { printf ("FAIL\n"); return 1; }
34
 
35
        return 0;
36
}

powered by: WebSVN 2.1.0

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