% PSL 3.2 has a bug in its compiler for the 68k involving taking the
% CDR of nil, which results in a segmentation violation. Compile the
% code below as follows:
%
% reduce  (or use psl directly)
% FASLOUT "CARTEST";
% IN CARTEST;
% FASLEND;
% LOAD CARTEST;
%
% call the function from lisp with 'nil for an argument. If the compiler
% has a problem, one should see something like:
%
% LISP TST('());
% CAR (U) NIL
% CDR (U) #<Unbound:A6>
% CADR (U) 
% ***** Segmentation violation
%
% This function works correctly when interpreted.
%
% If the code does work properly when compiled, then you can run the se
% script on all the .red files to fix the occurances of MYCAR, MYCDR etc
% which exist in the REDTEN source code; also remove the load of fix.b
% from sys.gen. This probably will not make much of a difference in the
% system running time.


SYMBOLIC PROCEDURE TST (U);
BEGIN;
  WRITE "CAR (U) ", CAR (U), !$EOL!$;
  WRITE "CDR (U) ", CDR (U), !$EOL!$;
  WRITE "CADR (U) ", CADR (U), !$EOL!$;
  WRITE "CDAR (U) ", CDAR (U), !$EOL!$;
  WRITE "CAAR (U) ", CAAR (U), !$EOL!$;
  WRITE "CDDR (U) ", CDDR (U), !$EOL!$;
END;

;END;
