home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.fortran
- Path: sparky!uunet!charon.amdahl.com!pacbell.com!decwrl!sun-barr!cs.utexas.edu!uwm.edu!caen!hellgate.utah.edu!lanl!cochiti.lanl.gov!jlg
- From: jlg@cochiti.lanl.gov (J. Giles)
- Subject: Re: Fortran to C issues?
- Message-ID: <1992Nov16.215607.25224@newshost.lanl.gov>
- Sender: news@newshost.lanl.gov
- Organization: Los Alamos National Laboratory
- References: <BxtKJL.2Ir@accelr8.com>
- Date: Mon, 16 Nov 1992 21:56:07 GMT
- Lines: 33
-
- In article <BxtKJL.2Ir@accelr8.com>, jim@accelr8.com (Jim Reiss) writes:
- |> In some computation-intensive environments there seems to be a general
- |> feeling that FORTRAN is much better than C for some tasks. I shudder to
- |> be asking this because rekindling the C/FORTRAN flame war is not what
- |> I want to do...but...is there a good basis for that opinion, and does that
- |> mean that FORTRAN to C translators like f2c and the NAG FORTRAN compiler
- |> are inherently inferior to a FORTRAN to machine language compiler? If so,
- |> please explain why. Please try to keep answers from degenerating into
- |> "so there" and religious style comments. Thank you.
-
- C fails to have any means of expressing the concept that two array
- arguments to a procedure are *not* aliased. This inherently inhibits
- optimization on *most* C implementations compared to native Fortran
- compilation. It is true that very modern, time consuming, experimental
- compilation techniques can overcome this difficulty (by eliminating
- separate compilation - so the compiler can analyze interprocedural
- relationships; by having the loader do the last phases of what's
- normally considered compilation - so the code generation can occur
- *after* an interprocedural analysis even *with* separate compilation;
- or by providing non-C extensions which permit the aliasing information
- to be expressed to the compiler). None of the Fortran to C translators
- you mention have any facilities - within themselves - to address this
- issue.
-
- Problems involving the translation of onn language to another are
- always a result of semantic content of one language's features
- not being *directly* representable (if at all) in the other language.
- There are other examples of this between Fortran and C, but probably
- none so important. I/O emulation is probably the worst problem other
- than aliasing - and I suspect it's a fairly distant second.
-
- --
- J. Giles
-