From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <5e246b21f0ebe437eb515c5b09217938.axp-list@archive.invalid> X-Archive-Original-Message-ID: <199705231315.JAA17827@cleon.cc.gatech.edu> Date: Fri, 23 May 1997 14:38:28 +0200 From: Claus Denk Subject: Re: g77 0.5.20 Alpha/ELF => compiles, wrong output Christopher J. Grayce wrote: > > I have reluctantly concluded that gcc 2.7.2.2 and (more importantly > for me) g77 0.5.20 do not work on Alpha/ELF -- is this true?? > > I can compile both without error by using the hack suggested by > sundiver@hellfire.dusers.drexel.edu in this list on 13 March 1997 (see > details below), but the resulting compilers do not produce correct > object code. This is obvious in the Fortran case: if the source > contains FORMAT statements or a write statement of the form > WRITE(6,FMT='("foo = ",i2)') INTEGER, then the object code gets a > SIGSEGV as soon as it reaches this statement. (Code that produces no > output to stdout may work correctly, however.) Hi, the following works with my g77 0.5.20/gcc 2.7.2.2 combination on RH4.0. (with and without the OPEN statement): PROGRAM MYTEST INTEGER IT IT=2 OPEN(UNIT=6,FILE="muss.txt") WRITE(6,FMT='("foo = ",i2)') IT END I essentially followed the same steps as you, but I also had to change /config/alpha/alpha.c #if !defined(CROSS_COMPILE) && !defined(_WIN32) #include #endif to: #if !defined(CROSS_COMPILE) && !defined(_WIN32) && !defined(__linux__) #include #endif But I don't know if this could make the difference. I use Kernel 2.0.29. PC164, IDE harddrive 128 MB Ram. regards, Claus Denk -- To unsubscribe: send e-mail to axp-list-request@redhat.com with 'unsubscribe' as the subject. Do not send it to axp-list@redhat.com