From: Martin Liska Date: Thu, 22 Jun 2017 11:29:02 +0000 (+0200) Subject: Backport r248060 X-Git-Tag: releases/gcc-5.5.0~193 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0fce4ae689c4032eb57d13eb9e53a97ed4064048;p=thirdparty%2Fgcc.git Backport r248060 2017-06-22 Martin Liska Backport from mainline 2017-05-15 Martin Liska PR driver/31468 * gcc.c (process_command): Do not allow empty argument of -o option. From-SVN: r249534 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 749286afc533..1f31bb493d31 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2017-06-22 Martin Liska + + Backport from mainline + 2017-05-15 Martin Liska + + PR driver/31468 + * gcc.c (process_command): Do not allow empty argument of -o option. + 2017-06-22 Martin Liska Backport from mainline diff --git a/gcc/gcc.c b/gcc/gcc.c index f21987f4d40e..30051020e7f3 100644 --- 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)