FORTRAN, format statement with -O2 option

Concordia University Computing Services DEMOVMS at pavo.concordia.ca
Sat Nov 24 15:20:33 AEST 1990


     I have the following problem with the fortran compiler.
with a piece of code that looks like this :

      I1 = 10
      I2 = 4
      R1 = 23.4575
      WRITE(1,1000) R1

 1000 FORMAT('R1 = ',F<I1>.<I2>,' WHATEVER')

    When I have this inside a program, and complile with 'f77 -O2'
At execution I get a 'Segmentation fault' (or a bus error if the
output is a variable). Without the '-O2' option the program runs fine.
Has anybody got a similar error, and what can be done about it other
than not using the optimization option.

Richard Lefebvre
email rick at cfdws5.concordia.ca or sotbill at vax2.concordia.ca
tel (514)848-3138



More information about the Comp.sys.sgi mailing list