Skip to content
Snippets Groups Projects
Forked from cmucl / cmucl
Source project has a limited visibility.
  • rtoy's avatar
    529a9ff2
    This function from the misc.492 test from ansi-tests: · 529a9ff2
    rtoy authored
    (defun fn-492 (r p1)
      (declare (optimize speed (safety 1))
    	   (type (simple-array (signed-byte 8) nil) r) (type (integer * 22050378) p1))
      (setf (aref r) (lognand (the (integer 19464371) p1) 2257))
      (values))
    
    confuses the compiler and causes (values) to be deleted, and also
    deletes the return from the function so we just run past the end into
    junk.
    
    I think it's caused by confusion in type derivation.  I changed the
    defoptimizer for %aset so it returns the specialized element-type of
    the array instead of the new-value.
    
    This is a workaround, not a solution.
    529a9ff2
    History
    This function from the misc.492 test from ansi-tests:
    rtoy authored
    (defun fn-492 (r p1)
      (declare (optimize speed (safety 1))
    	   (type (simple-array (signed-byte 8) nil) r) (type (integer * 22050378) p1))
      (setf (aref r) (lognand (the (integer 19464371) p1) 2257))
      (values))
    
    confuses the compiler and causes (values) to be deleted, and also
    deletes the return from the function so we just run past the end into
    junk.
    
    I think it's caused by confusion in type derivation.  I changed the
    defoptimizer for %aset so it returns the specialized element-type of
    the array instead of the new-value.
    
    This is a workaround, not a solution.