Bug#164554: gcc-3.2: volatile not respected on alpha
Daniel Jacobowitz <dan@debian.org> writes:
> But the value of J is not required to coordinate with any sequence
> points in the implementation, only in the abstract machine...
In the code, there are two modifications to i, namely
i++;
j = 6;
i--;
So at the first sequence point, i should be incremented, and at the
second sequence point, i should be decremented to its original value
(regardless of the value of j, which does not need to be coordinated).
AFAICT, in the sequence
ldq $3,i($29) !literal
lda $4,6($31)
ldq $1,j($29) !literal
ldl $2,0($3)
stl $4,0($1)
lda $2,1($2)
stl $2,0($3)
the value of i is never changed. Instead, it is loaded into $2, and
then written back from $2 to i. That seems to be in violation of the
volatile requirements to me.
Regards,
Martin
Reply to: