re PR middle-end/47743 (PRE ICE in fold_convert_loc)
2011-02-15 Richard Guenther <rguenther@suse.de> PR tree-optimization/47743 * tree-ssa-pre.c (phi_translate_1): If we didn't get a value-number for a non-type-compatible VN lookup bail out. * gcc.dg/torture/pr47743.c: New testcase. From-SVN: r170173
This commit is contained in:
parent
ad1c1eeb76
commit
48feba283c
|
@ -1,3 +1,9 @@
|
|||
2011-02-15 Richard Guenther <rguenther@suse.de>
|
||||
|
||||
PR tree-optimization/47743
|
||||
* tree-ssa-pre.c (phi_translate_1): If we didn't get a value-number
|
||||
for a non-type-compatible VN lookup bail out.
|
||||
|
||||
2011-02-15 Nathan Froyd <froydnj@codesourcery.com>
|
||||
|
||||
* config/fr30/constraints.md: New file.
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
2011-02-15 Richard Guenther <rguenther@suse.de>
|
||||
|
||||
PR tree-optimization/47743
|
||||
* gcc.dg/torture/pr47743.c: New testcase.
|
||||
|
||||
2011-02-15 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR middle-end/47581
|
||||
|
|
|
@ -0,0 +1,22 @@
|
|||
/* { dg-do compile } */
|
||||
|
||||
int
|
||||
foo (void *x, int y)
|
||||
{
|
||||
long long a = 1, *b;
|
||||
double *c;
|
||||
if (y)
|
||||
{
|
||||
b = (long long *) x;
|
||||
while (b)
|
||||
a *= *b++;
|
||||
}
|
||||
else
|
||||
{
|
||||
c = (double *) x;
|
||||
while (c)
|
||||
a *= *c++;
|
||||
}
|
||||
return a;
|
||||
}
|
||||
|
|
@ -1691,6 +1691,12 @@ phi_translate_1 (pre_expr expr, bitmap_set_t set1, bitmap_set_t set2,
|
|||
result = fold_build1 (VIEW_CONVERT_EXPR, ref->type, result);
|
||||
converted = true;
|
||||
}
|
||||
else if (!result && newref
|
||||
&& !useless_type_conversion_p (ref->type, newref->type))
|
||||
{
|
||||
VEC_free (vn_reference_op_s, heap, newoperands);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (result && is_gimple_min_invariant (result))
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue