gcc-dg.exp (cleanup-final-insns-dump): New procedure.
authorUros Bizjak <uros@gcc.gnu.org>
Thu, 26 Feb 2015 11:56:45 +0000 (12:56 +0100)
committerUros Bizjak <uros@gcc.gnu.org>
Thu, 26 Feb 2015 11:56:45 +0000 (12:56 +0100)
* lib/gcc-dg.exp (cleanup-final-insns-dump): New procedure.
* g++.dg/opt/dump1.C (dg-final): Call cleanup-final-insns-dump.

From-SVN: r221004

gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/opt/dump1.C
gcc/testsuite/lib/gcc-dg.exp

index 8f88646341cdf932e01610a27051f50a7d1888d9..b1efb2b5bca1a2deb96395e15978e9f75aa211ce 100644 (file)
@@ -1,3 +1,8 @@
+2015-02-26  Uros Bizjak  <ubizjak@gmail.com>
+
+       * lib/gcc-dg.exp (cleanup-final-insns-dump): New procedure.
+       * g++.dg/opt/dump1.C (dg-final): Call cleanup-final-insns-dump.
+
 2015-02-26  Yuri Rumyantsev  <ysrumyan@gmail.com>
 
        PR target/65161
 
 2015-02-19  Maxim Kuvyrkov  <maxim.kuvyrkov@linaro.org>
 
-       * testsuite/lib/target-supports.exp (check_compile): Save/restore
+       * lib/target-supports.exp (check_compile): Save/restore
        additional_sources that may belong to an actual test.
 
 2015-02-18  Jakub Jelinek  <jakub@redhat.com>
            Brian Rzycki  <b.rzycki@samsung.com>
 
        PR tree-optimization/64878
-       * testsuite/gcc.dg/tree-ssa/ssa-dom-thread-8.c: New.
+       * gcc.dg/tree-ssa/ssa-dom-thread-8.c: New.
 
 2015-02-06  Jakub Jelinek  <jakub@redhat.com>
 
 
 2015-01-21  Bernd Edlinger  <bernd.edlinger@hotmail.de>
 
-       * gcc/testsuite/c-c++-common/tsan/step.c: New testcase.
+       * c-c++-common/tsan/step.c: New testcase.
 
 2015-01-21  Christophe Lyon  <christophe.lyon@linaro.org>
 
index d90061feee2f4b918f51171eb7aa946e6f25fc4b..d263f18e99fd848abfe6e1b1fdeaa74b1d00fddf 100644 (file)
@@ -1,7 +1,7 @@
 // PR c++/57102
 // { dg-options "-O2 -fno-inline -fdump-final-insns" }
 // { dg-do compile { target c++11 } }
-// { dg-final cleanup-saved-temps }
+// { dg-final cleanup-final-insns-dump }
 
 namespace std
 {
index 5a9102e014407e0c76e63eff22107715da40f98b..4fa433d9954193907ffe13f64649aacfb5e22a5e 100644 (file)
@@ -548,6 +548,21 @@ proc cleanup-ipa-dump { suffix } {
   cleanup-dump "\[0-9\]\[0-9\]\[0-9\]i.$suffix"
 }
 
+# Remove a final insns dump file for the current test.
+proc cleanup-final-insns-dump { } {
+    set testcase [testname-for-summary]
+    # The name might include a list of options; extract the file name.
+    set testcase [lindex $testcase 0]
+    remove-build-file "[file rootname [file tail $testcase]].s.gkd"
+
+    # Clean up files for additional source files.
+    if [info exists additional_sources_used] {
+       foreach srcfile $additional_sources_used {
+           remove-build-file "[file rootname [file tail $srcfile]].s.gkd"
+       }
+    }
+}
+
 # Remove a stack usage file for the current test.
 proc cleanup-stack-usage { } {
     set testcase [testname-for-summary]