mirror of git://gcc.gnu.org/git/gcc.git
re PR middle-end/32417 (416.gamess ICEs (in aff_combination_add_elt, tree-affine.c))
2007-06-28 Andrew Pinski <andrew_pinski@playstation.sony.com> PR tree-opt/32417 * tree-affine.c (aff_combination_add_elt): Handle pointer addition specially. 2007-06-28 Andrew Pinski <andrew_pinski@playstation.sony.com> PR tree-opt/32417 * gfortran.fortran-torture/compile/pr32417.f90: New test. From-SVN: r126082
This commit is contained in:
parent
5346c75c56
commit
f46fe0e64c
|
@ -1,3 +1,9 @@
|
||||||
|
2007-06-28 Andrew Pinski <andrew_pinski@playstation.sony.com>
|
||||||
|
|
||||||
|
PR tree-opt/32417
|
||||||
|
* tree-affine.c (aff_combination_add_elt): Handle
|
||||||
|
pointer addition specially.
|
||||||
|
|
||||||
2007-06-28 Jakub Jelinek <jakub@redhat.com>
|
2007-06-28 Jakub Jelinek <jakub@redhat.com>
|
||||||
|
|
||||||
* config/rs6000/rs6000.c (rs6000_function_ok_for_sibcall): Ensure
|
* config/rs6000/rs6000.c (rs6000_function_ok_for_sibcall): Ensure
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
|
2007-06-28 Andrew Pinski <andrew_pinski@playstation.sony.com>
|
||||||
|
|
||||||
|
PR tree-opt/32417
|
||||||
|
* gfortran.fortran-torture/compile/pr32417.f90: New test.
|
||||||
|
|
||||||
2007-06-28 Dorit Nuzman <dorit@il.ibm.com>
|
2007-06-28 Dorit Nuzman <dorit@il.ibm.com>
|
||||||
|
|
||||||
* gcc.dg/vect/vect-iv-4.c: Test now passes on vect_pack_trunc
|
* gcc.dg/vect/vect-iv-4.c: Test now passes on vect_pack_trunc
|
||||||
|
|
|
@ -0,0 +1,15 @@
|
||||||
|
! PR tree-opt/32417
|
||||||
|
! this used to crash while running IV-opts
|
||||||
|
! aff_combination_add_elt was not ready to handle pointers correctly
|
||||||
|
|
||||||
|
SUBROUTINE ONEINTS()
|
||||||
|
COMMON /INFOA / NAT,NUM
|
||||||
|
DIMENSION TINT(NUM*NUM,NAT,3,3,3),TINTM(NUM,NUM,NAT,3,3,3)
|
||||||
|
|
||||||
|
CALL TINTS(IC)
|
||||||
|
DO ID=1,3
|
||||||
|
DO IC=1,NAT
|
||||||
|
TINTM(J,I,IC,IAN,INU,ID) = TINT((I-1)*NUM+J,IC,IAN,INU,ID)
|
||||||
|
ENDDO
|
||||||
|
ENDDO
|
||||||
|
END
|
|
@ -130,6 +130,7 @@ void
|
||||||
aff_combination_add_elt (aff_tree *comb, tree elt, double_int scale)
|
aff_combination_add_elt (aff_tree *comb, tree elt, double_int scale)
|
||||||
{
|
{
|
||||||
unsigned i;
|
unsigned i;
|
||||||
|
tree type;
|
||||||
|
|
||||||
scale = double_int_ext_for_comb (scale, comb);
|
scale = double_int_ext_for_comb (scale, comb);
|
||||||
if (double_int_zero_p (scale))
|
if (double_int_zero_p (scale))
|
||||||
|
@ -169,15 +170,26 @@ aff_combination_add_elt (aff_tree *comb, tree elt, double_int scale)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type = comb->type;
|
||||||
|
if (POINTER_TYPE_P (type))
|
||||||
|
type = sizetype;
|
||||||
|
|
||||||
if (double_int_one_p (scale))
|
if (double_int_one_p (scale))
|
||||||
elt = fold_convert (comb->type, elt);
|
elt = fold_convert (type, elt);
|
||||||
else
|
else
|
||||||
elt = fold_build2 (MULT_EXPR, comb->type,
|
elt = fold_build2 (MULT_EXPR, type,
|
||||||
fold_convert (comb->type, elt),
|
fold_convert (type, elt),
|
||||||
double_int_to_tree (comb->type, scale));
|
double_int_to_tree (type, scale));
|
||||||
|
|
||||||
if (comb->rest)
|
if (comb->rest)
|
||||||
comb->rest = fold_build2 (PLUS_EXPR, comb->type, comb->rest, elt);
|
{
|
||||||
|
if (POINTER_TYPE_P (comb->type))
|
||||||
|
comb->rest = fold_build2 (POINTER_PLUS_EXPR, comb->type,
|
||||||
|
comb->rest, elt);
|
||||||
|
else
|
||||||
|
comb->rest = fold_build2 (PLUS_EXPR, comb->type, comb->rest,
|
||||||
|
elt);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
comb->rest = elt;
|
comb->rest = elt;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue