https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94769
--- Comment #3 from Stefan Schulze Frielinghaus <stefansf at linux dot ibm.com> --- Since one call chain is gfc_resolve_dt -> check_io_constraints -> compare_to_allowed_values and at least one parameter of compare_to_allowed_values, from which the initialization of variable num depends, is passed through non-static function gfc_resolve_dt, the warning seems valid to me. Although compare_to_allowed_values is supposed to initialize num, it may return with a non-zero value although num is not initialized.