public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/49265] New: Double colon in procedure-stmt (generic interface)
@ 2011-06-01 23:28 eh.toussaint at gmail dot com
  2011-06-02  0:27 ` [Bug fortran/49265] " kargl at gcc dot gnu.org
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: eh.toussaint at gmail dot com @ 2011-06-01 23:28 UTC (permalink / raw)
  To: gcc-bugs

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

           Summary: Double colon in procedure-stmt (generic interface)
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: minor
          Priority: P3
         Component: fortran
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: eh.toussaint@gmail.com


In Fortran 2008 the (module) procedure statement in a generic
interface can contain a double colon, according to R1206:

R1206  procedure-stmt   is   [ MODULE ] PROCEDURE [ :: ] procedure-name-list

When I try to compile the following module with gfortran 4.7-20110423
I get an error.

module m1
  implicit none
  interface foo
     module procedure :: bar
  end interface
contains
  subroutine bar
  end subroutine
end module

$ gfortran -c -std=f2008 m1.f90
m1.f90:4.23:

     module procedure :: bar
                      1
Error: Syntax error in MODULE PROCEDURE statement at (1)

(The '1' indicates the double colon as the location of the error.)

If I remove the double colon the file compiles without error - which is
expected, as the optional double colon didn't appear in the rule in previous
versions of the standard.

$ gcc -v
Using built-in specs.
COLLECT_GCC=d:\Programs\MinGW\gcc47\bin\gcc.exe
COLLECT_LTO_WRAPPER=d:/programs/mingw/gcc47/bin/../libexec/gcc/i686-pc-mingw32/4
.7.0/lto-wrapper.exe
Target: i686-pc-mingw32
Configured with: ../src/configure --prefix=/mingw --with-gmp=/mingw
--with-mpfr=
/mingw --with-mpc=/mingw --disable-nls --enable-languages=c,c++,fortran
--enable
-libgomp --disable-win32-registry
Thread model: win32
gcc version 4.7.0 20110423 (experimental) (GCC)


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

end of thread, other threads:[~2012-07-17  9:01 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-06-01 23:28 [Bug fortran/49265] New: Double colon in procedure-stmt (generic interface) eh.toussaint at gmail dot com
2011-06-02  0:27 ` [Bug fortran/49265] " kargl at gcc dot gnu.org
2011-06-02 17:40 ` kargl at gcc dot gnu.org
2011-06-02 19:53 ` kargl at gcc dot gnu.org
2011-06-02 19:55 ` kargl at gcc dot gnu.org
2012-07-13 22:30 ` eh.toussaint at gmail dot com
2012-07-14 11:21 ` burnus at gcc dot gnu.org
2012-07-17  8:59 ` burnus at gcc dot gnu.org
2012-07-17  9:00 ` burnus at gcc dot gnu.org
2012-07-17  9:01 ` burnus 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).