re PR tree-optimization/77697 (suspicious code in tree-ssa-forwprop.c)
2016-09-22 Richard Biener <rguenther@suse.de> PR middle-end/77697 * gimple-fold.c (fold_array_ctor_reference): Turn asserts into fold fails. From-SVN: r240353
This commit is contained in:
parent
1f3131cb1e
commit
9ef2eff0d4
@ -1,3 +1,9 @@
|
|||||||
|
2016-09-22 Richard Biener <rguenther@suse.de>
|
||||||
|
|
||||||
|
PR middle-end/77697
|
||||||
|
* gimple-fold.c (fold_array_ctor_reference): Turn asserts into
|
||||||
|
fold fails.
|
||||||
|
|
||||||
2016-09-22 Richard Biener <rguenther@suse.de>
|
2016-09-22 Richard Biener <rguenther@suse.de>
|
||||||
|
|
||||||
PR middle-end/77677
|
PR middle-end/77677
|
||||||
|
@ -5647,14 +5647,15 @@ fold_array_ctor_reference (tree type, tree ctor,
|
|||||||
if (domain_type && TYPE_MIN_VALUE (domain_type))
|
if (domain_type && TYPE_MIN_VALUE (domain_type))
|
||||||
{
|
{
|
||||||
/* Static constructors for variably sized objects makes no sense. */
|
/* Static constructors for variably sized objects makes no sense. */
|
||||||
gcc_assert (TREE_CODE (TYPE_MIN_VALUE (domain_type)) == INTEGER_CST);
|
if (TREE_CODE (TYPE_MIN_VALUE (domain_type)) != INTEGER_CST)
|
||||||
|
return NULL_TREE;
|
||||||
low_bound = wi::to_offset (TYPE_MIN_VALUE (domain_type));
|
low_bound = wi::to_offset (TYPE_MIN_VALUE (domain_type));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
low_bound = 0;
|
low_bound = 0;
|
||||||
/* Static constructors for variably sized objects makes no sense. */
|
/* Static constructors for variably sized objects makes no sense. */
|
||||||
gcc_assert (TREE_CODE (TYPE_SIZE_UNIT (TREE_TYPE (TREE_TYPE (ctor))))
|
if (TREE_CODE (TYPE_SIZE_UNIT (TREE_TYPE (TREE_TYPE (ctor)))) != INTEGER_CST)
|
||||||
== INTEGER_CST);
|
return NULL_TREE;
|
||||||
elt_size = wi::to_offset (TYPE_SIZE_UNIT (TREE_TYPE (TREE_TYPE (ctor))));
|
elt_size = wi::to_offset (TYPE_SIZE_UNIT (TREE_TYPE (TREE_TYPE (ctor))));
|
||||||
|
|
||||||
/* We can handle only constantly sized accesses that are known to not
|
/* We can handle only constantly sized accesses that are known to not
|
||||||
|
Loading…
Reference in New Issue
Block a user