I have a (rather old, created with Digital Visual Fortran) win32 gui program which I compile now and then (with current versions of Intel Fortran).
Now it failed to compile with:
WGUTIL.F90(127): error #7112: This actual argument must not be the name of a procedure. [NULL]
Obviously there is a conflict between INTEGER, PARAMETER :: NULL = 0 (somewhere in the win api modules, ifwinty actually) and the intrinsic function NULL().
To demonstrate this I have included here a demo code NULL-Intrinsic.f90.
The conflicting definitions in the demo are in module wintypes (INTEGER, PARAMETER :: NULL = 0) and in module dyndef, type declaration of dynstring_ (character(len=1), pointer :: s(:) => NULL()).
1) The elements of derived type dynstring_ are declared private. Why does the definition of NULL() leak out there? Is this a compiler error? Is the Fortran standard precise enough to define such things?
2) The real program consists of about 10 source files (and approximately the same number of modules). The win32 api defines more than a dozen modules and I have a "utility" library with about 100 modules. So it took me some time to find out, from where the conflicting definitions came. Is there some aid in the compiler to help in such situations? Something like a cross reference or similar which tells from where type defnitions come from?