home *** CD-ROM | disk | FTP | other *** search
- Xref: sparky comp.lang.fortran:4281 comp.sys.hp:12794
- Newsgroups: comp.lang.fortran,comp.sys.hp
- 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
- From: mroussel@alchemy.chem.utoronto.ca (Marc Roussel)
- Subject: Re: Weird HP compiler warning
- Message-ID: <1992Nov11.183534.6668@alchemy.chem.utoronto.ca>
- Followup-To: comp.sys.hp
- Organization: Department of Chemistry, University of Toronto
- References: <1992Nov10.193635.2736@alchemy.chem.utoronto.ca> <1992Nov11.133205.4641@jyu.fi>
- Date: Wed, 11 Nov 1992 18:35:34 GMT
- Lines: 37
-
- In article <1992Nov11.133205.4641@jyu.fi> sakkinen@jyu.fi (Markku Sakkinen)
- writes:
- >In article <1992Nov10.193635.2736@alchemy.chem.utoronto.ca>
- >mroussel@alchemy.chem.utoronto.ca (Marc Roussel) writes:
- >> ...
- >> double precision h,nexth,err,d2fex
- >> h = 1.d0
- >> err = 10.d0
- >> d2fex = 123.d0
- >> nexth = min(h,sqrt(12.d0*err/d2fex))
- >> write(*,*)nexth
- >> END
- >>
- >>For this piece of code, the compiler produces the warning
- >>
- >>Warning on line 5 of weird.f: Argument has same name as INTRINSIC function
- >>
- >>Of course the argument has the same name as an intrinsic! The argument
- >>IS an intrinsic! [...]
- >
- >No, the argument is NOT an intrinsic, but the result returned
- >from the call of an intrinsic function.
- >Thus the compiler is really badly off the track.
-
- I agree with this comment; I was being careless with my wording. I
- have since discovered one additional and extremely puzzling clue: This
- warning is only generated with the -C compiler flag. (This flag
- generates code for subscript checking.) Why subscript checking should
- have anything to do with calling the sqrt() function and passing its
- result to min(), I have no idea.
-
- Marc R. Roussel
- mroussel@alchemy.chem.utoronto.ca
-
- P.S.: I have redirected all followups to comp.sys.hp. In retrospect,
- I'm not sure why I ever posted to comp.lang.fortran since it has
- been clear from the outset that this is an HP-specific problem.
-