Commit ad2a2706 by Martin Jambor Committed by Martin Jambor

[PR 69920] Prevent SRA from leaving a removed SSA_NAME in IL

2016-02-26  Martin Jambor  <mjambor@suse.cz>

	PR middle-end/69920
	* tree-sra.c (sra_modify_assign): Do not remove loads of
	uninitialized aggregates to SSA_NAMEs.

testsuite/
	* gcc.dg/torture/pr69932.c: New test.
	* gcc.dg/torture/pr69936.c: Likewise.

From-SVN: r233753
parent 1d11f7ce
2016-02-26 Martin Jambor <mjambor@suse.cz>
PR middle-end/69920
* tree-sra.c (sra_modify_assign): Do not remove loads of
uninitialized aggregates to SSA_NAMEs.
2016-02-26 Richard Henderson <rth@redhat.com>
PR target/69709
......
2016-02-26 Martin Jambor <mjambor@suse.cz>
PR middle-end/69920
* gcc.dg/torture/pr69932.c: New test.
* gcc.dg/torture/pr69936.c: Likewise.
2016-02-26 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
PR target/69709
......
/* { dg-do compile } */
int a;
void fn1() {
int b = 4;
short c[4];
c[b] = c[a];
if (c[2]) {}
}
/* { dg-do compile } */
int a;
char b;
void fn1(int p1) {}
int fn2() { return 5; }
void fn3() {
if (fn2())
;
else {
char c[5];
c[0] = 5;
lbl_608:
fn1(c[9]);
int d = c[9];
c[2] | a;
d = c[b];
}
goto lbl_608;
}
int main() { return 0; }
......@@ -3504,7 +3504,8 @@ sra_modify_assign (gimple *stmt, gimple_stmt_iterator *gsi)
else
{
if (access_has_children_p (racc)
&& !racc->grp_unscalarized_data)
&& !racc->grp_unscalarized_data
&& TREE_CODE (lhs) != SSA_NAME)
{
if (dump_file)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment