Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.

unknown file during compile

skinner__karl
New Contributor I
469 Views
Hi, I was hoping someone could help. I'm getting compile errors that reference files in a temporary directory that are not part of the VS2008 project (using XE 12.0.3.175 [IA-32]). I've tried cleaning the project, re-starting VS, but with no success. I'm sure it is a stupid error on my part ...



C:\\DOCUME~1\\kskinn\\LOCALS~1\\Temp\\32402.i: error #7977: The type of the function reference does not match the type of the function definition. [DIVIDEBYSCALER]

compilation aborted for C:\\checkouts\\tMatch\\tMatch_v2_28\\gassg_v5.f (code 1)

0 Kudos
3 Replies
Steven_L_Intel1
Employee
469 Views
The reason the file path is not part of your project is that you have enabled preprocessing and this error message is being reported on the preprocessor-output temporary file. That itself seems a bit odd and I will look into it. But that's not your problem.

The compiler is doing a correctness check called "generated interface checking", where it compares your use and declarations of procedures against the actual procedure. The particular error here is that the compiler noticed that in gassg_v5.f there is a declaration of function DIVIDEBYSCALER, possibly implicit, that is different from the actual function.

For example, if the actual function started out as:

REAL*8 DIVIDEBYSCALER

but when you called it, you didn't declare the function to be REAL*8, you would get this error. This mismatch can, if left uncorrected, give you incorrect results or, sometimes, difficult-to-diagnose run-time errors. The compiler is doing you a favor by pointing this out.
0 Kudos
skinner__karl
New Contributor I
469 Views
Thanks Steve for your reply. You are right that I had pre-processing turned on, and that when I switched it off the the correct files were identified. However the compiler was complaining about function calls that weren't being called (anywhere in the project)!

I then had a hunch, this is an old project and some of the filescontain singlemodules, others contain a single function or subroutine and it has built successfullyin the past, prior to a load of mods. When I converted the problematic file to a module, by adding three lines, it compiled OK.

1) module
2) contains
...existing function code
3)end module

Any advice?

thanks
karl skinner
0 Kudos
Steven_L_Intel1
Employee
469 Views
If you moved the problematic function into a module that was USEd, then that would create an explicit interface to the function and resolve the problem.

There must have been a reference to this function somewhere in gassg_v5.f or one of its include files.
0 Kudos
Reply