[Fortran] Another round of WHERE statement optimizations

Brooks Moses bmoses@stanford.edu
Fri Feb 17 18:50:00 GMT 2006


Paul Thomas wrote:
> Roger (and Brooks),
> The patch is OK. All the testscases need their DejaGnu { dg-do run }'s 
> of course.
> 
> Brooks' tests are a useful addition; especially since the last one fails 
> (and is wrong, I think).
[...]
> where (b .gt. 1) ! applies to b(2) and b(3)
> c = b ! so a(3) = c(2) = b(2) = 2 & a(4) = c(3) = b(3) = 3
> endwhere ! => a = (/1,2,2,3/) which is what ifort gives.

Your analysis is correct; I had meant to type "where (b .ge. 1)" so that 
it would catch on everything.  However, leaving it as it is and 
correcting the expected result is probably a better test.

Steve is also correct that, while I do have copyright assignment, I 
don't have write-after-approval yet, so someone will need to commit 
these for me.

- Brooks



More information about the Fortran mailing list