#748 closed defect (fixed)
gcc-3.4.x optimization breaks m68kpretaskinghook.c
Reported by: | Eric Norum | Owned by: | Joel Sherrill |
---|---|---|---|
Priority: | normal | Milestone: | 2 |
Component: | arch/m68k | Version: | unknown |
Severity: | major | Keywords: | |
Cc: | bugs@… | Blocked By: | |
Blocking: |
Description
m68kpretaskinghook.c gets the value of _HeapSize from the link editor:
unsigned long heapSize = (unsigned long)&_HeapSize;
then later on does:
if (heapSize == 0)
heapSize = ramSpace;
else if (heapSize > ramSpace)
The problem is that the compiler "knows" that no object can have an address of 0 and hence optimizes away the "if (heapSize == 0)" branch (!!!)
Release:
unknown
Attachments (1)
Change History (3)
comment:1 Changed on 03/07/06 at 21:16:43 by Joel Sherrill
Status: | assigned → closed |
---|
comment:2 Changed on 10/10/17 at 06:36:54 by Sebastian Huber
Component: | patch - do not use → arch/m68k |
---|
Note: See
TracTickets for help on using
tickets.
State-Changed-From-To: open->closed
State-Changed-Why: An alternative patch was applied. I recall discussion
without a conclusion. if this patch is better, revert the
one I applied and use this one. I trust the opinion of
others on this.