Skip to content
Commit a94b721d authored by peter klausler's avatar peter klausler Committed by Peter Klausler
Browse files

[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
parent 6eb38e51
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment