Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
28988 Discussions

trouble with -gen-interfaces and -warn-interfaces

Alexis_R_
New Contributor I
799 Views
Hi there,

First post here, but been lurking for a while :)

Not sure whether I'm missing something, but I'm having trouble using the -gen-interfaces in conjunction with -warn-interfaces.
With ifort 11.0.83 and the attached sources, I get this if the PROGRAM and SUBROUTINES are in separate files:

[shell]ifort -I. -Isrc/   -fpp  -warn all -gen-interfaces -fpp  -warn interfaces -check all -O2 -FR -c -o hurray.o /gusr/alr99/cluster/workspace/helloworld/hurray.f90
ifort -I. -Isrc/   -fpp  -warn all -gen-interfaces -fpp  -warn interfaces -check all -O2 -FR -c -o main.o /gusr/alr99/cluster/workspace/helloworld/main.f90
/gusr/alr99/cluster/workspace/helloworld/main.f90(1): error #5508: Declaration of routine 'HURRAYWORLD' conflicts with a previous declaration
PROGRAM HURRAYWORLD
--------^
compilation aborted for /gusr/alr99/cluster/workspace/helloworld/main.f90 (code 1)[/shell]
However, if I copy the subroutine to main.f90, and then recompile with same options, no error:
[shell]ifort -I. -Isrc/   -fpp  -warn all -gen-interfaces -fpp  -warn interfaces -check all -O2 -FR -c -o main.o /gusr/alr99/cluster/workspace/helloworld/main.f90[/shell]
Alternatively, if I use -warn nointerfaces, I don't have this issue, but of course, I also miss all the great warnings that -gen-interfaces generates.

The project I'm working on atm has lots of small files (one sub/function per file), and a lot of them trigger #5508, which swamps the useful output with lots of (as far as I can tell) useless errors.

Anyway, am I doing something wrong?

Many thanks,
Alexis
0 Kudos
3 Replies
Kevin_D_Intel
Employee
799 Views

You are not doing anything wrong. This was an unexpected regression introduced in the 11.0.083 update. For now, if you have a previous 11.0 update available you will need to use it with the gen-interfaces/warn-interfaces options, or if possible perhaps consider upgrading to our latest 11.1 release. There is one final 11.0 update tentatively planned for availability at the Registration Center later this weekthat contains afix for this issue.
0 Kudos
Alexis_R_
New Contributor I
799 Views

You are not doing anything wrong. This was an unexpected regression introduced in the 11.0.083 update. For now, if you have a previous 11.0 update available you will need to use it with the gen-interfaces/warn-interfaces options, or if possible perhaps consider upgrading to our latest 11.1 release. There is one final 11.0 update tentatively planned for availability at the Registration Center later this weekthat contains afix for this issue.

Upgrading to 11.1 solved the problem - thanks a lot!
0 Kudos
Kevin_D_Intel
Employee
799 Views
Quoting - A. Rohou

Upgrading to 11.1 solved the problem - thanks a lot!

Glad that helped. We apologize for any inconvenience.

PS - Thank you for the rating.
0 Kudos
Reply