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

Mysterious warning message?

WSinc
New Contributor I
1,499 Views

I was trying to use this "optional" argument, but when I have all three arguments,

I get an error message #8055. Just a warning, but why doesn't the compiler accept it?

As far as I can tell, the code runs OK with or without the 3rd argument.

0 Kudos
8 Replies
IDZ_A_Intel
Employee
1,499 Views
I get no errors when compiling this source (after supplying a definition for CHUNK.)
0 Kudos
TimP
Honored Contributor III
1,499 Views
If I comment out the include file, which you didn't supply, the only error is on account of undefined and uninitialized variable CHUNK.
0 Kudos
WSinc
New Contributor I
1,499 Views

Even when you use the "compile" option under build?

Just pressing F5 only displays errors, not the warning #8055 message.

Would it be the interaction with other modules that triggers this?

Like I said, it's no biggie, but I'm wondering what the cause might be.

BTW, "chunk" was a parameter. It's value is 1000000.

0 Kudos
IDZ_A_Intel
Employee
1,499 Views
All you gave was one source file, so it really doesn't matter how it is compiled. There is clearly more context needed. Can you reproduce this in a new project or an independent directory?
0 Kudos
WSinc
New Contributor I
1,499 Views

OK, here is the "whole caboodle."

There are two folders involved, because I tried to rebuild the project from scratch,

and it would not let me go back to the original folder name. I had to change the name of the project.

Anyway, you can reproduce the error by looking at the BUILDLOG.HTM, or by trying to recompile

the main program. Just pressing F5 only gives you errors, not warnings, so I had to use

"compile" under BUILD.

I was wondering if we can get a utility that will make it easier to rebuild the whole project from

just the source files.

0 Kudos
IDZ_A_Intel
Employee
1,499 Views

Something went wrong and your file did not upload (or download) correctly. Please try it again.

I find it pretty simple to add all the source files in one go.

0 Kudos
WSinc
New Contributor I
1,499 Views

Ok, here it is again -

Apparently I cannot upload more than one file at a time.

I tried putting them both in one upload folder, it wouldn't take it for some reason.

So I could not put the two sets of file folders in two different archives.

So here is one archive with both folders in it.

0 Kudos
IDZ_A_Intel
Employee
1,499 Views

Thanks.

The complete text of the diagnostic is:

warning #8055: The procedure has a dummy argument that has the ALLOCATABLE, ASYNCHRONOUS, OPTIONAL, POINTER, TARGET, VALUE or VOLATILE attribute. Required explicit interface is missing from original source. [CHK]

I'm not sure how this message could be any clearer. The procedure you are calling, extprin, declares its third argument CHK as OPTIONAL. This requires that an explicit interface to extprin be visible in the caller, but there is none. The compiler's "generated interface checking" identified this inconsistency and correctly warned you about it.

If you want the CHK argument to be optional, then what I would recommend is to put extprin in a module and USE the module wherever you want to call it.

For more information, see these two articles I wrote on the topic:

Doctor Fortran and the Virtues of Omission

Doctor Fortran Gets Explicit!

Also, I assume you saw the warning about this line:

integer(4) ONE(0:10)/1,1,8*0/,nbit

where the compiler warned you that ONE(0:10) has more elements (11) than values you supplied (10).

0 Kudos
Reply