Re: f77 on SUN vs. on HPRISC'S (Hans Adams)
Wed, 14 Dec 1994 01:22:19 GMT

          From comp.compilers

Related articles
f77 on SUN vs. on HPRISC'S (1994-12-03)
Re: f77 on SUN vs. on HPRISC'S (1994-12-05)
Re: f77 on Sun vs. on HPRISC's (1994-12-07)
Re: f77 on SUN vs. on HPRISC'S (1994-12-14)
Re: f77 on Sun vs. on HPRISC's (1994-12-16)
Re: f77 on Sun vs. on HPRISC's (1994-12-21)
| List of all articles for this month |

Newsgroups: comp.compilers,comp.lang.fortran
From: (Hans Adams)
Keywords: Fortran
Organization: TH-Darmstadt
References: 94-12-034
Date: Wed, 14 Dec 1994 01:22:19 GMT (Milind Khire) writes:

> Hello Everybody:
> I have a FORTRAN code originally written for VAX-VMS, but it is
> compatible with SUN UNIX. But if I try to run it on HPRISC's it compiles
> fine but gives me completely garbage numbers in output. If anyone
> knows what are the exact differences in FORTRAN (f77) compilers or
> systems for SUN and HPRISC, I would really appreciate your advice to
> resolve this problem.

HP-UX F77 seems to be a strange mixture of Fortran 90 and Fortran 77.

Storage handling seems rather different to other f77 compilers,
IEEE-floating point will be enabled by a linker (!) switch ....
But first of all, some compiler switches regarded "useful":

Paraphrased from the manual :

  +E7 : use static storage to save addresses of arguments
              to be passed to functions and subroutines

  +K : "Forces static storage for all local variables.
This provides a convenient path for importing [!]
FORTRAN 66 and FORTRAN 77 programs ...."

  -C: bounds check !!!

  +FPVZOU: trap on ivalid fp ops, divide by zero, overflow, underflow

But, let's have a lopok at two programs, exposing strange behaviour

This program was taken from a test lib.
c program to test bug
C Expression in brackets should be evaluated first,
C no overflow / cutoff should occur.
            print *, fred,george

C by Prof. Spellucci
            double precision a(1000),maxa,mina
            integer i,n
            write(*,*) 'eingabe n='
            read(*,*) n
            do i=1,n
            do i=1,n
            write(*,*) 'test:',maxa,mina,(a(i),i=1,n)
C... compile: f77 -oexe +OP3 file.f

Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.