nested function question
Aurelien Buhrig
aurelien.buhrig.gcc@gmail.com
Tue Sep 11 09:15:00 GMT 2012
> Hi,
>
> The gcc.c-torture/execute/nestfunc-3.c test fails on a private target. I
> suspect this is because the STATIC_CHAIN_REGNUM, which is not a call
> used register, is used by the caller function (main), modified by the
> trampoline, but not restored upon nested function return.
>
> Should the STATIC_CHAIN_REGNUM be defined so that
> CALL_USED_REGISTERS[STATIC_CHAIN_REGNUM] == 0?
The question is rather:
Should the STATIC_CHAIN_REGNUM be defined so that
CALL_USED_REGISTERS[STATIC_CHAIN_REGNUM] == 1? Or is it possible to make
nested functions work if CALL_USED_REGISTERS[STATIC_CHAIN_REGNUM] == 0?
Thanks
Aurélien
More information about the Gcc-help
mailing list