Opened 8 years ago

Closed 8 years ago

#1037 closed defect (fixed)

compiler mishandles prog1 with sufficient optimization

Reported by: matt.kaufmann Owned by:
Priority: blocker Milestone:
Component: Compiler Version: trunk
Keywords: prog1 Cc:


It appears that sometimes (prog1 x y) returns y. I've attached a file where CCL returns an incorrect value, perhaps for that reason. Version/platform info is in that file, but here it is:

1.9-dev-r15527M-trunk  (LinuxX8664)

[and from uname -a:]

Linux sloth 2.6.32-45-server #100-Ubuntu SMP Wed Nov 14 11:02:27 UTC 2012 x86_64 GNU/Linux

As explained in the attached file, I didn't have this problem on a Mac for a slightly older CCL version.

Attachments (1)

ccl-bug.lisp (1.4 KB) - added by matt.kaufmann 8 years ago.

Download all attachments as: .zip

Change History (3)

Changed 8 years ago by matt.kaufmann

comment:1 Changed 8 years ago by matt.kaufmann

I should add that the same error occurs if prog1 is replaced by multiple-value-prog1. In fact, the latter is what I had originally before simplifying down to a small example.

comment:2 Changed 8 years ago by gb

  • Resolution set to fixed
  • Status changed from new to closed

(In [15542]) When "eliding pushes", if the pushed and popped registers are disjoint and the popped register is set in the intervening sequence but the pushed register isn't we need to generate a COPY of the pushed reg to the popped reg at the point of the POP.

The x86 backend got this wrong in both the FPR and GPR cases; the ARM got this right in the GPR case but missed an FPR case.

Fixes ticket:1037 in the trunk; the bug is about a year old, but the code in question has only been used for PROG1 in the trunk for the last week or so.

Note: See TracTickets for help on using tickets.