Opened 11 years ago

Closed 11 years ago

#373 closed defect (fixed)

x86 ports: invalid numerical comparisons

Reported by: emarsden Owned by: gb
Priority: normal Milestone:
Component: Compiler Version: trunk
Keywords: Cc:

Description

Incorrect code seems to be generated for comparisons with a bignum.

Welcome to Clozure Common Lisp Version 1.3-dev-r11281M  (LinuxX8632)!
? (defun tax (income)
    (declare (type (integer 0 1000000) income))
    (if (> income 1000000000) 1 0))
TAX
? (tax 10)
1

Change History (3)

comment:1 Changed 11 years ago by rme

  • Milestone IA-32 port deleted
  • Summary changed from IA32 port: invalid numerical comparisons to x86 ports: invalid numerical comparisons

The x86-64 lisp also exhibits the error in similar circumstances:

Welcome to Clozure Common Lisp Version 1.3-dev-r11173M-trunk  (DarwinX8664)!
? (defun tax (income)
    (declare (type (integer 0 1000000) income))
    (if (> income (1+ most-positive-fixnum)) 1 0))
TAX
? (tax 10)
1

comment:2 Changed 11 years ago by gb

  • Status changed from new to assigned

In the x8632-case, aside form getting the sense of the comparison wrong it marks a register as immediate and only unmarks it on one arm of the conditional.

comment:3 Changed 11 years ago by rme

  • Resolution set to fixed
  • Status changed from assigned to closed
Note: See TracTickets for help on using tickets.