Commit 8f70fdc3 by Richard Biener Committed by Richard Biener

re PR tree-optimization/87132 (Gcc miscompiles at -O2 on valid code)

2018-08-29  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/87132
	* tree-ssa-alias.c (get_continuation_for_phi): Do not translate
	when skipping defs reachable over backedges.

	* gcc.dg/torture/pr87132.c: New testcase.

From-SVN: r263959
parent 6214d5c7
2018-08-29 Richard Biener <rguenther@suse.de>
PR tree-optimization/87132
* tree-ssa-alias.c (get_continuation_for_phi): Do not translate
when skipping defs reachable over backedges.
2018-08-29 Richard Biener <rguenther@suse.de>
* tree-core.h: Document use of deprecated_flag in SSA_NAME.
* tree.h (SSA_NAME_POINTS_TO_READONLY_MEMORY): Define.
* tree-into-ssa.c (pass_build_ssa::execute): Initialize
......
2018-08-29 Richard Biener <rguenther@suse.de>
PR tree-optimization/87132
* gcc.dg/torture/pr87132.c: New testcase.
2018-08-29 David Malcolm <dmalcolm@redhat.com>
PR c++/85110
......
/* { dg-do run } */
extern void abort (void);
int c, d;
int main()
{
int e[] = {4, 4, 4, 4, 4, 4, 4, 4, 4};
d = 8;
for (; d; d--)
for (int a = 0; a <= 8; a++)
{
c = e[1];
e[d] = 0;
}
if (c != 0)
abort ();
return 0;
}
......@@ -2740,7 +2740,14 @@ next:;
if (arg1 == arg0)
;
else if (! maybe_skip_until (phi, arg0, ref, arg1, cnt, visited,
abort_on_visited, translate, data))
abort_on_visited,
/* Do not translate when walking over
backedges. */
dominated_by_p
(CDI_DOMINATORS,
gimple_bb (SSA_NAME_DEF_STMT (arg1)),
phi_bb)
? NULL : translate, data))
return NULL_TREE;
}
......
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