stabilize_reference question
Per Bothner
bothner@cygnus.com
Wed Mar 31 23:46:00 GMT 1999
> g++.old-deja/g++.mike/p9506.C might be a testcase.
This is it:
char * volatile p;
void foo() {
--p = 0;
}
The generated code (with -O) is:
foo__Fv:
.LLFB1:
!#PROLOGUE# 0
!#PROLOGUE# 1
sethi %hi(p), %g3
ld [%g3+%lo(p)], %g2
add %g2, -1, %g2
st %g2, [%g3+%lo(p)]
st %g0, [%g3+%lo(p)]
retl
nop
It is the same with my patch, with the original version that you
replaced, and Cygnus 98r2. However, the testcase does not seem
to call stabilize_reference with a COMPOUND_EXPR.
> check PR 9506 to see if it was done around:
The PR was submitted Apr 22. 1996. It does discuss volatile
and the comma operator. It is not very conclusive.
--Per Bothner
Cygnus Solutions bothner@cygnus.com http://www.cygnus.com/~bothner
More information about the Gcc
mailing list