https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94769
--- Comment #7 from Stefan Schulze Frielinghaus <stefansf at linux dot ibm.com> --- Since gfc_resolve_dt is a non-static function we cannot assume anything about argument DT. Argument DT gets passed to function check_io_constraints which passes values depending on DT, namely dt->asynchronous->value.character.string to function compare_to_allowed_values as well as argument warn which is true as soon as DT->dterr is true. If function compare_to_allowed_values is called with dt->asynchronous->value.character.string not beeing an allowed value, and ALLOWED_F2003 as well as ALLOWED_GNU beeing NULL (which is the case at the mentioned call side), and WARN equals true, then if (warn) { char *s = gfc_widechar_to_char (value, -1); gfc_warning (0, "%s specifier in %s statement at %L has invalid value %qs", specifier, statement, where, s); free (s); return 1; } will fire and return a non-zero value which renders the compiler warning true.