PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

CUDA-x86.

possible bug in pgf90 12.1-0

 
Post new topic   Reply to topic    PGI User Forum Forum Index -> Programming and Compiling
View previous topic :: View next topic  
Author Message
themos



Joined: 28 Sep 2007
Posts: 7

PostPosted: Fri Mar 16, 2012 3:15 am    Post subject: possible bug in pgf90 12.1-0 Reply with quote

This code produces an error with (pgf90 12.1-0 64-bit target on x86-64 Linux -tp istanbul)

I suspect there's some confusion over the shm identifier but I am not sure.

The nagfor compiler (NAG Fortran Compiler Release 5.3 859)
rejects the code as non-valid f90 or f95 but accepts it as valid f2003 or f2008.

Quote:
PGF90-S-0155-Derived type has not been declared - shm (shm_bug.f90: 17)
0 inform, 0 warnings, 1 severes, 0 fatal for constructor
PGF90-S-0155-Derived type has not been declared - shm (shm_bug.f90: 24)
0 inform, 0 warnings, 1 severes, 0 fatal for getshmid


Code:
module shm_mod
  implicit none
  private
  public :: shm
  type shm             
     integer      :: shm_id = -999
   contains
     procedure :: shm => getShmid
!!  above fails but with next line instead compiles ok
!!   procedure :: shmoo => getShmid
  end type shm
  interface shm
     procedure constructor
  end interface
contains
  function constructor (error)
    class(shm), pointer                 :: constructor
    integer                             :: error       
    ! code missing
    allocate(constructor)
    error = 0
  end function constructor
  function getShmid (this)
    class(shm)  :: this
    integer     :: getShmid
    getShmid = this%shm_id
  end function getShmid
end module shm_mod
Back to top
View user's profile
mkcolg



Joined: 30 Jun 2004
Posts: 6126
Location: The Portland Group Inc.

PostPosted: Fri Mar 16, 2012 4:53 pm    Post subject: Reply with quote

Hi themos,

FYI, I needed to send this on to one of our compiler engineers and am waiting for a response. I'll let you know what I find out.

Thanks,
Mat
Back to top
View user's profile
mkcolg



Joined: 30 Jun 2004
Posts: 6126
Location: The Portland Group Inc.

PostPosted: Mon Mar 19, 2012 10:37 am    Post subject: Reply with quote

Hi themos,

Yes, it is a compiler error and TPR#18558 was opened to track this issue. Note that the error has been corrected and a fix should be available in the 12.4 release.

Thank you for the report!
Mat
Back to top
View user's profile
Display posts from previous:   
Post new topic   Reply to topic    PGI User Forum Forum Index -> Programming and Compiling All times are GMT - 7 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © phpBB Group