two complaints by Intel Fortran
- From: highegg <highegg@xxxxxxxxx>
- Date: Thu, 06 Sep 2007 14:51:41 -0000
when porting a gfortran-developed program to Intel today, I stumbled
across two issues:
1. Intel (9.1.040 for AMD/Linux) consider two interfaces incompatible
if one has an overriden lower bound for array. Specifically, Intel
rejects the following code:
module testm
implicit none
contains
subroutine tests(s1)
interface
subroutine s1(a)
real,intent(in):: a(:)
end subroutine
end interface
call s1([1.,2.])
end subroutine
subroutine s2(a)
real,intent(in):: a(0:)
print *,a(0)
end subroutine
end module
program testprg
use testm
implicit none
call tests(s2) ! ERROR
end program
g95, gfortran and pathscale accept it. I suppose Intel is wrong,
according to 12.2.1.1 of F2003. Or was this different in F95?
2. this happened when compiling an automatically generated source.
Intel (as well as g95, gfortran and pathscale) accepts an empty
generic interface, but unlike
the others it refuses to swallow a PUBLIC spec for it. Source:
module testm
implicit none
interface empty
! nothing here
end interface
public empty ! ERROR
end module
is rejected by Intel. I admit this _really_ is a corner case. I can't
figure this out from the standard.
many thanks,
Jaroslav
.
- Follow-Ups:
- Re: two complaints by Intel Fortran
- From: Steve Lionel
- Re: two complaints by Intel Fortran
- From: Steve Lionel
- Re: two complaints by Intel Fortran
- From: Richard Maine
- Re: two complaints by Intel Fortran
- Prev by Date: Re: Run-time error with gfortran -fbounds-check
- Next by Date: Re: Run-time error with gfortran -fbounds-check
- Previous by thread: read or write "how to convert integer to string?"
- Next by thread: Re: two complaints by Intel Fortran
- Index(es):
Relevant Pages
|