https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63837
Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jakub at gcc dot gnu.org --- Comment #12 from Jakub Jelinek <jakub at gcc dot gnu.org> --- (In reply to Manuel López-Ibáñez from comment #6) > Index: gcc.c > =================================================================== > --- gcc.c (revision 217457) > +++ gcc.c (working copy) > @@ -4047,11 +4047,12 @@ process_command (unsigned int decoded_op > read_cmdline_option (&global_options, &global_options_set, > decoded_options + j, UNKNOWN_LOCATION, > CL_DRIVER, &handlers, global_dc); > } > > - if (output_file && strcmp (output_file, "-")) > + if (output_file && strcmp (output_file, "-") > + && strcmp (output_file, HOST_BIT_BUCKET)) > { > int i; > for (i = 0; i < n_infiles; i++) > if ((!infiles[i].language || infiles[i].language[0] != '*') > && canonical_filename_eq (infiles[i].name, output_file)) > Index: toplev.c > =================================================================== > --- toplev.c (revision 217457) > +++ toplev.c (working copy) > @@ -940,11 +940,12 @@ init_asm_output (const char *name) > strcat (dumpname, ".s"); > asm_file_name = dumpname; > } > if (!strcmp (asm_file_name, "-")) > asm_out_file = stdout; > - else if (!canonical_filename_eq (asm_file_name, name)) > + else if (!canonical_filename_eq (asm_file_name, name) > + || !strcmp (asm_file_name, HOST_BIT_BUCKET)) > asm_out_file = fopen (asm_file_name, "w"); > else > /* Use fatal_error (UNKOWN_LOCATION) instead of just fatal_error to > prevent gcc from printing the first line in the current file. */ > fatal_error (UNKNOWN_LOCATION, > > If you can test it on your side, it would be helpful. Preapproved with proper ChangeLog entry.