public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "deji_aking at yahoo dot ca" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/47054] New: Compilation error when cray pointers are declared in both host and internal subroutines
Date: Thu, 23 Dec 2010 18:04:00 -0000	[thread overview]
Message-ID: <bug-47054-4@http.gcc.gnu.org/bugzilla/> (raw)

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47054

           Summary: Compilation error when cray pointers are declared in
                    both host and internal subroutines
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: deji_aking@yahoo.ca


The following code produces compilation error when compiled with gfortran-4.5.1
(gcc version 4.5.1 20101130 (Red Hat 4.5.1-6) (GCC)). It compiles fine if I
remove the 'contains' statement, and replace it with 'end subroutine host_sub'.

>>>>>
subroutine host_sub(F_su,F_nk)
   implicit none

   integer :: F_nk
   real,dimension(F_nk) :: F_su
      integer G_ni, G_nj
      real*8 G_xg_8, G_yg_8
      pointer (paxg_8, G_xg_8(G_ni))
      pointer (payg_8, G_yg_8(G_nj))
      common / G_p / paxg_8,payg_8
!
      common / G / G_ni, G_nj

   call internal_sub(F_su,F_nk)
   return
contains 

   subroutine internal_sub(F_su,F_nk)
      implicit none
!
      integer G_ni, G_nj
      real*8 G_xg_8, G_yg_8
      pointer (paxg_8, G_xg_8(G_ni))
      pointer (payg_8, G_yg_8(G_nj))
      common / G_p / paxg_8,payg_8
!
      common / G / G_ni, G_nj

      integer :: F_nk
      real,dimension(F_nk) :: F_su 
      integer k,k2

      k2 = 0
      do k = 1, F_nk, 2
         k2 = k2+1
               F_su(k) = F_su(k) + 1.0
      enddo
      return
   end subroutine internal_sub
end subroutine host_sub
>>>>>


             reply	other threads:[~2010-12-23 18:04 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-23 18:04 deji_aking at yahoo dot ca [this message]
2010-12-23 19:23 ` [Bug fortran/47054] " kargl at gcc dot gnu.org
2010-12-23 19:33 ` dominiq at lps dot ens.fr
2011-01-03 15:51 ` deji_aking at yahoo dot ca
2011-01-03 22:39 ` kargl at gcc dot gnu.org
2011-01-03 22:42 ` kargl at gcc dot gnu.org
2011-01-03 23:59 ` kargl at gcc dot gnu.org
2014-05-13 14:22 ` dominiq at lps dot ens.fr

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-47054-4@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).