This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: register variable is clobbered by passing parameter to a function
- From: Ian Lance Taylor <ian at wasabisystems dot com>
- To: <gcc at gcc dot gnu dot org>
- Date: 16 Mar 2004 08:00:35 -0500
- Subject: Re: register variable is clobbered by passing parameter to a function
- References: <NUTMEGwFCHOzyfyz5b60000014b@NUTMEG.CAM.ARTIMI.COM>
"Dave Korn" <dk@artimi.com> writes:
> Wolfgang, your best bet is probably to just add -fixed-r16 to your
> compile-time flags. And don't call any library functions that were compiled
> without it.
This is AVR, and he is trying to use r16. According to
function_arg_regno_p() in avr.c, that register can be used to pass
parameters to functions. gcc can't handle declaring a register used
for parameter passing as fixed.
Trying to do that is an implicit ABI change anyhow. Maybe gcc should
warn about this, but it doesn't.
Ian