I'm puzzled by why I get the following error in IVF 11.1:
error #6405: The same named entity from different modules and/or program units cannot be referenced. [MAX0]
if I use the function MAX0, but not if I use the function JMAX0 in something like:
ALLOCATE (X(NENT,NATT),ENT(NENT),ATT(NATT),VTYPE(MAX0(NENT,NATT)),STAT=IERR)
The error is flagged only if I have "Compile Time Diagnostics" set to "Show All (/warn:all)". If I turn that off the program compiles and appears to run correctly. I am using the MAX0 function in various subroutines in the project, but not intentionally using it as anything other than a built-in function.
NENT and NATT are implicit 4-byte integers.
From the Fortran language reference, it seems that MAX0 and JMAX0 should give the same results.
Thanks in advance for your help.
-Bruce
error #6405: The same named entity from different modules and/or program units cannot be referenced. [MAX0]
if I use the function MAX0, but not if I use the function JMAX0 in something like:
ALLOCATE (X(NENT,NATT),ENT(NENT),ATT(NATT),VTYPE(MAX0(NENT,NATT)),STAT=IERR)
The error is flagged only if I have "Compile Time Diagnostics" set to "Show All (/warn:all)". If I turn that off the program compiles and appears to run correctly. I am using the MAX0 function in various subroutines in the project, but not intentionally using it as anything other than a built-in function.
NENT and NATT are implicit 4-byte integers.
From the Fortran language reference, it seems that MAX0 and JMAX0 should give the same results.
Thanks in advance for your help.
-Bruce
链接已复制
6 回复数
Can you provide a source file that generates this error? I'd guess that if you set "Check Routine Interfaces" to No that this error will go away. It sounds as if there's a bug in this feature. Please help us out with a test case.
Yes, I will see if I can make a small example that gives this error and then post it.
Meanwhile, I tried the test you suggested and that is correct. If I set Compile Time Diagnostics to "Custom" and Check Routine Interfaces to "Yes", and the other options to "No", I get the error message. Setting Check Routine Interfaces to "No" results in no errors.
Meanwhile, I tried the test you suggested and that is correct. If I set Compile Time Diagnostics to "Custom" and Check Routine Interfaces to "Yes", and the other options to "No", I get the error message. Setting Check Routine Interfaces to "No" results in no errors.
I made several tries at a short program that produces the problem but was unsuccessful. (That is, when I whack out a lot of code the problem disappears). I'm sure I could get one eventually, but no time right now. Maybe the easiest avenue would be if I could send you a whole project privately.
