------- Comment #1 from pault at gcc dot gnu dot org  2006-10-07 21:23 -------
Created an attachment (id=12395)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=12395&action=view)
A provisional fix for this PR

This comes about because the gfc_evaluate_now is fixing the expression after it
has already been used.  The better thing to do, as in this patch, is to retain
the original expression and to make a new variable for the fixed value.

The only thing that is giving me pause is that this fix does not go far enough.
 I note that gfc_trans_array_bound_check does exactly the same thing. The 
  index = gfc_evaluate_now (index, &se->pre);
on line 1838  is either unnecessary, or else the l-value should not be index. 
I will check this out tomorrow morning.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29371

Reply via email to