Commit 6a14cf13 by Paul Thomas

re PR fortran/30190 ([4.1 only] Bounds check generates wrong code for…

re PR fortran/30190 ([4.1 only] Bounds check generates wrong code for associated(p1(i)%p2,p1(i)%p2))

2006-12-20  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/30190
	* trans-array.c (gfc_conv_array_ref): Remove gfc_evaluate_now
	from the -fbounds-check branch.

2006-12-20  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/30190
	* gfortran.dg/bounds_check_5.f90: New test.

From-SVN: r120084
parent 2a4f771a
2006-12-20 Paul Thomas <pault@gcc.gnu.org>
PR fortran/30190
* trans-array.c (gfc_conv_array_ref): Remove gfc_evaluate_now
from the -fbounds-check branch.
2006-12-20 Roger Sayle <roger@eyesopen.com>
* trans-expr.c (is_zero_initializer_p): Determine whether a given
......
......@@ -2094,8 +2094,6 @@ gfc_conv_array_ref (gfc_se * se, gfc_array_ref * ar, gfc_symbol * sym,
tree cond;
char *msg;
indexse.expr = gfc_evaluate_now (indexse.expr, &se->pre);
tmp = gfc_conv_array_lbound (se->expr, n);
cond = fold_build2 (LT_EXPR, boolean_type_node,
indexse.expr, tmp);
......
2006-12-20 Paul Thomas <pault@gcc.gnu.org>
PR fortran/30190
* gfortran.dg/bounds_check_5.f90: New test.
2006-12-20 Andrew Pinski <pinskia@gmail.com>
PR middle-end/30143
! { dg-do run }
! This tests the fix for PR30190, in which the array reference
! in the associated statement would cause a segfault.
!
! Contributed by Tobias Burnus <burnus@gcc.gnu.org>
!
TYPE particle_type
INTEGER, POINTER :: p(:)
END TYPE particle_type
TYPE(particle_type), POINTER :: t(:)
integer :: i
logical :: f
i = 1
allocate(t(1))
allocate(t(1)%p(0))
f = associated(t(i)%p,t(i)%p)
end
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