replica nfl jerseysreplica nfl jerseyssoccer jerseyreplica nfl jerseys forums.silverfrost.com :: View topic - Warning 1093 - What does it mean
forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Warning 1093 - What does it mean

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support
View previous topic :: View next topic  
Author Message
davidb



Joined: 17 Jul 2009
Posts: 560
Location: UK

PostPosted: Tue Jul 23, 2013 6:46 am    Post subject: Warning 1093 - What does it mean Reply with quote

With the following code, the compiler issues a warning

warning 1093 - TARGET attribute used where POINTER may be preferred

What is the reason for this? Note that A POINTER cannot be used since the actual argument is not a POINTER.

One possibiliy is the warning means something like:

warning 1093 - The actual argument must be contiguous when the TARGET attribute is used on the dummay argument.


Code:

module mmm

   type xxx_t
      sequence
      real :: q
   end type xxx_t
     
contains

   subroutine sss(a)
      type(xxx_t), intent(inout), target :: a(:)
      real, pointer :: p
      do i=1, size(a)
        p => a(i)%q
        p = real(i)
      end do
   end subroutine sss

end module mmm

program anon

   use mmm
   type(xxx_t), allocatable :: a(:)
   allocate(a(10))
   call sss(a)
   print *, a%q

end program anon

_________________
Programmer in: Fortran 77/95/2003/2008, C, C++ (& OpenMP), java, Python, Perl
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 8210
Location: Salford, UK

PostPosted: Tue Jul 23, 2013 11:58 am    Post subject: Reply with quote

I don't know what this means but intuitively I would not use TARGET in this context.
Back to top
View user's profile Send private message AIM Address
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support All times are GMT + 1 Hour
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 © 2001, 2005 phpBB Group