home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.unix.aix
- Path: sparky!uunet!cis.ohio-state.edu!magnus.acs.ohio-state.edu!usenet.ins.cwru.edu!eagle!eagle!ron
- From: ron@sarah.lerc.nasa.gov (Ron Gaug)
- Subject: xlf -qextchk
- Message-ID: <1992Jul27.043657.22336@eagle.lerc.nasa.gov>
- Lines: 72
- Sender: news@eagle.lerc.nasa.gov
- Reply-To: ron@sarah.lerc.nasa.gov
- Organization: Computational Materials Laboratory, NASA Lewis Research Center
- X-Newsreader: GNU Emacs 18.58.2, GNUS 3.14.1, NNTP 3.10
- Date: Mon, 27 Jul 1992 04:36:57 GMT
- Lines: 72
-
- Hello
-
- Does anyone know how to get some useful diagnostics from the xlf compiler's
- extchk option? Here's an excerpt from the xlf manual page:
-
- extchk Perform procedure interface checking as well as
- detection of mismatched common blocks.
-
- Consider the following intentionally non-error free fortran 77 program:
-
- [hilbert]:512% cat extchk_bug.f
- double precision function foo(bar)
- integer bar
- foo = bar * 42
- return
- end
- program xyzzy
- C foo should be declared as double precision
- C arg should be 69 (integer) not 69.0
- write(*, *) foo(69.0)
- stop
- end
-
- Using the following version of the xlf compiler:
- [hilbert]:513% lslpp -h xlfcmp.obj
- Option Name State Event Date Release User Name
- -------------------- ---------- ---------- --------- --------------- ----------
- xlfcmp.obj ACTIVE COMMIT 12/19/91 02.02.0000.0000 root
-
- Now, let's compile:
-
- [hilbert]:514% xlf -v -qextchk -qsource extchk_bug.f
- exec: /usr/lpp/xlf/bin/xlfentry(xlfentry,extchk_bug.f,/tmp/F8FNsCkR,extchk_bug.lst,xlfsmsg.cat,xlfmsg.cat,EXTCHK,SOURCE,NULL)
- ** foo === End of Compilation 1 ===
- ** xyzzy === End of Compilation 2 ===
- 1501-510 Compilation successful for file extchk_bug.f.
- 0706-316 Error: Type mismatches detected. References dumped to load map.
- unlink: /tmp/F8FNsCkR0
- unlink: /tmp/F8FNsCkR1
- unlink: /tmp/F8FNsCkR
-
- [hilbert]:515% ls -l
- total 24
- drwxr-xr-x 2 ron faculty 512 Jul 25 21:10 ./
- drwxrwxrwt 7 bin bin 8192 Jul 25 21:10 ../
- -rw-r--r-- 1 ron faculty 259 Jul 25 20:31 extchk_bug.f
- -rw-r--r-- 1 ron faculty 4296 Jul 25 21:10 extchk_bug.lst
-
- [hilbert]:516% tail -2 extchk_bug.lst
- 1501-510 Compilation successful for file extchk_bug.f.
- 1501-543 Object file created.
-
- Trust me, there were no diagnostics relating to the extchk option in the
- listing file. So let's review the facts.
- The compilation was successful and an object file was created.
- [It actually did create an object file, then promplty deleted it. :-) ]
- And the references to the type mismatches that were detected were dumped
- to the load map. Now if I could just get a load map. :-) And where's my a.out?
- If only /bin/ld had been executed, it might have been possible.
-
- So, can anyone give me some hints?
- Newer version of compiler?
- Just add the -qxyzzy option?
-
- Ron Gaug ron@sarah.lerc.nasa.gov
- N.A.S.A. Lewis Research Center
- Computational Materials Laboratory
- Cleveland, OH 44135
-
- P.S.: I originally tried this on a several thousand line file of
- code. The compiler eventually complained about deceased bovine. :-)
- So, I decided to try it on a small controlled test case.
-