This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [gfortran testsuite, committed] Re: gfortran.dg/forall_1.f90
On Tue, Jun 07, 2005 at 11:11:06AM -0400, Jakub Jelinek wrote:
>
> FYI, the bug is in the
> forall (i=1:15, j=1:10, a1(j)%k <= j)
> i2(i,j) = j + i*11
> end forall
>
> code. The temp array of logical4 (logical4 temp.26[150]; in my case,
> BTW, does it really have to be logical4, can't be some 8 bit type?)
> is computed correctly (150x .true.), but when used to see
> if i2(i,j) should be stored or not, it advances by 16 logical4s
> each time instead of 15, so in the last round it accesses 10 words
> after the end of the array.
>
No, it does not have to be a logical4. From section 7.5.4,
we find the constraint "The scalar-mask-expr shall be a
scalar of type logical." The kind of the logical is not
specified, so I believe can use KIND=1, 2, 4, or 8.
--
Steve