Hello.

This is fix for old issues which can be still exposed.
Patch can bootstrap on ppc64le-redhat-linux and survives regression tests.

Ready to be installed?
Martin
>From 0cbecc941d9b53de8235d5147ee3891d57af5f49 Mon Sep 17 00:00:00 2001
From: marxin <mli...@suse.cz>
Date: Wed, 3 May 2017 12:16:45 +0200
Subject: [PATCH] Do not allow empty argument of -o option (PR driver/31468).

gcc/ChangeLog:

2017-05-03  Martin Liska  <mli...@suse.cz>

	PR driver/31468
	* gcc.c (process_command): Do not allow empty argument of -o option.
---
 gcc/gcc.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/gcc/gcc.c b/gcc/gcc.c
index 826b012cd77..c68eebea92f 100644
--- a/gcc/gcc.c
+++ b/gcc/gcc.c
@@ -4472,6 +4472,9 @@ process_command (unsigned int decoded_options_count,
 		       output_file);
     }
 
+  if (output_file != NULL && output_file[0] == '\0')
+    fatal_error (input_location, "output file could 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)
-- 
2.12.2

Reply via email to