PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

CUDA-x86.

pgf90 13.10 Type-bound procedures hide intrinsic procedures

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



Joined: 29 Jan 2014
Posts: 3

PostPosted: Wed Jan 29, 2014 12:21 pm    Post subject: pgf90 13.10 Type-bound procedures hide intrinsic procedures Reply with quote

It seems that when a type-bound procedure has the same name as an intrinsic procedure, the intrinsic procedure becomes hidden and unavailable. I don't think this is the proper behavior per the Fortran 2008 standard. ifort, gfortran, and xlf all handle type-bound procedures that have the same name as intrinsics without hiding the intrinsics.

As an example, the following program did not work for me (using pgf90 13.10 on Linux):
Code:

program pgi_hideintrinsic

  type :: d
    integer :: value
  contains
    procedure :: size => d_size
  end type

  integer :: array(5,5)

  print *, size(array,1)

contains
  subroutine d_size()
  end subroutine d_size
end program pgi_hideintrinsic

This code gives me the following error:
Code:

~> pgfortran pgi_hideintrinsic.f90
PGF90-S-0187-Too many arguments specified for d_size (pgi_hideintrinsic.f90: 11)
PGF90-S-0000-Internal compiler error. size_of: bad dtype        0 (pgi_hideintrinsic.f90: 11)
PGF90-S-0000-Internal compiler error. size_of: bad dtype         0 (pgi_hideintrinsic.f90: 11)
  0 inform,   0 warnings,   3 severes, 0 fatal for pgi_hideintrinsic
Back to top
View user's profile
mkcolg



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

PostPosted: Thu Jan 30, 2014 9:32 am    Post subject: Reply with quote

Thanks Paul, I've replicated the behavior here and sent a report to engineering (TPR#19795) for further investigation.

- Mat
Back to top
View user's profile
jtull



Joined: 30 Jun 2004
Posts: 438

PostPosted: Fri Mar 14, 2014 1:15 pm    Post subject: TPR 19795 is fixed in 14.3 Reply with quote

TPR 19795 - User code using type-bound procedure named "size" causes a compiler ICE/segv

has been fixed in the current 14.3 release.

thanks,
dave
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