#719 closed defect (fixed)

m68kpretaskinghook.c vs if ((unsigned long)&pointer == 0)

Reported by: Aaron J. Grier Owned by: Joel Sherrill
Priority: normal Milestone: 2
Component: bsps Version: 4.5
Severity: major Keywords:
Cc: bugs@… Blocked By:
Blocking:

Description

the optimizer on gcc 3.4.2 assumes that the address of a variable can't be 0, so it optimizes out any such checks. this breaks the shared m68k bsp_pretasking_hook() which uses such a check to determine heap size during runtime.

Release:
4.5.0

Environment:
binutils-2.15
gcc-3.4.2 (patched by peter barada for coldfire)
newlib-1.12.0
rtems-4.5.0
custom Frye 68k BSP, using shared m68kpretaskinghook.c .

toolchain hosted on NetBSD 2.0

How-To-Repeat:
compile BSPs using m68k/shared/m68kpretaskinghook.c with gcc 3.4.2; set _HeapSize=0 during linking to auto-size heap during runtime.

Attachments (1)

diff.out (795 bytes) - added by Aaron J. Grier on Dec 3, 2006 at 1:31:12 PM.
diff.out

Download all attachments as: .zip

Change History (2)

comment:1 Changed on Mar 7, 2006 at 8:56:50 PM by Joel Sherrill

Status: assignedclosed

State-Changed-From-To: open->closed
State-Changed-Why: Patch applied to trunk. Trunk only way tools this new are
supported.

Changed on Dec 3, 2006 at 1:31:12 PM by Aaron J. Grier

Attachment: diff.out added

diff.out

Note: See TracTickets for help on using tickets.