OSDN Git Service

Add missing test from last commit
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / g++.dg / tree-ssa / ssa-sra-3.C
1 /* { dg-do compile } */
2 /* { dg-options "-O2" } */
3 /* Test check use_block_copy bit propagation in sra element hierarchy.  */
4
5 typedef unsigned char UINT8 ;
6 typedef unsigned int UINT ;
7 class C4
8 {
9 public:
10   int xy[2];
11 };
12
13 class C3
14 {
15 public:
16   inline void
17   Reset()
18   {
19     C4 const mvMax = {0x7fff, 0x7fff};
20
21     m42(0,mvMax); 
22     m42(1,mvMax);
23     m43(0);
24   };
25
26   inline void m42 (UINT  i, C4 mv)
27   {
28     mMv[i] = mv;
29   };
30
31
32
33   inline void  m43(UINT j)
34   {
35     m44 (j);
36     d41 = j + 1;
37   };
38
39 private:
40
41   C4 mMv[2];
42   UINT8 d41;
43   inline void m44 (UINT j) const {};
44 };
45
46 class C2
47 {
48 private:
49   bool valid;
50 };
51
52 class C1
53 {
54 public:
55   void m1(C3 *c);
56
57 private:
58   const C2 * d1[2];
59   void m2(C3 *m);
60 };                                                                                                                                                                           
61
62 void C1::m1 (C3 *r)
63 {
64   C3 x;
65   m2(&x);
66 }
67 void C1::m2(C3 *x)
68 {
69   C3 m3;
70   int i;
71   m3.Reset ();
72   for(i=0; i<2; i++)
73     {
74       const C2 * r = d1[i];
75       if (r!=__null)
76         {
77           C4 const c400 = {0,0};
78           m3.m42 (i, c400);
79           
80         }
81     }
82 }   
83