[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

1281.0. "Pointer Array Problem" by DESTES::ESTES (Dave Estes DTN 339-5224) Fri May 02 1997 11:09

I have received the following problem from one of our customers (I deleted the various
forwards).

I suspect it is a similar problem to note 1167 but wanted to make sure.  If it is, how
do I get them a newer rev of the compiler (i.e. is it on the later CD, etc)?

Thanks

Dave

___________________________________________

From: [email protected] (David Gill)
Date: Thu, 20 Mar 1997 20:41:09 GMT
To: [email protected], [email protected]
Subject: compiler probs

Paul,

We have found an inconsistency in the DEC compiler between releases.
The "old" (which is as descriptive as it gets from some users)
version worked fine.  The "new" one is broken.  Here "new" is
defined as 
      OSF1 V4.0 564 (from uname -a)
and from the f77 -what there is: 
      Digital Fortran 77 Driver V4.1-6
      Digital Fortran 77 V4.1-92-33BL

What seems to be the problem is reading data into an array 
that is dimensioned through a pointer assignment.  Writing
data out is suspect.  Allocating space and computing with
it seems to be fine.

Below is a simple example that fails on the above mentioned
machine.  Would you forward this on to whom it is 
appropriate.  This is a pretty huge problem for MM5, as
everything is pointer jazz.  This works on the other 
architectures that we tried.

Dave
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

      program pntprobs
      call pntwrite (5,5)
      call pntread  (5,5)
      stop 99999
      end

      subroutine pntwrite(ix,jx)
      parameter (MIX=10,MJX=10)
      dimension big(mix,mjx)
      pointer (ismall,small(ix,jx))
      ismall=loc(big(1,1))
      do j=1,jx
      do i=1,ix
         small(i,j)=i+(j-1)*ix
      enddo
      enddo
      print *,'small=',small
      write (9) small
      close(9)
      print *,'wrote out array, should be 1 through ',ix*jx
      return
      end

      subroutine pntread (ix,jx)
      parameter (MIX=10,MJX=10)
      dimension big(mix,mjx)
      pointer (ismall,small(ix,jx))
      ismall=loc(big(1,1))
      read(9) small
      print *,'read in array, should be 1 through ',ix*jx
      print *,'small=',small
      return
      end
T.RTitleUserPersonal
Name
DateLines
1281.1Yes, same bugTLE::EKLUNDAlways smiling on the inside!Fri May 02 1997 11:237
    	Yes, indeed, this is the same problem as note 1167.  Watch for a
    newer compiler to be announced in the early notes.  Hopefully this
    will be within the next month (I don't know the exact date).
    
    Cheers!
    Dave Eklund