[comp.lang.fortran] Sun Fortran 1.3 Compiler Problem with -Bstatic

proicou@NPBSUN.AFWL.AF.MIL (Mike Proicou) (04/06/91)

There appears to be a bug with Sun Fortran 1.3 and SunOS 4.1.
The problem causes several multiply defined library symbols.

The bug requires an read statement with a * format and linking
with the -Bstatic option.  Either dropping the -Bstatic option,
or using an explicit format statement will allow the program to
compile.

I've attached a 3 line demo program that shows what I'm trying
to describe.


Has anyone else seen this?

Mike Proicou
proicou@npbsun.afwl.af.mil

Script started on Fri Apr  5 15:44:21 1991
proicou@ttyp4 (1) |cat bug.f
      program arr2d
  10  read(5,*) x,y,z
      end
proicou@ttyp4 (2) |f77 -Bstatic bug.f
bug.f:
 MAIN arr2d:
ld: /lib/libc.a(_unpack_dble.o): __class_quadruple: multiply defined
/lib/libc.a(_unpack_dble.o): __class_double: multiply defined
/lib/libc.a(_unpack_dble.o): __fp_normalize: multiply defined
/lib/libc.a(_unpack_dble.o): __fp_leftshift: multiply defined
/lib/libc.a(_unpack_dble.o): __fp_set_exception: multiply defined
/lib/libc.a(_unpack_dble.o): __unpack_double: multiply defined
proicou@ttyp4 (3) |cat nobug.f
      program arr2d
  10  read(5,6) x,y,z
   6  format(3f12.9)
      end
proicou@ttyp4 (4) |f77 -Bstatic nobug.f
nobug.f:
 MAIN arr2d:
proicou@ttyp4 (5) |f77 bug.f
bug.f:
 MAIN arr2d:
proicou@ttyp4 (6) |^D
script done on Fri Apr  5 15:47:31 1991