Commit 8801ca5c by Richard Biener Committed by Richard Biener

re PR tree-optimization/91221 (ICE in get_int_cst_ext_nunits, at tree.c:1299 since r273548)

2019-07-22  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/91221
	* tree-ssa-sccvn.c (vn_reference_lookup_3): Appropriately
	restrict partial-def handling of empty constructors and
	memset to refs with known offset.

	* g++.dg/pr91221.C: New testcase.

From-SVN: r273667
parent ff8f129b
2019-07-22 Richard Biener <rguenther@suse.de>
PR tree-optimization/91221
* tree-ssa-sccvn.c (vn_reference_lookup_3): Appropriately
restrict partial-def handling of empty constructors and
memset to refs with known offset.
2019-07-22 Jan Beulich <jbeulich@suse.com> 2019-07-22 Jan Beulich <jbeulich@suse.com>
* config/i386/sse.md (ternlogsuffix): New. * config/i386/sse.md (ternlogsuffix): New.
......
2019-07-22 Richard Biener <rguenther@suse.de>
PR tree-optimization/91221
* g++.dg/pr91221.C: New testcase.
2019-07-22 Martin Liska <mliska@suse.cz> 2019-07-22 Martin Liska <mliska@suse.cz>
PR driver/91172 PR driver/91172
......
// { dg-do compile }
// { dg-options "-O2 -fno-ipa-pure-const -fpack-struct -Wno-address-of-packed-member" }
void printf(...);
struct A {
A() : bar_(), dbar_() {
for (int i;; i++)
printf(i, bar_[i]);
}
int bar_[5];
double dbar_[5];
};
void fn1() { A a; }
...@@ -2455,7 +2455,8 @@ vn_reference_lookup_3 (ao_ref *ref, tree vuse, void *data_, ...@@ -2455,7 +2455,8 @@ vn_reference_lookup_3 (ao_ref *ref, tree vuse, void *data_,
(vuse, vr->set, vr->type, vr->operands, val); (vuse, vr->set, vr->type, vr->operands, val);
} }
/* For now handle clearing memory with partial defs. */ /* For now handle clearing memory with partial defs. */
else if (integer_zerop (gimple_call_arg (def_stmt, 1)) else if (known_eq (ref->size, maxsize)
&& integer_zerop (gimple_call_arg (def_stmt, 1))
&& tree_to_poly_int64 (len).is_constant (&leni) && tree_to_poly_int64 (len).is_constant (&leni)
&& offset.is_constant (&offseti) && offset.is_constant (&offseti)
&& offset2.is_constant (&offset2i) && offset2.is_constant (&offset2i)
...@@ -2503,7 +2504,8 @@ vn_reference_lookup_3 (ao_ref *ref, tree vuse, void *data_, ...@@ -2503,7 +2504,8 @@ vn_reference_lookup_3 (ao_ref *ref, tree vuse, void *data_,
return vn_reference_lookup_or_insert_for_pieces return vn_reference_lookup_or_insert_for_pieces
(vuse, vr->set, vr->type, vr->operands, val); (vuse, vr->set, vr->type, vr->operands, val);
} }
else if (maxsize.is_constant (&maxsizei) else if (known_eq (ref->size, maxsize)
&& maxsize.is_constant (&maxsizei)
&& maxsizei % BITS_PER_UNIT == 0 && maxsizei % BITS_PER_UNIT == 0
&& offset.is_constant (&offseti) && offset.is_constant (&offseti)
&& offseti % BITS_PER_UNIT == 0 && offseti % BITS_PER_UNIT == 0
......
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