Bug 43476

Summary: -ffixed-xxx etc processed too early
Product: gcc Reporter: Richard Earnshaw <rearnsha>
Component: middle-endAssignee: Not yet assigned to anyone <unassigned>
Status: UNCONFIRMED ---    
Severity: normal CC: gcc-bugs
Priority: P3    
Version: 4.5.0   
Target Milestone: ---   
Host: Target:
Build: Known to work:
Known to fail: Last reconfirmed:

Description Richard Earnshaw 2010-03-22 11:42:29 UTC
-ffixed-xxx -fcall-used-xxx and -fcall-saved-xxx are processed before init_regs() is called, and that function calls CONDITIONAL_REGISTER_USAGE.  If that macro changes the registers available (for example, to generate an ABI variant), then it cannot tell whether or not a register's usage model has been changed on the command-line.

This manifests itself, for example, on ARM when -mfpu=vfpv3 -mfloat-abi=hard -fcall-used-s16 -fcall-used-s17 does change the callee-saved register set.

Not sure if this is a regression over older compilers.
Comment 1 joseph@codesourcery.com 2010-03-22 12:22:36 UTC
Subject: Re:   New: -ffixed-xxx etc processed too early

This has been around for years; when testing my iWMMXt unwind patch 
<http://gcc.gnu.org/ml/gcc-patches/2007-01/msg00049.html> I found it 
wasn't possible to test the handling of unwind info for call-clobbered 
registers using these options because of this bug.