This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/16606] New: gfortran error with a valid derived type definition


gfortran gives the following error
>>
f95 -xf95-cpp-input -I/usr/include -L/usr/lib -lnetcdf -c mo_mz_regrid_base.f90
In file mo_mz_regrid_base.f90:51

  TYPE narray
            1
Error: Pointer assignment target is neither TARGET nor POINTER at (1)
make[1]: *** [mo_mz_regrid_base.o] Error 1
<<

Below is a snip of mo_mz_regrid_base.f90 where the error is activated

>>
  TYPE narray
     ! n-dimenional array as 1D (LINEAR) array (REAL)
     INTEGER                              :: n = 0  ! number of dimensions
     INTEGER,      DIMENSION(:), POINTER  :: dim => NULL()! dim. vector
     REAL (SP)   , DIMENSION(:), POINTER  :: vr => NULL() ! real values
     REAL (DP)   , DIMENSION(:), POINTER  :: vd => NULL() ! double values
     INTEGER (I8), DIMENSION(:), POINTER  :: vi => NULL() ! integer values
     INTEGER (I4), DIMENSION(:), POINTER  :: vb => NULL() ! byte values
     CHARACTER,    DIMENSION(:), POINTER  :: vc => NULL() ! char. values
  END TYPE narray

  TYPE axis
     ! hyper-axis (for curvilinear coordinates)
     TYPE (narray)                        :: dat  ! interface bounds
     LOGICAL                              :: lm = .false. ! modulo axis ?
     INTEGER                              :: ndp = 0  ! number of dependencies
     ! FIRST IN LIST MUST BE INDEPENDENT !!!
     ! E.G. IF DIM 3 DEPENDS ON DIM 1,2, and 5
     ! dep = (/ 3,1,2,5 /)
     INTEGER,      DIMENSION(:), POINTER  :: dep => NULL()  ! dependencies
  END TYPE axis
<<

-- 
           Summary: gfortran error with a valid derived type definition
           Product: gcc
           Version: 3.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: deji_aking at yahoo dot ca
                CC: gcc-bugs at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16606


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]