- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
C:MyProjects>ifort /warn:interface /gen_interface t.f90
Intel Fortran Compiler for 32-bit applications, Version 9.1 Build 20060519Z Package ID: W_FC_C_9.1.025
Copyright (C) 1985-2006 Intel Corporation. All rights reserved.
t.f90(2) : Error: The number of actual arguments cannot be greater than the number of dummy arguments.
call sub (1,1)
-----^
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Your description of how the feature works is correct. An important difference is that the compiler is supposed to use the generated modules for error checking only, NOT to change the semantics of a program. For example, if you have a subroutine which requires an explicit interface, /warn:interface is not supposed to provide that interface when it "uses" the generated module. There was a bug where it did just that - I don't recall if it is fixed in 9.1.025 or is waiting for the next update.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Well, THAT is pleasant news! The Intel download site suggests that V9.1 downloads are available only to current V9.1 users. I didn't even try. I DID, however, download and install the last version (029) of V9.0 and, as you suggested, the /warn:interface and /gen-interfaces options work, though there's an undocumented trick involved. On the FIRST compilation, turn on the /gen-interfaces option and the compiler will generate the subroutine module files and compile them. On subsequent compilations, turn the /gen-interfaces off or it will bomb with a code(1) compiler error and no explanation. It looks like the compiler might be trying to open the mod files as 'new' rather than 'unknown'. In order to regenerate the mod files you have to manually delete the existing files (I think).
Anyway, once those mod files are in place, turn /gen-interfaces off and /warn:interface on, and recompile to your heart's content. It'll find and report every interface violation..
On another note, it looks like a bug was introduced in the last six months or so, though I don't know if it made it into V9.1. The statement
allocate
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
(sorry)
allocate (ival(nval),stat=ierr) ; if (ierr.ne.0) go to 901
doesn't compile anymore. It has to be split into 2 lines:
allocate (ival(nval),stat=ierr)
if (ierr.ne.0) go to 901
Bruce
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks, Steve.
Bruce
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page