https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115653

kargls at comcast dot net changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |kargls at comcast dot net

--- Comment #1 from kargls at comcast dot net ---
Thanks for the bug report.  Fortunately, it is only warning that clutters the
terminal.

This patch suppresses the warning, but may not catch a 'USE xyz'
within the submodule.

diff --git a/gcc/fortran/module.cc b/gcc/fortran/module.cc
index c565b84d61b..5a58a9dbace 100644
--- a/gcc/fortran/module.cc
+++ b/gcc/fortran/module.cc
@@ -7285,7 +7285,7 @@ gfc_use_module (gfc_use_list *module)
   only_flag = module->only_flag;
   current_intmod = INTMOD_NONE;

-  if (!only_flag)
+  if (!only_flag && gfc_state_stack->state != COMP_SUBMODULE)
     gfc_warning_now (OPT_Wuse_without_only,
                     "USE statement at %C has no ONLY qualifier");

Reply via email to