This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
nested function question
- From: Aurelien Buhrig <aurelien dot buhrig dot gcc at gmail dot com>
- To: gcc-help at gcc dot gnu dot org
- Date: Tue, 11 Sep 2012 10:59:32 +0200
- Subject: nested function question
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?
Thanks,
Aurélien