------- Comment #11 from tkoenig at gcc dot gnu dot org  2010-08-08 22:40 
-------
(In reply to comment #10)
> > This patch seems to work, and do more or less the right thing.
> 
> No counter-example of that!-) thanks.

That's good.

> > It inserts the upper bound only for strides not equal to one.
> 
> I am unable to follow the code. Do you mean that you are putting the section 
> in
> some canonical form with the minimal value of 'end'?

That is correct.  If the stride is not equal to one, and if the
size can be calculated at compile-time (which the call to gfc_ref_dimen_size
checks, and does), then the end of the array reference is set to the minimum.
I extended that function to also calculate the end.

> What puzzle me is that I
> do not see any division, is it hidden in the gmp calls?

The division is handled in gfc_ref_dimen_size, where I simply used
the size calculatd there to also calculate the minimum end.  You'll find
the division there.


-- 


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

Reply via email to