-fPIC -Os generates redundant stack frame
Bug #1927055 reported by
Ralph Mimms
This bug affects 2 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
GNU Arm Embedded Toolchain |
New
|
Undecided
|
Unassigned |
Bug Description
example: https:/
gcc versions after 4 (>= 5) generate a redundant stack frame as can be seen in the attached example, while gcc version 4 generates correct code that is also minimal in size as requested (-Os).
The code generation in newer gcc versions is strange even without thinking about the -Os, since the generates stack frame is not even used, and the whole 3 instructions (sub sp, str, add sp) are totally not needed (the variable on the stack is not used).
To post a comment you must log in.