From: Ralph P. Sobek
Subject: Bug in Lucid Lisp 4.0.2: Develop. Compilation of Foreign Function Call
Date: 
Message-ID: <RALPH.91Nov14123927@orion.laas.fr>
	I have tried to send the following directly to Sun, but the
host Eng.Sun.COM has become unknown

	Having moved up from Lisp 4.0 to Lisp 4.0.2, there seems to be
a problem with the development compiler as applied to foreign
functions.  I am sure that a patch must already exist!  A simple
example follows:

C program:

double c_testbuglisp(v)
double v;
{
    return(v);
}

Lisp program:

(in-package 'user)

(eval-when (load eval compile) 
  (load-foreign-files 
   '("test.o")
   '("-lc")))

(def-foreign-function (TestBugLisp (:name "_c_testbuglisp")
				    (:language :c)
				    (:return-type :double-float))
  (v :double-float))

There is absolutely no problem if the source file is loaded, or the
production compiled .sbin file.  On the other hand, loading a
development compiled .sbin file produces the following:

	>>Error: The function LUCID::SET-%PTR_REF_FLOAT is undefined

	UNDEFINED_FUNCTION:
	:C 0: Try evaluating #'lucid::set-%ptr-ref-float
	...

The production mode used was:
;;; You are using the compiler in production mode (compilation-speed = 0)
;;; If you want shorter compile time at the expense of reduced optimization,
;;; you should use the development mode of the compiler, which can be obtained
;;; by evaluating (proclaim '(optimize (compilation-speed 3)))
;;; Generation of runtime error checking code is disabled (safety = 0)
;;; Optimization of tail calls is enabled (speed = 3)

The development mode used was:;;; You are using the compiler in development mode (compilation-speed = 3)
;;; If you want faster code at the expense of longer compile time,
;;; you should use the production mode of the compiler, which can be obtained
;;; by evaluating (proclaim '(optimize (compilation-speed 0)))
;;; Generation of full safety checking code is enabled (safety = 3)
;;; Generation of inline code is disabled (speed = 0)

So, does a patch already exist?  Thanks in advance.

Ralph P. Sobek			  Disclaimer: The above ruminations are my own.
·····@laas.fr				   Addresses are ordered by importance.
·····@laas.uucp, or ...!uunet!laas!ralph		
If all else fails, try:				      ·····@eclair.Berkeley.EDU
Telephone: (+33-)61-33-62-66  FAX-1: (+33-)61-33-64-55 FAX-2: (+33-)61-55-35-77
--
Ralph P. Sobek			  Disclaimer: The above ruminations are my own.
·····@laas.fr				   Addresses are ordered by importance.
·····@laas.uucp, or ...!uunet!laas!ralph		
If all else fails, try:				      ·····@eclair.Berkeley.EDU
Telephone: (+33-)61-33-62-66  FAX-1: (+33-)61-33-64-55 FAX-2: (+33-)61-55-35-77
===============================================================================
THINK: Due to IMF & World Bank policies 100 million Latin American children are
living, eating, and sleeping in the streets -- Le Monde Diplomatique