From 6a9ceb1703fcf307cdeb4abab80e535d98857122 Mon Sep 17 00:00:00 2001 From: Martin Jambor Date: Mon, 19 Dec 2011 15:33:18 +0100 Subject: re PR tree-optimization/51583 (One more missing force_gimple_operand in SRA) 2011-12-19 Martin Jambor 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 --- gcc/testsuite/gcc.dg/tree-ssa/pr51583.c | 34 +++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 gcc/testsuite/gcc.dg/tree-ssa/pr51583.c (limited to 'gcc/testsuite/gcc.dg') 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; +} -- cgit v1.1