The following gives an ICE in gfc_enforce_clean_symbol_state. character(*), parameter :: pt = "hkgj" !$omp error at(compilation) message(pt) end The current wording implies that this is valid. TODO: Check what C/C++ do for non-literals. Note: OpenMP Spec Issue 3558 might change what is permitted. * * * Possibly, the printing needs to me moved from directly after parsing to later: It sounds as if code placed in non-executable context (→ declaration part), metadirectives needs to be honored – which may imply a delayed printing after evaluating the static context selector? For executable context, the 'at' clause has the following, but not when used in declarative/non-executable context: "If _action-time_ is **compilation** and the directive appears in an executable context that is not reachable at runtime, the action may or may not be performed."