diff options
author | Martin Jambor <mjambor@suse.cz> | 2011-12-19 15:33:18 +0100 |
---|---|---|
committer | Martin Jambor <jamborm@gcc.gnu.org> | 2011-12-19 15:33:18 +0100 |
commit | 6a9ceb1703fcf307cdeb4abab80e535d98857122 (patch) | |
tree | 47ffc6ec55f4c5ac4dcae8db94b431f1f911d21b /gcc/testsuite/gcc.dg | |
parent | a1a6c5b26a1b92a2e64f5373139f80aafd8bde81 (diff) | |
download | gcc-6a9ceb1703fcf307cdeb4abab80e535d98857122.zip gcc-6a9ceb1703fcf307cdeb4abab80e535d98857122.tar.gz gcc-6a9ceb1703fcf307cdeb4abab80e535d98857122.tar.bz2 |
re PR tree-optimization/51583 (One more missing force_gimple_operand in SRA)
2011-12-19 Martin Jambor <mjambor@suse.cz>
PR tree-optimization/51583
* tree-sra.c (load_assign_lhs_subreplacements): Call
force_gimple_operand_gsi when necessary also in case of no
corresponding replacement on the RHS.
* testsuite/gcc.dg/tree-ssa/pr51583.c: New test.
From-SVN: r182483
Diffstat (limited to 'gcc/testsuite/gcc.dg')
-rw-r--r-- | gcc/testsuite/gcc.dg/tree-ssa/pr51583.c | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr51583.c b/gcc/testsuite/gcc.dg/tree-ssa/pr51583.c new file mode 100644 index 0000000..2c4ec47 --- /dev/null +++ b/gcc/testsuite/gcc.dg/tree-ssa/pr51583.c @@ -0,0 +1,34 @@ +/* { dg-do compile } */ +/* { dg-options "-O1" } */ + +typedef __complex__ double Value; + +union U +{ + Value v; + char c[sizeof(Value)]; +}; + +struct S +{ + union U u; + int i,j; +}; + +Value gv; +int gi, gj; + +Value foo (void) +{ + struct S s,t; + + t.i = gi; + t.j = gj; + t.u.v = gv; + t.u.c[0] = 0; + + s = t; + __imag__ s.u.v += s.i; + + return s.u.v; +} |