This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PATCH: PR driver/47547: WHOPR, can't use /dev/null as an output file


On Mon, Jan 31, 2011 at 11:09 AM, Diego Novillo <dnovillo@google.com> wrote:
> On Mon, Jan 31, 2011 at 14:03, H.J. Lu <hongjiu.lu@intel.com> wrote:
>
>> @@ -392,6 +392,7 @@ run_gcc (unsigned argc, char *argv[])
>> ? if (linker_output)
>> ? ? {
>> ? ? ? char *output_dir, *base, *name;
>> + ? ? ?bool bit_bucket = !strcmp (linker_output, HOST_BIT_BUCKET);
>
> strcmp != 0, please.

Will do.

>
>> --- a/gcc/opts.c
>> +++ b/gcc/opts.c
>> @@ -633,7 +633,8 @@ finish_options (struct gcc_options *opts, struct gcc_options *opts_set,
>> ? ? ? if (opts->x_dump_dir_name)
>> ? ? ? ?opts->x_dump_base_name = concat (opts->x_dump_dir_name,
>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? opts->x_dump_base_name, NULL);
>> - ? ? ?else if (opts->x_aux_base_name)
>> + ? ? ?else if (opts->x_aux_base_name
>> + ? ? ? ? ? ? ?&& strcmp (opts->x_aux_base_name, HOST_BIT_BUCKET))
>
> Likewise.

Will do.

> Could you also add a test for it?
>

I tried and failed. Since testsuite adds "-o xxxx.S", specify
"-o /dev/null" leads to:

Executing on host: /export/build/gnu/gcc/build-x86_64-linux/gcc/xgcc
-B/export/build/gnu/gcc/build-x86_64-linux/gcc/
/export/gnu/import/git/gcc/gcc/testsuite/gcc.dg/pr47547.c   -O2
-fdump-tree-optimized -S -o /dev/null -S  -m32 -o pr47547.s
(timeout = 300)
spawn -ignore SIGHUP /export/build/gnu/gcc/build-x86_64-linux/gcc/xgcc
-B/export/build/gnu/gcc/build-x86_64-linux/gcc/
/export/gnu/import/git/gcc/gcc/testsuite/gcc.dg/pr47547.c -O2
-fdump-tree-optimized -S -o /dev/null -S -m32 -o pr47547.s^M
cc1: error: output filename specified twice^M
compiler exited with status 1
output is:
cc1: error: output filename specified twice^M

FAIL: gcc.dg/pr47547.c (test for excess errors)


-- 
H.J.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]