PR33749 - Wrong evaluation of expressions in lhs of assignment statements
Paul Richard Thomas
paul.richard.thomas@gmail.com
Sun Oct 14 16:53:00 GMT 2007
Dear All,
> This bug only appears in -m32 or, rather, it disappears in -m64. What
> is odd is that an entire block of code produced by the scalarizer
> appears and disappears according to the mode. What is even odder is
> that I cannot even figure out how the correct code is ever produced.
>
> This:
>
> integer(4) :: p(4) = (/2,4,1,3/)
> p(p) = (/(i, i = 1, 4)/)
> print *, p
> end
The problem is that the expression for the index in p(p) gets
correctly identified as a variable in -m32 but becomes a function in
-m64. The latter causes need_tmp to be set, which than "corrects"
this problem.
I have a patch for PR33749 but will have to fix the above first,
otherwise it will lurk undetected and get us in other ways. I wonder
how often unnecessary temporaries are created in -m64?
Cheers
Paul
More information about the Fortran
mailing list