diff options
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/doc/invoke.texi | 3 | ||||
-rw-r--r-- | gcc/gcc.c | 3 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/devnull-dump.c | 7 |
3 files changed, 11 insertions, 2 deletions
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index 1b02ea0..49c8bef 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -1880,7 +1880,8 @@ named @file{dir/bar.*}, combining the given @var{dumppfx} with the default @var{dumpbase} derived from the primary output name. Dump outputs also take the input name suffix: @file{dir/bar.c.*}. -It defaults to the location of the output file; options +It defaults to the location of the output file, unless the output +file is a special file like @code{/dev/null}. Options @option{-save-temps=cwd} and @option{-save-temps=obj} override this default, just like an explicit @option{-dumpdir} option. In case multiple such options are given, the last one prevails: @@ -5098,7 +5098,8 @@ process_command (unsigned int decoded_options_count, bool explicit_dumpdir = dumpdir; - if (!save_temps_overrides_dumpdir && explicit_dumpdir) + if ((!save_temps_overrides_dumpdir && explicit_dumpdir) + || (output_file && not_actual_file_p (output_file))) { /* Do nothing. */ } diff --git a/gcc/testsuite/gcc.dg/devnull-dump.c b/gcc/testsuite/gcc.dg/devnull-dump.c new file mode 100644 index 0000000..378e090 --- /dev/null +++ b/gcc/testsuite/gcc.dg/devnull-dump.c @@ -0,0 +1,7 @@ +/* { dg-do assemble } */ +/* { dg-options "-fdump-ipa-clones -o /dev/null" } */ + +int main() +{ + return 0; +} |