PR gcc/108328

gcc/ChangeLog:

* gcc/gcc.cc: print help once and only once
---
 gcc/gcc.cc | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gcc/gcc.cc b/gcc/gcc.cc
index d629ca5e424..bd468a6a254 100644
--- a/gcc/gcc.cc
+++ b/gcc/gcc.cc
@@ -5414,9 +5414,9 @@ process_command (unsigned int decoded_options_count,
     }

   /* Ensure we only invoke each subprocess once.  */
-  if (n_infiles == 0
-      && (print_subprocess_help || print_help_list || print_version))
+  if (print_subprocess_help || print_help_list || print_version)
     {
+      n_infiles = 0;
       /* Create a dummy input file, so that we can pass
  the help option on to the various sub-processes.  */
       add_infile ("help-dummy", "c");
-- 
2.34.1

Reply via email to