TARGET or POINTER attribute needed ?

From: Joost VandeVondele (jv244_at_cam.ac.uk)
Date: 01/26/04


Date: 26 Jan 2004 04:40:24 -0800

MODULE test
  TYPE mytype2
  INTEGER, DIMENSION(2,3) :: data
  END TYPE
  TYPE mytype
  TYPE(mytype2), POINTER :: x
  END TYPE
CONTAINS
  SUBROUTINE sub(aa)
    TYPE(mytype), INTENT(IN) :: aa
    INTEGER, DIMENSION(:,:), POINTER :: d
    d=>aa%x%data
    END SUBROUTINE
END MODULE

USE test
TYPE(mytype) :: aa
ALLOCATE(aa%x)
CALL sub(aa)
END

the code is accepted with ifort (ifc 8.0) / nag f95 5.0 / ibm xlf90 / irix
f90 / g95.sourceforge.net but not with pgf90 / ifc 7.1

There are quite a number of good compilers in the 'accepting' list, but
the error message is reasonable :

PGF90-S-0084-Illegal use of symbol data - must have the TARGET or POINTER
attribute (mytest.f90: 12)

who's right who's wrong ?

Joost



Relevant Pages