Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!samsung!xylogics!world!burley From: burley@world.std.com (James C Burley) Newsgroups: comp.lang.fortran Subject: Re: GNU Fortran: Help, Anyone? Message-ID: Date: 19 Jul 90 02:34:12 GMT References: <1990Jul17.165053.2336@mtcchi.uucp> Sender: burley@world.std.com (James C Burley) Distribution: comp Organization: The World Lines: 43 In-Reply-To: levy@mtcchi.uucp's message of 17 Jul 90 16:50:53 GMT In article <1990Jul17.165053.2336@mtcchi.uucp> levy@mtcchi.uucp (2656-Daniel R. Levy(0000000)0000) writes: burley@world.std.com (James C Burley) writes: >Hi. I'm working on GNU Fortran. In particular, the front end; the idea >being that, once I finish it, we "simply" attach it to GCC (the GNU C >compiler) and "just" write a run-time library and out pops a free Fortran >compiler. How about starting with, or at least going for link compatibility with, AT&T's _freeware_ f2c converter/compiler? There is lots of room to expand their good but rather basic standard library and plain Fortran-77 capability. You could add Fortran-90 features, VMS-style goodies, and more to that platform, and it feeds just about any K&R or ANSI C compiler. Looks like I wasn't clear in my original posting: I'm not writing a Fortran- to-C converter, but an actual Fortran compiler front end that will replace the C front end in a copy of the GNU C compiler to make a GNU Fortran compiler. That is, the output of the GNU Fortran compiler will be assembly code; there won't be an intermediate "C code" phase. The reason for this is that FSF wishes to ship a serious compiler that achieves high benchmark performance. No matter how good the translation to C, some Fortran benchmarks will perform poorly when compiled by a C compiler because Fortran makes guarantees to the optimizer that C does not, especially in areas like array handling. Whether FSF will end up shipping both a true F77 (and later F90) compiler AND a corresponding Fortran-to-C translator is yet to be seen. But the current priority is to make a real compiler, not a transformer. By the way, in one of the C newsgroups, there was a posting asking for a free C++ -to- C converter saying that GNU C++ wasn't good because its output was assembly code, not C. And someone responded saying somebody developed a GNU compiler back-end driver file that generated C code instead of assembly, and this might do the trick. If that's true, perhaps a Fortran-to-C translator might naturally fall out of the GNU Fortran effort. But I wouldn't expect it to have the high quality output of the various (expensive) Fortran-to-C translators on the market. (For example, one of these translators -- I forget which -- can actually translate complex expressions into C++ using overloaded operators and a complex class built by the translator! Pretty neat if you're looking for the ultimate in Fortran-to-C maintainability.)