https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55534
--- Comment #11 from Tobias Burnus <burnus at gcc dot gnu.org> --- The problem is an ordering problem. Namely: * toplev.c calls: lang_hooks.init_options (save_decoded_options_count, save_decoded_options); which in turn is: gfc_init_options ( .... { ... SET_OPTION_IF_UNSET (&global_options, &global_options_set, cpp_warn_missing_include_dirs, 1); ... /* Initialize cpp-related options. */ gfc_cpp_init_options (decoded_options_count, decoded_options); ... } Thus, cpp_warn_missing_include_dirs is enabled. Now: decode_options (&global_options, &global_options_set, ... is run, which calls: read_cmdline_options (opts, opts_set, ... → read_cmdline_option → handle_option → gfc_handle_option → gfc_add_include_path → gfc_warning_now and only afterwards decode_options invokes: set_option (...) which then sets: global_options_set->x_... = 1 and global_options->x_... = commandline option. and disables the already shown warning.