Commit 3fe2f42a by Richard Guenther Committed by Richard Biener

re PR c++/31863 (g++-4.1: out of memory with -O1/-O2)

2008-01-08  Richard Guenther  <rguenther@suse.de>

	PR middle-end/31863
	* tree-ssa-structalias.c (push_fields_onto_fieldstack): Bail
	out early if the result will be unused.

	* g++.dg/torture/pr31863.C: New testcase.

From-SVN: r131405
parent 416a8af4
2008-01-08 Richard Guenther <rguenther@suse.de>
PR middle-end/31863
* tree-ssa-structalias.c (push_fields_onto_fieldstack): Bail
out early if the result will be unused.
2008-01-08 Uros Bizjak <ubizjak@gmail.com> 2008-01-08 Uros Bizjak <ubizjak@gmail.com>
PR target/34709 PR target/34709
2008-01-08 Richard Guenther <rguenther@suse.de>
PR middle-end/31863
* g++.dg/torture/pr31863.C: New testcase.
2008-01-08 Jakub Jelinek <jakub@redhat.com> 2008-01-08 Jakub Jelinek <jakub@redhat.com>
PR middle-end/34694 PR middle-end/34694
...@@ -4062,7 +4062,13 @@ push_fields_onto_fieldstack (tree type, VEC(fieldoff_s,heap) **fieldstack, ...@@ -4062,7 +4062,13 @@ push_fields_onto_fieldstack (tree type, VEC(fieldoff_s,heap) **fieldstack,
{ {
tree field; tree field;
int count = 0; int count = 0;
int first_element = VEC_length (fieldoff_s, *fieldstack); unsigned int first_element = VEC_length (fieldoff_s, *fieldstack);
/* If the vector of fields is growing too big, bail out early.
Callers check for VEC_length <= MAX_FIELDS_FOR_FIELD_SENSITIVE, make
sure this fails. */
if (first_element > MAX_FIELDS_FOR_FIELD_SENSITIVE)
return 0;
if (TREE_CODE (type) == COMPLEX_TYPE) if (TREE_CODE (type) == COMPLEX_TYPE)
{ {
......
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