https://gcc.gnu.org/bugzilla/show_bug.cgi?id=125458
--- Comment #5 from Mikael Morin <mikael at gcc dot gnu.org> ---
The difference comes from error.cc's buffered_p.
With comment #0 buffered_p is true and the error is only stored in the buffer.
With comment #2 buffered_p is false and the error is emitted.
eval_intrinsic's signature is:
static gfc_expr * eval_intrinsic (...)
so either the function returns a non-null expression and it is a success, or
the function returns nullptr and it is a failure. There is no way to return a
non null expression whilst still signalling an error.