This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: register variable is clobbered by passing parameter to a function


"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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]