two complaints by Intel Fortran



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

.



Relevant Pages

  • Re: Allocatable arrays and shared libraries: help needed
    ... avoid specifying the INTERFACE for every subroutine. ... I see you are involved into gfortran development so this may be of ... The issue boils down to this simple program that allocates a matrix ...
    (comp.lang.fortran)
  • Re: compiler switch -c
    ... All methods must be exposed by interface. ... module procedure fruit_summary_ ... end subroutine init_fruit_ ... character, intent, optional:: message ...
    (comp.lang.fortran)
  • TRANSFER arbitrary data ? (long)
    ... subroutine to minimize a function of n variables, ... end interface ... that to an integer array and back. ... subroutine minimize(Func, x, context) ...
    (comp.lang.fortran)
  • Re: Are procedure dummy arguments ignored in generic procedure resolution?
    ... the interface block that defines the ... recursive subroutine step_up ... Compiling program unit mykinds at line 1: ...
    (comp.lang.fortran)
  • Re: Faulty Hard Drive?
    ... Maxtor was acquired by Seagate, so the Seagate web site is where you'd ... there is a "feature" where the interface drops down ... to PIO mode, instead of using DMA mode, if ... the drive to the Intel Southbridge. ...
    (alt.comp.periphs.mainboard.asus)