error #7068: The characteristics of a dummy argument ...

error #7068: The characteristics of a dummy argument ...

Portrait de dnoack

Hi all,

with ifort 10.1.026 my program compiles without errors.

With composer_xe_2011_sp1.8.273 I get some errors

error #7068: The characteristics of a dummy argument of the associated actual procedure differ from the characteristics of the same  dummy argument of the dummy procedure. (12.2)

and I cannot find the reason of this error. Also I cannot exactly understand what this error message means.

Please can anyone explain to me, what I have to do to solve the problem.

Best regards

Dieter

4 posts / 0 nouveau(x)
Dernière contribution
Reportez-vous à notre Notice d'optimisation pour plus d'informations sur les choix et l'optimisation des performances dans les produits logiciels Intel.
Portrait de Steve Lionel (Intel)

The older version didn't check for this error.

You are calling a procedure that accepts another procedure as an argument. The declaration of the dummy argument procedure doesn't match that of the procedure you are passing.

For example, if I have this:

program test
interface
subroutine myproc(a)
integer a
end subroutine myproc
end interface
call callit(myproc)
contains
subroutine callit (proc)
interface
subroutine proc (a)
real a
end subroutine proc
end interface
end subroutine callit
end program test

you would get the error:

t.f90(7): error #7061: The characteristics of dummy argument 1 of the associated actual procedure differ from the characteristics of dummy argument 1 of the dummy procedure. (12.2)   [MYPROC]
call callit(myproc)
------------^

The "12.2" is a reference to a section of the Fortran standard, but probably Fortran 90. We should remove that part of the message. But do note that the message that comes out has more information than what you typed into your post.

Steve
Portrait de dnoack

Thank you Steve. You are absolutely right. I have declared the routine in different ways

double precision, intent(in) :: a

double precision, intent(inout) :: a

Portrait de Steve Lionel (Intel)

Yep - that's a distinction not detected by earlier compilers.

Steve

Connectez-vous pour laisser un commentaire.