This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: bug: trashed register.
.------[ Alexandre Oliva wrote (Sun, Feb 11, 2001 at 10:39:13PM -0200) ]------
|
| On Feb 11, 2001, Marc Esipovich <marc@corky.net> wrote:
|
| > func1(void *param1, int param2) {
| > internal_func(param1);
|
| > <- at this point, param1 is not restored and is filled with values
| > from its internal state inside internal_func().
|
|
| Is param1 used afterwards? If not, the compiler won't save it, and
| it's normal to have its value trashed.
|
`-------------------------------------------------
Yes it is used afterwards, sorry I didn't mention it, this is how I found
something was wrong.
func1(void *param1, int param2) {
internal_func(param1);
<- at this point, param1 is not restored and is filled with values
from its internal state inside internal_func().
another_func(param1, param2);
}
bye,
Marc.
--
marc @ corky.net
fingerprint = D1F0 5689 967F B87A 98EB C64D 256A D6BF 80DE 6D3C
/"\
\ / ASCII Ribbon Campaign
X Against HTML Mail
/ \