PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

Free OpenACC Webinar

Bounds Bug

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



Joined: 13 May 2005
Posts: 1

PostPosted: Fri May 13, 2005 8:24 am    Post subject: Bounds Bug Reply with quote

Please could you help, I am looking for pgi fortran compiler option(s) to track the following obvious bound bug :

program bug
dimension a(2,2)
write(*,*) a(:,0)
end
Back to top
View user's profile
mkcolg



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

PostPosted: Fri May 13, 2005 10:28 am    Post subject: Reply with quote

Hi Alessandrini,

Add "-Mbounds".

Code:
% cat x.f90
program bug
  dimension a(2,2)
  write(*,*) a(:,0)
end
% pgf90 x.f90
% a.out
   -1.999570        0.000000
% pgf90 x.f90 -Mbounds
% a.out
0: Subscript out of range for array a (x.f90: 3)
    subscript=0, lower bound=1, upper bound=2, dimension=2


- 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