Commit c2953725 by Richard Guenther Committed by Richard Biener

re PR middle-end/23944 (segv in fold_indirect_ref_1 in fold-const.c:11505)

2005-09-18  Richard Guenther  <rguenther@suse.de>

	PR middle-end/23944
	* gimplify.c (fold_indirect_ref_rhs): Fix thinko in
	fallback.

	* gcc.c-torture/compile/pr23944.c: New testcase.

From-SVN: r104402
parent 3d480e2f
2005-09-18 Richard Guenther <rguenther@suse.de>
PR middle-end/23944
* gimplify.c (fold_indirect_ref_rhs): Fix thinko in
fallback.
2005-09-18 Paul Brook <paul@codesourcery.com> 2005-09-18 Paul Brook <paul@codesourcery.com>
* config/m68k/fpgnuib.c (__floatsidf): Don't rely on signed overflow. * config/m68k/fpgnuib.c (__floatsidf): Don't rely on signed overflow.
......
...@@ -2950,9 +2950,10 @@ fold_indirect_ref_rhs (tree t) ...@@ -2950,9 +2950,10 @@ fold_indirect_ref_rhs (tree t)
{ {
tree type_domain; tree type_domain;
tree min_val = size_zero_node; tree min_val = size_zero_node;
tree osub = sub;
sub = fold_indirect_ref_rhs (sub); sub = fold_indirect_ref_rhs (sub);
if (! sub) if (! sub)
sub = build1 (INDIRECT_REF, TREE_TYPE (subtype), sub); sub = build1 (INDIRECT_REF, TREE_TYPE (subtype), osub);
type_domain = TYPE_DOMAIN (TREE_TYPE (sub)); type_domain = TYPE_DOMAIN (TREE_TYPE (sub));
if (type_domain && TYPE_MIN_VALUE (type_domain)) if (type_domain && TYPE_MIN_VALUE (type_domain))
min_val = TYPE_MIN_VALUE (type_domain); min_val = TYPE_MIN_VALUE (type_domain);
......
2005-09-18 Richard Guenther <rguenther@suse.de>
PR middle-end/23944
* gcc.c-torture/compile/pr23944.c: New testcase.
2005-09-18 Erik Edelmann <erik.edelmann@iki.fi> 2005-09-18 Erik Edelmann <erik.edelmann@iki.fi>
PR fortran/15975 PR fortran/15975
float f(float src[][4])
{
return *(src[3]);
}
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