This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: libgfortran array descriptor interface


Paul Richard Thomas wrote:
I'm actually writing a compiler for a subset of Fortran, to C++; so
there's no escape :)
I'm curious, did you think about using gfortran's frontend and then
translating the intermediate gfc_code / gfc_namespace / gfc_symbol
representation into C++ instead of gcc's tree structure as we do?

Tobi, I have often though that this would make a magnificent project for an SoC intern, although it would be better to translate to C, rather than C++. That said, f2c direct to f2k2c???

Hi Paul,


I once asked the Ada guys if it would be possible to do a GNAT-internal tree translation to C as to gain a minimal C-to-Ada compiler. My intent with that was the idea that we could provide C sources for GNAT that way and would no longer need a working Ada compiler to bootstrap Ada.

They meant that would be hard a job, but from what I know about gfortran's internals, it should be doable. Another idea could be to do a new gcc-backend producing C-code instead of assembler (either by using the backend machinery and hijacking it (if possible), or by using the final RTL/Gimple structure to generate code from it). That would have the benefit of being language independent, and could allow C++ to C or Ada to C as well :)

In any case, that's also quite a nice idea... Although it is probably not that useful compared to other things one could do ;) But maybe as a GCC-general SoC project :D I may have been interested in that if it would have been proposed last year.

Cheers,
Daniel

--
Done:  Arc-Bar-Cav-Rog-Sam-Val-Wiz
To go: Hea-Kni-Mon-Pri-Ran-Tou


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]