f2cl trouble with common block -- function make-<block name> undefined
Robert Dodier <[email protected]> Sun, 22 Jan 2006 11:01:49 -0700
| Newsgroups | gmane.lisp.clocc.general |
|---|---|
| Message-ID | <[email protected]> |
Hello,
I'm trying to translate a program which has a named common block.
I'm using current cvs version of f2cl with clisp 2.34.
A simple example which shows the problem is
PROGRAM FOO
INTEGER BAR
COMMON /MYCOMN/BAR
BAR=3D12345
WRITE(6,10)BAR
10 FORMAT('BAR IS ', I5)
RETURN
END
g77 compiles this program and when executed it yields BAR IS 12345.
I translate this with (f2cl::f2cl "tmp.f" :declare-common t)
(same problem with (f2cl::f2cl "tmp.f" :declare-common t :common-as-array t=
)
by the way). The translation is apparently successful.
However, (load "tmp.lisp") complains "undefined function
FORTRAN-TO-LISP::MAKE-MYCOMN".
I looked at f2cl5.lisp and it looks like the stuff in create-sym-macros-arr=
ay
is relevant in the :common-as-array case. However it appears that the
make-array at line 774 is never executed. I couldn't figure out anything el=
se.
I searched the clocc-list and clocc-devel archives and checked the
bug reports (open and closed) but I didn't see anything about this problem.
Hopefully there is something simple I'm overlooking. Thanks for your help.
Robert Dodier
PS. Here is the f2cl output of tmp.f:
;;; Compiled by f2cl version 2.0 beta Date: 2006/01/11 22:57:58
;;; Using Lisp CLISP 2.34 (2005-07-20) (built 3332957838) (memory 333907137=
5)
;;; Options: ((:prune-labels nil) (:auto-save t) (:relaxed-array-decls
t) (:coerce-assigns :as-needed)
;;; (:array-type ':array) (:array-slicing t) (:declare-common t)
(:float-format single-float))
(in-package :common-lisp-user)
(|COMMON-LISP|::|DEFSTRUCT|
(|FORTRAN-TO-LISP|::|MYCOMN| (:|PREDICATE| |FORTRAN-TO-LISP|::|IS-MYCOMN-P=
|))
(|FORTRAN-TO-LISP|::|PART-0|
(|COMMON-LISP|::|MAKE-ARRAY| 1. :|ELEMENT-TYPE| '|F2CL-LIB|::|INTEGER4|)
:|TYPE| (|COMMON-LISP|::|SIMPLE-ARRAY| |F2CL-LIB|::|INTEGER4| (1.))))
(|COMMON-LISP|::|LET*| |COMMON-LISP|::|NIL|
(|COMMON-LISP|::|DEFPARAMETER| |FORTRAN-TO-LISP|::|*MYCOMN-COMMON-BLOCK*|
(|FORTRAN-TO-LISP|::|MAKE-MYCOMN|)))
(|COMMON-LISP|::|DEFUN| |FORTRAN-TO-LISP|::|FOO| |COMMON-LISP|::|NIL|
(|COMMON-LISP|::|LET| |COMMON-LISP|::|NIL|
(|COMMON-LISP|::|SYMBOL-MACROLET|
((|FORTRAN-TO-LISP|::|BAR|
(|COMMON-LISP|::|AREF|
(|FORTRAN-TO-LISP|::|MYCOMN-PART-0|
|FORTRAN-TO-LISP|::|*MYCOMN-COMMON-BLOCK*|)
0.)))
(|F2CL-LIB|::|WITH-MULTI-ARRAY-DATA| |COMMON-LISP|::|NIL|
(|COMMON-LISP|::|PROG| |COMMON-LISP|::|NIL| (|COMMON-LISP|::|DECLARE|)
(|COMMON-LISP|::|SETF| |FORTRAN-TO-LISP|::|BAR| 12345.)
(|F2CL-LIB|::|FFORMAT| 6. ("BAR IS " 1. (("~5D")) "~%")
|FORTRAN-TO-LISP|::|BAR|)
(|COMMON-LISP|::|GO| |FORTRAN-TO-LISP|::|END_LABEL|)
|FORTRAN-TO-LISP|::|END_LABEL|
(|COMMON-LISP|::|RETURN| |COMMON-LISP|::|NIL|))))))
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642