------- Comment #2 from dfranke at gcc dot gnu dot org  2010-05-09 18:58 -------
With two minor modifications to the code (in main, call func(), not res(); in
func1() call modFunc(), not mod), one gets:

$> gfortran-svn -v
gcc version 4.6.0 20100509 (experimental) (GCC) 

$> gfortran-svn -Wall -W -std=f95 pr32515.f90 
pr32515.f90:24.16:

    common /bar/ r2 ! F95: Error also a global procedure
                1
Error: Symbol 'bar' at (1) is already an external symbol that is not COMMON
pr32515.f90:25.16:

    common /mod/ r3 ! F95: Error also a global procedure
                1
Error: Symbol 'mod' at (1) is already an external symbol that is not COMMON
pr32515.f90:23.16:

    common /res/ r1 ! F95: Error also a global procedure
                1
Error: Fortran 2003: COMMON block 'res' at (1) that is also a function result


$> gfortran-svn -Wall -W -std=f2003 pr32515.f90 
pr32515.f90:24.16:

    common /bar/ r2 ! F95: Error also a global procedure
                1
Error: Symbol 'bar' at (1) is already an external symbol that is not COMMON
pr32515.f90:25.16:

    common /mod/ r3 ! F95: Error also a global procedure
                1
Error: Symbol 'mod' at (1) is already an external symbol that is not COMMON


I think, that's ok, Closing.
Please reopen if I misread something.


-- 

dfranke at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dfranke at gcc dot gnu dot
                   |                            |org
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED


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

Reply via email to