SUMMARY: fortran compatibility with 4.0G

From: SSridhar <ssridhar_at_raven.pnu.com>
Date: Wed, 27 Jun 2001 16:03:48 -0400

Original question:

we recently upgraded our Alpha8400 from 4.0E to 4.0G. I also installed
the latest version of f77 (that came with 5.1 disks) after making sure
it was backward compatible. most programs run fine but one didn't - it
worked fine in 4.0E but now creates segmentation fault error. Also a
code that is a mix of fortran and c (f77 calling c code) after
recompilation creates error:
forrtl: severe (174): SIGSEGV, segmentation fault occurred
   0: _call_remove_gp_range [0x3ff81a6c374]
   1: _call_remove_gp_range [0x3ff81a74a00]
   2: _call_remove_gp_range [0x3ff800d9040]
   3: _call_remove_gp_range [0x3ff800da648]
   4: aacomp_ [0x120003398]
   5: main$cell_ [cell.f: 59, 0x120002424]
   6: main [for_main.c: 203, 0x120003c54]
   7: __start [0x120001ff8]

But if I run same code, compiled on older version of OS, on the 4.0G
system it works.
-------------------------------------------------------------------------

I was passing a filename as charcter string from fortran to c. I had
inserted a "\0" as last character in the string before passing. This was
fine in 5.2.0 and prior compilers but in 5.4A it adds a "\" at the end
of filename. Since such a file doesn't exist, the pointer is a null
pointer and that led to the crash. Now I use the statement

filename(i:i) = char(0)

where i is the position of first blank after end of string and this
works. I used dbx to figure this out.

thanks to the following people for their responses:

        "Dr. Thomas.Blinn_at_Compaq.com" <tpb_at_doctor.zk3.dec.com>
        "Dyer, Steve J." <Steve.Dyer_at_alcoa.com>
         system administration account <sysadmin_at_astro.su.se>
        Serguei Patchkovskii <patchkov_at_ucalgary.ca>

Sridhar
Received on Wed Jun 27 2001 - 20:04:42 NZST

This archive was generated by hypermail 2.4.0 : Wed Nov 08 2023 - 11:53:42 NZDT