[flang] Improve error message for misuse of NULL(mold) as data statement constant
While "null()" is accepted as a data statement constant when it corresponds to a pointer object, "null(mold=p)" and "null(p)" are not allowed. The current error messages simply complain that null is not an array. This patch adds a context-sensitive message to the effect that a data statement constant followed by non-empty parentheses must be an array or structure constructor. (Note that f18 can't simply special-case the name "null" when parsing data statement constants, since programs are free to repurpose that name as an array or derived type.) Differential Revision: https://reviews.llvm.org/D112740
Loading
Please sign in to comment