PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

Free OpenACC Webinar

Initialization bug

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



Joined: 28 Dec 2004
Posts: 6

PostPosted: Sun May 21, 2006 8:36 am    Post subject: Initialization bug Reply with quote

Hello,

The following program shows an initialization bug which occurs in the current version
of the compiler.
Code:


module lib
  implicit none

  type :: A
     integer :: iA = -1
  end type A

  type (A), dimension (0:2), save :: Abox

contains

  subroutine init_A ()

    Abox(1)%iA = 1 

  end subroutine init_A

end module lib

program test
  use lib
  implicit none

  call init_A ()

  print *, Abox(0)%iA
!! ERROR Should be -1 instead of 0

end program test


Furthermore, if we omit save attribute in the definition of Abox and break the F95 standard in this way - the program compiles without error even though the option -Mstandard is used.

Regards,
James
Back to top
View user's profile
mkcolg



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

PostPosted: Mon May 22, 2006 9:32 am    Post subject: Reply with quote

Hi Jamie,

It looks like a bug in the 6.1 compiler since it works as expected with 6.0. I've added a technical problem report (TPR #3840) and hopefully we can get this issue resolved quickly.

Thanks 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