]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Backport r248060
authorMartin Liska <mliska@suse.cz>
Thu, 22 Jun 2017 11:29:02 +0000 (13:29 +0200)
committerMartin Liska <marxin@gcc.gnu.org>
Thu, 22 Jun 2017 11:29:02 +0000 (11:29 +0000)
2017-06-22  Martin Liska  <mliska@suse.cz>

Backport from mainline
2017-05-15  Martin Liska  <mliska@suse.cz>

PR driver/31468
* gcc.c (process_command): Do not allow empty argument of -o option.

From-SVN: r249534

gcc/ChangeLog
gcc/gcc.c

index 749286afc533894d84430bb72518487982c92b1b..1f31bb493d3119da21217e211fa436e5d4b056af 100644 (file)
@@ -1,3 +1,11 @@
+2017-06-22  Martin Liska  <mliska@suse.cz>
+
+       Backport from mainline
+       2017-05-15  Martin Liska  <mliska@suse.cz>
+
+       PR driver/31468
+       * gcc.c (process_command): Do not allow empty argument of -o option.
+
 2017-06-22  Martin Liska  <mliska@suse.cz>
 
        Backport from mainline
index f21987f4d40ebffc8f21f2ec2670dd50ab23ef67..30051020e7f3fcde0eb9f05f7b06ed0c7bf3269a 100644 (file)
--- a/gcc/gcc.c
+++ b/gcc/gcc.c
@@ -4203,6 +4203,9 @@ process_command (unsigned int decoded_options_count,
                       output_file);
     }
 
+  if (output_file != NULL && output_file[0] == '\0')
+    fatal_error (input_location, "output filename may not be empty");
+
   /* If -save-temps=obj and -o name, create the prefix to use for %b.
      Otherwise just make -save-temps=obj the same as -save-temps=cwd.  */
   if (save_temps_flag == SAVE_TEMPS_OBJ && save_temps_prefix != NULL)