From: SourceForge.net <no...@so...> - 2004-11-12 21:42:22
|
Bugs item #1065458, was opened at 2004-11-13 00:42 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=100599&aid=1065458&group_id=599 Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: Stas Sergeev (stsp) Assigned to: Nobody/Anonymous (nobody) Summary: mishandling of "short" return value Initial Comment: Hi. This bug was recently introduced in CVS. The following code (attached): --- unsigned short f() { return 0xff00; } unsigned short main() { return f() ? 1 : 0; } --- returns 0 instead of 1. The asm code at fault is this: --- lcall _f mov a,dpl ; genIfx ; Peephole 105 removed redundant mov ; Peephole 177.c removed redundant move mov b,a <---- BUG orl a,b --- ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=100599&aid=1065458&group_id=599 |