home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / unix / aix / 8199 < prev    next >
Encoding:
Text File  |  1992-07-26  |  3.3 KB  |  86 lines

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