[LLVMbugs] [Bug 596] NEW: C Backend generates negation of negative integers as predecrement

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Thu Jul 14 12:36:11 PDT 2005


http://llvm.cs.uiuc.edu/bugs/show_bug.cgi?id=596

           Summary: C Backend generates negation of negative integers as
                    predecrement
           Product: libraries
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Backend: C
        AssignedTo: criswell at uiuc.edu
        ReportedBy: criswell at uiuc.edu


The C Backend takes the (soon to be) attached test case and miscompiles it into
invalid C code.

Specifically, in the case where a negative integer is negated, the C Backend
generates a minus for the negation and then another minus for the integer.  This
"minus minus" becomes the C pre-decrement operator, which is incorrect.

i.e. we generate --65535 instead of -(-65535).



------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.




More information about the llvm-bugs mailing list