fix for the multiple-decl problem - please test

Daniel Franke franke.daniel@gmail.com
Mon Dec 29 10:55:00 GMT 2008


On Saturday 27 December 2008 20:27:42 Daniel Franke wrote:
> > Yes global variables also have the multiple-decl issue and not just
> > functions :).  You need to merge them too.
>
> You are right, unfortunately.
> Same with COMMON:
>
>   common /global/ p
>   integer :: p
>
>   p = 1
>   CALL set_p()
>   IF (p /= 42) CALL ABORT()
> END
>
> SUBROUTINE set_p()
>   common /global/ p
>   p = 42
> END SUBROUTINE

To correct myself: COMMON is fine. This aborts because of the different types 
for P in the program (INTEGER) and the subroutine (implicitly typed REAL) ^^



More information about the Fortran mailing list