[comp.sys.sgi] FORTRAN, format statement with -O2 option

DEMOVMS@pavo.concordia.ca (Concordia University Computing Services) (11/24/90)

     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@cfdws5.concordia.ca or sotbill@vax2.concordia.ca
tel (514)848-3138