Remove old autovect-branch by moving to "dead" directory.
[official-gcc.git] / old-autovect-branch / gcc / testsuite / g++.dg / tree-ssa / ssa-sra-3.C
blob2a2d89c630d2caf5888c15597a6a55225e3a9cf3
1 /* { dg-do compile } */
2 /* { dg-options "-O2" } */
3 /* Test check use_block_copy bit propagation in sra element hierarchy.  */
5 typedef unsigned char UINT8 ;
6 typedef unsigned int UINT ;
7 class C4
9 public:
10   int xy[2];
13 class C3
15 public:
16   inline void
17   Reset()
18   {
19     C4 const mvMax = {0x7fff, 0x7fff};
21     m42(0,mvMax); 
22     m42(1,mvMax);
23     m43(0);
24   };
26   inline void m42 (UINT  i, C4 mv)
27   {
28     mMv[i] = mv;
29   };
33   inline void  m43(UINT j)
34   {
35     m44 (j);
36     d41 = j + 1;
37   };
39 private:
41   C4 mMv[2];
42   UINT8 d41;
43   inline void m44 (UINT j) const {};
46 class C2
48 private:
49   bool valid;
52 class C1
54 public:
55   void m1(C3 *c);
57 private:
58   const C2 * d1[2];
59   void m2(C3 *m);
60 };                                                                                                                                                                           
62 void C1::m1 (C3 *r)
64   C3 x;
65   m2(&x);
67 void C1::m2(C3 *x)
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 }