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

Diego Novillo dnovillo@google.com
Mon Jan 31 21:41:00 GMT 2011


On Mon, Jan 31, 2011 at 15:22, H.J. Lu <hjl.tools@gmail.com> wrote:

> In the meantime, is that OK without a testcase?

I'd rather have a testcase, since it doesn't really seem all that
hard.  Could you check if this does what I think it should?


Thanks.  Diego.


Index: testsuite/lib/lto.exp
===================================================================
--- testsuite/lib/lto.exp       (revision 168468)
+++ testsuite/lib/lto.exp       (working copy)
@@ -295,6 +295,8 @@ proc lto-get-options-main { src } {
                set compile_type "run"
            } elseif { ![string compare "link" $dgdo] } {
                set compile_type "link"
+           } elseif { ![string compare "compile-null" $dgdo] } {
+               set compile_type "compile-null"
            } else {
                warning "lto.exp does not support dg-lto-do $dgdo"
            }
Index: testsuite/lib/gcc-dg.exp
===================================================================
--- testsuite/lib/gcc-dg.exp    (revision 168468)
+++ testsuite/lib/gcc-dg.exp    (working copy)
@@ -114,6 +114,10 @@ proc gcc-dg-test-1 { target_compile prog
            set compile_type "assembly"
            set output_file "[file rootname [file tail $prog]].s"
        }
+       "compile-null" {
+           set compile_type "assembly"
+           set output_file "/dev/null"
+       }
        "assemble" {
            set compile_type "object"
            set output_file "[file rootname [file tail $prog]].o"



More information about the Gcc-patches mailing list