I've attached a short example (mostly declarations) that exposes a bug in 14.0.2. The compiler is incorrectly reporting an error for a reference to the SIZE intrinsic. The compiler appears to be confusing SIZE for some other function than the intrinsic function, though within the scope of the reference there is absolutely nothing else it could possibly be confused for. This bug is awfully similar to several others I've reported over the last few years, though I can't say it's exactly the same. The compiler seems to have an on-going problem with allowing the knowledge of entities leak outside of their proper scope.
For more complete information about compiler optimizations, see our Optimization Notice.