--- Comment #14 from burnus at gcc dot gnu dot org 2007-10-29 14:15 ---
Fixed on the trunk (4.3.0).
--
burnus at gcc dot gnu dot org changed:
What|Removed |Added
--- Comment #13 from burnus at gcc dot gnu dot org 2007-10-29 14:14 ---
Subject: Bug 33686
Author: burnus
Date: Mon Oct 29 14:13:44 2007
New Revision: 129720
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=129720
Log:
2007-10-29 Paul Thomas <[EMAIL PROTECTED]>
PR fortr
--- Comment #12 from pault at gcc dot gnu dot org 2007-10-24 10:00 ---
I have prototype fix for this which works OK and does not break anything. It
copies 'p' to a temporary before the FORALL and uses the temporary for the
references. This method will also cure the problem with charact
--- Comment #11 from dominiq at lps dot ens dot fr 2007-10-12 13:47 ---
> In the case where the FORALL only fills part of the array P, yes.
If you mean, say "FORALL(I=2:3)", you are right! I overlooked this possibility.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33686
--- Comment #10 from pault at gcc dot gnu dot org 2007-10-12 13:26 ---
(In reply to comment #9)
> Are the codes in #7 and #8 supposed to behave differently?
In the case where the FORALL only fills part of the array P, yes.
Paul
PS I am just about to prepare a corresponding PR for ass
--- Comment #9 from dominiq at lps dot ens dot fr 2007-10-10 09:35 ---
Are the codes in #7 and #8 supposed to behave differently?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33686
--- Comment #8 from pault at gcc dot gnu dot org 2007-10-10 06:50 ---
(In reply to comment #7)
Hmmm, that's not right, is it? It should be
PROGRAM TST
IMPLICIT NONE
INTEGER :: P(4),I
integer, allocatable :: Q(:)
P = (/2,4,1,3/)
allocate (Q(size(P)))
Q = P
FORALL(I=1:4)
--- Comment #7 from pault at gcc dot gnu dot org 2007-10-08 20:02 ---
(In reply to comment #6)
Oh dear, oh dear, we are going to have to implement
PROGRAM TST
IMPLICIT NONE
INTEGER :: P(4),I
integer, allocatable :: Q(:)
P = (/2,4,1,3/)
allocate (Q(size(P)))
FORALL(I=1:4)
--- Comment #6 from pault at gcc dot gnu dot org 2007-10-08 19:03 ---
(In reply to comment #5)
> > Now we need only to find out which compiler is right and whether the program
> > itself is valid.
> After some contemplating, I agree that the program is valid (let's see whether
> NAG's su
--- Comment #5 from burnus at gcc dot gnu dot org 2007-10-08 12:15 ---
> Now we need only to find out which compiler is right and whether the program
> itself is valid.
After some contemplating, I agree that the program is valid (let's see whether
NAG's support agrees as well).
--
bu
--- Comment #4 from dominiq at lps dot ens dot fr 2007-10-08 12:05 ---
You can add xlf to the (3, 1, 4, 2) list. I think this is the right answer.
The following code
PROGRAM TST
IMPLICIT NONE
INTEGER :: P(4),Q(4),I
P = (/2,4,1,3/)
FORALL(I=1:4)
Q(P(I)) = I
END FORALL
PR
--- Comment #3 from burnus at gcc dot gnu dot org 2007-10-08 11:28 ---
> A simple program that is supposed to invert a permutation P gives wrong result
> with gfortran 4.2.1. A quite recent trunk 4.3 gfortran also gave wrong result.
I get 3, 1, 4, 3 with:
- NAG f95
- g95
- openf95
- gfo
--- Comment #2 from enok at lysator dot liu dot se 2007-10-08 09:42 ---
Do you mean the fact that assignment expressions within a forall loop may be
executed in any order? But within a single assignment it seems that the right
hand side and any expressions within the left hand side must
--- Comment #1 from pinskia at gcc dot gnu dot org 2007-10-08 09:13 ---
I thought modifying a variable while acessing the same one in a forall loop was
undefined behavior.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33686
14 matches
Mail list logo