From: Uros Bizjak Date: Thu, 26 Feb 2015 11:56:45 +0000 (+0100) Subject: gcc-dg.exp (cleanup-final-insns-dump): New procedure. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=948f9b763d00ae77117179edf1980eb40d284326;p=gcc.git gcc-dg.exp (cleanup-final-insns-dump): New procedure. * 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 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 8f88646341c..b1efb2b5bca 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2015-02-26 Uros Bizjak + + * 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 PR target/65161 @@ -209,7 +214,7 @@ 2015-02-19 Maxim Kuvyrkov - * 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 @@ -695,7 +700,7 @@ Brian Rzycki 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 @@ -1437,7 +1442,7 @@ 2015-01-21 Bernd Edlinger - * gcc/testsuite/c-c++-common/tsan/step.c: New testcase. + * c-c++-common/tsan/step.c: New testcase. 2015-01-21 Christophe Lyon diff --git a/gcc/testsuite/g++.dg/opt/dump1.C b/gcc/testsuite/g++.dg/opt/dump1.C index d90061feee2..d263f18e99f 100644 --- a/gcc/testsuite/g++.dg/opt/dump1.C +++ b/gcc/testsuite/g++.dg/opt/dump1.C @@ -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 { diff --git a/gcc/testsuite/lib/gcc-dg.exp b/gcc/testsuite/lib/gcc-dg.exp index 5a9102e0144..4fa433d9954 100644 --- a/gcc/testsuite/lib/gcc-dg.exp +++ b/gcc/testsuite/lib/gcc-dg.exp @@ -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]