Having poked further, I find this in the testsuite:
pr11001-strlen-2.c
--begin
register int regvar asm("%eax");
char *
do_copy (char *str)
{
return malloc (strlen (str) + 1);
}
--end
Is that even meaningful? The doc's for a global reg var say:
'Choose a register that is normally saved and restored by function calls on your
machine, so that library routines will not clobber it.'
If one never made calls to a library unaware of the reg's global use, things
would be ok. Except if one chose a register that is used by the ABI to return
things, or by the pro/epilogue code as a scratch register.
Should attempts to use a call_used reg as a global reg var generate an error?
Should it stop it being marked as a fixed_reg?
nathan