Ticket #1037 (closed defect: fixed)

Opened 23 months ago

Last modified 23 months ago

compiler mishandles prog1 with sufficient optimization

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

Description

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

ccl-bug.lisp Download (1.4 KB) - added by matt.kaufmann 23 months ago.

Change History

Changed 23 months ago by matt.kaufmann

comment:1 Changed 23 months 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 23 months ago by gb

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

(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.