[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference turris::fortran

Title:Digital Fortran
Notice:Read notes 1.* for important information
Moderator:QUARK::LIONEL
Created:Thu Jun 01 1995
Last Modified:Fri Jun 06 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:1333
Total number of notes:6734

1206.0. "optimizer -- memory access violation" by HYDRA::KENYON (The Foundation of Science...Fiction) Fri Feb 28 1997 12:16

    The code in the next reply demonstrates an optimizer bug with a
    partners application.  We are running:
    
    DFABASE410           installed  Digital Fortran 77 V4.1 for Digital
    DFARTL374            installed  Digital Fortran RTL #374 for Digital
    
    The error is:

f77 -O5 -v -c abc.f
/usr/lib/cmplrs/fort/decfort -O5 -switch fe_platinum -o abc.o abc.f
fort: Fatal: A memory access violation (bus error or segmentation fault)
has occurred.  Please submit a problem report.
    
    Thanks,
    
    -jeff

T.RTitleUserPersonal
Name
DateLines
1206.1reproducer...HYDRA::KENYONThe Foundation of Science...FictionFri Feb 28 1997 12:1958
C -------------------- abc.f ---------------------------
C f77 V4.0 "-O5" bug on Digital Unix V4.0b
C
C To reproduce the problem:
C % f77 -O5 -v -c abc.f
C /usr/lib/cmplrs/fort/decfort -O5 -switch fe_platinum -o abc.o abc.f
C fort: Fatal: A memory access violation (bus error or segmentation fault)
C has occurred.  Please submit a problem report.
C

      logical function abc()
      logical s1,f2,flag
      integer i
      abc=.TRUE.
      flag=.TRUE.
  100 if(flag)goto 101
      if(flag)goto 102
      abc=.FALSE.
      goto 101
  102 s1=.TRUE.
      if(flag)goto 104
      do 106 i=1,4 
  106 continue
      goto 105
  104 continue
      do 108 i=1,4 
  108 continue
  105 continue
      if(flag)goto 110
      goto 111
  110 continue
      if(flag)goto 112
      goto 115
  112 continue
      if(flag)goto 114
      goto 115
  114 continue
      if(flag)goto 116
  116 continue
  115 continue
  111 continue
      if(flag)goto 118
      call def()
      goto 119
  118 continue
      call def()
  119 continue
      goto 100
  101 continue
      return
      end
C
      subroutine def()
      integer i
      do 120 i=1,4
  120 continue
      return
      end
1206.2FixedTLE::EKLUNDAlways smiling on the inside!Fri Feb 28 1997 14:3514
    	I could reproduce this problem readily.  It seems to
    have been fixed (late January), for our compilers since
    that time do not exhibit the bug.  Dropping the optimization
    level to 4 (or lower) seems to avoid the problem in the
    meantime.
    
    Cheers!
    Dave Eklund
    
    PS As always, thanks for the simple example and the
    command line!  Makes things ever so much easier!
    
    Dave E
    
1206.3next release...HYDRA::KENYONThe Foundation of Science...FictionMon Mar 03 1997 10:479
    Dave,
    
    When is the next bump for the compiler where we can have TMA build with
    -O5?  The partner requires a homogeneous build environment, so we are
    using -O4 exclusively for now, and want to test/recommend -O5.
    
    Note that Robert Shen has opened OSF_QAR 51789 -- please close ;-)
    
    -jeff
1206.4QUARK::LIONELFree advice is worth every centMon Mar 03 1997 12:406
Our current plan is to do an "ECO kit" for at least the UNIX platform, and
maybe VMS (more to keep things the same out there) in late March or early
April, but this is subject to change based on whether or not we want to wait
for a particular bug fix.

					Steve