home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / lang / fortran / 4281 < prev    next >
Encoding:
Internet Message Format  |  1992-11-11  |  2.1 KB

  1. Xref: sparky comp.lang.fortran:4281 comp.sys.hp:12794
  2. Newsgroups: comp.lang.fortran,comp.sys.hp
  3. Path: sparky!uunet!charon.amdahl.com!pacbell.com!ames!saimiri.primate.wisc.edu!zaphod.mps.ohio-state.edu!rpi!utcsri!helios.physics.utoronto.ca!alchemy.chem.utoronto.ca!mroussel
  4. From: mroussel@alchemy.chem.utoronto.ca (Marc Roussel)
  5. Subject: Re: Weird HP compiler warning
  6. Message-ID: <1992Nov11.183534.6668@alchemy.chem.utoronto.ca>
  7. Followup-To: comp.sys.hp
  8. Organization: Department of Chemistry, University of Toronto
  9. References: <1992Nov10.193635.2736@alchemy.chem.utoronto.ca> <1992Nov11.133205.4641@jyu.fi>
  10. Date: Wed, 11 Nov 1992 18:35:34 GMT
  11. Lines: 37
  12.  
  13. In article <1992Nov11.133205.4641@jyu.fi> sakkinen@jyu.fi (Markku Sakkinen)
  14. writes:
  15. >In article <1992Nov10.193635.2736@alchemy.chem.utoronto.ca>
  16. >mroussel@alchemy.chem.utoronto.ca (Marc Roussel) writes:
  17. >> ...
  18. >>      double precision h,nexth,err,d2fex
  19. >>      h = 1.d0
  20. >>      err = 10.d0
  21. >>      d2fex = 123.d0
  22. >>          nexth = min(h,sqrt(12.d0*err/d2fex))
  23. >>      write(*,*)nexth
  24. >>      END
  25. >>
  26. >>For this piece of code, the compiler produces the warning
  27. >>
  28. >>Warning on line 5 of weird.f: Argument has same name as INTRINSIC function
  29. >>
  30. >>Of course the argument has the same name as an intrinsic!  The argument
  31. >>IS an intrinsic!  [...]
  32. >
  33. >No, the argument is NOT an intrinsic, but the result returned
  34. >from the call of an intrinsic function.
  35. >Thus the compiler is really badly off the track.
  36.  
  37.      I agree with this comment; I was being careless with my wording.  I
  38. have since discovered one additional and extremely puzzling clue:  This
  39. warning is only generated with the -C compiler flag.  (This flag
  40. generates code for subscript checking.)  Why subscript checking should
  41. have anything to do with calling the sqrt() function and passing its
  42. result to min(), I have no idea.
  43.  
  44.                 Marc R. Roussel
  45.                                 mroussel@alchemy.chem.utoronto.ca
  46.  
  47. P.S.:  I have redirected all followups to comp.sys.hp.  In retrospect,
  48.        I'm not sure why I ever posted to comp.lang.fortran since it has
  49.        been clear from the outset that this is an HP-specific problem.
  50.