Error message from gfortran
Tobias Burnus
burnus@net-b.de
Thu May 29 15:08:00 GMT 2008
Hi Salvatore,
Salvatore Filippone wrote:
> I get the following error message from compiling the attached program;
> both Intel 10 and XLF 10 compile this (or the original it was extracted
> from) with no troubles. The problem also happens on a recent (about 2
> weeks) snapshot of 4.4.
> Compiler bug or user error?
>
I do not see any regression here: The program is rejected here with
gfortran 4.1, 4.2, 4.3 and 4.4.
However, it is accepted by ifort, openf95, g95, Lahey and NAG f95 thus
it is probably valid.
* * *
I believe it is valid:
interface foobar
subroutine d_foobar(x)
type(d_foo_type), intent (inout) :: x
and
interface foobar
subroutine s_foobar(x)
type(s_foo_type), intent (inout) :: x
are not ambiguous. Interestingly, there is no problem using:
module foo_mod
use s_foo_mod
use d_foo_mod
end module foo_mod
The problem only occurs if one now includes "foo_mod". It could thus be
a module-reading problem or some other resolving problem.
Can you fill a bug report?
Thanks,
Tobias
PS: Reduced test case:
module one
type t1
end type t1
interface foo
subroutine my1(x)
import
type(t1) :: x
end subroutine my1
end interface foo
end module one
module two
type t2
end type t2
interface foo
subroutine my2(x)
import
type(t2) :: x
end subroutine my2
end interface foo
end module two
module three
use one
use two
end module three
use three ! FAILS HERE
end
More information about the Fortran
mailing list