public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/52909] New: Procedure pointers not private to modules
@ 2012-04-08 23:13 abenson at caltech dot edu
  2012-04-08 23:36 ` [Bug fortran/52909] [F03] " janus at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: abenson at caltech dot edu @ 2012-04-08 23:13 UTC (permalink / raw)
  To: gcc-bugs

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

             Bug #: 52909
           Summary: Procedure pointers not private to modules
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: abenson@caltech.edu


The following code won't compile with the latest gfortran (or with 4.6 and
4.7). The two procedure pointers should be private to their respective modules
so there should be no symbol conflict.

module Module1
  implicit none
  private
  procedure(), pointer :: procPtr => null()
end module Module1

module Module2
  implicit none
  private
  procedure(), pointer :: procPtr => null()
end module Module2

program Test
  use Module1
  use Module2
  implicit none
end program Test


$ gfortran -v
Using built-in specs.
COLLECT_GCC=/home/abenson/gcc4.7/bin/gfortran
COLLECT_LTO_WRAPPER=/home/abenson/gcc4.7/libexec/gcc/x86_64-unknown-linux-
gnu/4.8.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ../gcc4.7/configure --prefix=/home/abenson/gcc4.7 --enable-
languages=c,c++,fortran --disable-multilib --with-gmp=/home/abenson/gcc4.7 --
with-mpc=/home/abenson/gcc4.7 --with-mpfr=/home/abenson/gcc4.7
Thread model: posix
gcc version 4.8.0 20120407 (experimental) (GCC) 

$ gfortran test.F90
/tmp/ccuQNbu2.s: Assembler messages:
/tmp/ccuQNbu2.s:13: Error: symbol `procptr' is already defined


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2012-12-10 23:21 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-08 23:13 [Bug fortran/52909] New: Procedure pointers not private to modules abenson at caltech dot edu
2012-04-08 23:36 ` [Bug fortran/52909] [F03] " janus at gcc dot gnu.org
2012-04-09 14:40 ` janus at gcc dot gnu.org
2012-12-10 23:18 ` janus at gcc dot gnu.org
2012-12-10 23:21 ` janus at gcc dot gnu.org

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).