Commit b5bbe47b by Richard Biener Committed by Richard Biener

re PR tree-optimization/77646 (GCC Segfault with -O3)

2016-09-20  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/77646
	* tree-ssa-sccvn.c (visit_reference_op_call): Always value-number
	a VDEF.

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

From-SVN: r240261
parent 564beb5f
2016-09-20 Richard Biener <rguenther@suse.de>
PR tree-optimization/77646
* tree-ssa-sccvn.c (visit_reference_op_call): Always value-number
a VDEF.
2016-09-20 Tamar Christina <tamar.christina@arm.com>
* config/aarch64/arm_neon.h: Add gnu_inline and artificial
......
2016-09-20 Richard Biener <rguenther@suse.de>
PR tree-optimization/77646
* gcc.dg/torture/pr77646.c: New testcase.
2016-09-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
PR c++/77434
......
/* { dg-do compile } */
struct e {
int (*f)();
void (*g)();
} * c;
int a;
void *h();
typedef struct { struct e j; } k;
int l() { return a; }
const struct e b = {l};
void m()
{
k *d = h();
d->j = b;
c = (struct e *)d;
struct e *i = c;
if (i->f(c))
while (i->f(c))
i->g();
}
......@@ -3470,6 +3470,10 @@ visit_reference_op_call (tree lhs, gcall *stmt)
{
if (vnresult->result_vdef && vdef)
changed |= set_ssa_val_to (vdef, vnresult->result_vdef);
else if (vdef)
/* If the call was discovered to be pure or const reflect
that as far as possible. */
changed |= set_ssa_val_to (vdef, vuse_ssa_val (gimple_vuse (stmt)));
if (!vnresult->result && lhs)
vnresult->result = lhs;
......
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