From 554fd8c5195424bdbcabf5de30fdc183aba391bd Mon Sep 17 00:00:00 2001 From: upstream source tree Date: Sun, 15 Mar 2015 20:14:05 -0400 Subject: obtained gcc-4.6.4.tar.bz2 from upstream website; verified gcc-4.6.4.tar.bz2.sig; imported gcc-4.6.4 source tree from verified upstream tarball. downloading a git-generated archive based on the 'upstream' tag should provide you with a source tree that is binary identical to the one extracted from the above tarball. if you have obtained the source via the command 'git clone', however, do note that line-endings of files in your working directory might differ from line-endings of the respective files in the upstream repository. --- gcc/testsuite/g++.dg/tree-ssa/ssa-sra-3.C | 83 +++++++++++++++++++++++++++++++ 1 file changed, 83 insertions(+) create mode 100644 gcc/testsuite/g++.dg/tree-ssa/ssa-sra-3.C (limited to 'gcc/testsuite/g++.dg/tree-ssa/ssa-sra-3.C') diff --git a/gcc/testsuite/g++.dg/tree-ssa/ssa-sra-3.C b/gcc/testsuite/g++.dg/tree-ssa/ssa-sra-3.C new file mode 100644 index 000000000..2a2d89c63 --- /dev/null +++ b/gcc/testsuite/g++.dg/tree-ssa/ssa-sra-3.C @@ -0,0 +1,83 @@ +/* { dg-do compile } */ +/* { dg-options "-O2" } */ +/* Test check use_block_copy bit propagation in sra element hierarchy. */ + +typedef unsigned char UINT8 ; +typedef unsigned int UINT ; +class C4 +{ +public: + int xy[2]; +}; + +class C3 +{ +public: + inline void + Reset() + { + C4 const mvMax = {0x7fff, 0x7fff}; + + m42(0,mvMax); + m42(1,mvMax); + m43(0); + }; + + inline void m42 (UINT i, C4 mv) + { + mMv[i] = mv; + }; + + + + inline void m43(UINT j) + { + m44 (j); + d41 = j + 1; + }; + +private: + + C4 mMv[2]; + UINT8 d41; + inline void m44 (UINT j) const {}; +}; + +class C2 +{ +private: + bool valid; +}; + +class C1 +{ +public: + void m1(C3 *c); + +private: + const C2 * d1[2]; + void m2(C3 *m); +}; + +void C1::m1 (C3 *r) +{ + C3 x; + m2(&x); +} +void C1::m2(C3 *x) +{ + C3 m3; + int i; + m3.Reset (); + for(i=0; i<2; i++) + { + const C2 * r = d1[i]; + if (r!=__null) + { + C4 const c400 = {0,0}; + m3.m42 (i, c400); + + } + } +} + -- cgit v1.2.3