Do not allow empty argument of -o option (PR driver/31468).

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: r248060
This commit is contained in:
Martin Liska 2017-05-15 14:48:35 +02:00 committed by Martin Liska
parent 47210a041b
commit 511604823d
2 changed files with 8 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2017-05-15 Martin Liska <mliska@suse.cz>
PR driver/31468
* gcc.c (process_command): Do not allow empty argument of -o option.
2017-05-15 Renlin Li <renlin.li@arm.com>
* config/aarch64/aarch64-protos.h (aarch64_expand_call): Declare.

View File

@ -4478,6 +4478,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)