PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

CUDA-x86.

"PGF90-S-0099 Illegal use of derived type"

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



Joined: 22 Apr 2005
Posts: 2

PostPosted: Fri Apr 22, 2005 3:15 am    Post subject: "PGF90-S-0099 Illegal use of derived type" Reply with quote

Hi,

When I use pgf90 to compile a fortran90 program, I get the following
error: "PGF90-S-0099 Illegal use of derived type". In my program, I defined a local variable :“type(dd_real) sum", where "dd_real" is a derived
type, and the assignment operator "=" has been overloaded for “dd_real", The error occured at this statement : "sum=ZERO", where "ZERO" is a constant with "dd_real" type. But if I change the variable name "sum"
to other e.g. "ssum", no error reported. I wonder if the local variable
name "sum" conflicts with the intrinsic procedure "sum". Then I do another
test, such as

subroutine test()

integer sum

sum=4
sum=sum+4

end

no error occured. What's wrong with the derived type?

Thanks a lot.

xg
Back to top
View user's profile
mkcolg



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

PostPosted: Fri Apr 22, 2005 8:03 am    Post subject: Reply with quote

Hi xg,

The 5.1 compiler has a bug (TPR 3303) which causes a conflict when user-defined type variables have the same name as an intrinsic function. This issue has been fixed in the 5.2-2 release of the compiler.

The work around is to use the entity style declaration of "sum".

Code:
      type(dd_real) :: sum


Hope this helps,
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