Finally committed to gcc-7-branch, sorry for doing this so late. I've merged the
two commits into one. Patch attached for reference.
Best regards,
Thomas
On 05/12/17 21:26, Mike Stump wrote:
On Dec 5, 2017, at 12:56 PM, Thomas Preudhomme <thomas.preudho...@foss.arm.com>
wrote:
Thanks, I've tested after the two commits and it works both in tree and out of
tree. It'll simplify comparing in tree results Vs out of tree for us, thanks a
lot!
Would you consider a backport to stable branches if nobody complains after a
week?
Yeah, back port is Ok.
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index b211dec4ffb20359f50bbc695481977282eb0525..b78c5f59bfc1121cf61071e41bd11551a9ab7122 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,12 @@
+2017-02-27 Thomas Preud'homme <thomas.preudho...@arm.com>
+
+ Backport from mainline
+ 2017-12-05 Matthew Gretton-Dann <matthew.gretton-d...@arm.com>
+ with follow-up r255433 commit.
+
+ * gcc.c-torture/unsorted/dump-noaddr.x: Generate dump files in
+ tmpdir.
+
2018-02-26 Carl Love <c...@us.ibm.com>
Backport from mainline: commit 257747 on 2018-02-16.
diff --git a/gcc/testsuite/gcc.c-torture/unsorted/dump-noaddr.x b/gcc/testsuite/gcc.c-torture/unsorted/dump-noaddr.x
index d14d494570944b2be82c2575204cdbf4b15721ca..e86f36a1861fc4dc46bd449d78403f510ec4b920 100644
--- a/gcc/testsuite/gcc.c-torture/unsorted/dump-noaddr.x
+++ b/gcc/testsuite/gcc.c-torture/unsorted/dump-noaddr.x
@@ -9,14 +9,14 @@ proc dump_compare { src options } {
# loop through all the options
foreach option $option_list {
- file delete -force dump1
- file mkdir dump1
+ file delete -force $tmpdir/dump1
+ file mkdir $tmpdir/dump1
c-torture-compile $src "$option $options -dumpbase dump1/$dumpbase -DMASK=1 -x c --param ggc-min-heapsize=1 -fdump-ipa-all -fdump-rtl-all -fdump-tree-all -fdump-noaddr"
- file delete -force dump2
- file mkdir dump2
+ file delete -force $tmpdir/dump2
+ file mkdir $tmpdir/dump2
c-torture-compile $src "$option $options -dumpbase dump2/$dumpbase -DMASK=2 -x c -fdump-ipa-all -fdump-rtl-all -fdump-tree-all -fdump-noaddr"
- foreach dump1 [lsort [glob -nocomplain dump1/*]] {
- regsub dump1/ $dump1 dump2/ dump2
+ foreach dump1 [lsort [glob -nocomplain $tmpdir/dump1/*]] {
+ set dump2 "$tmpdir/dump2/[file tail $dump1]"
set dumptail "gcc.c-torture/unsorted/[file tail $dump1]"
regsub {\.\d+((t|r|i)\.[^.]+)$} $dumptail {.*\1} dumptail
set tmp [ diff "$dump1" "$dump2" ]
@@ -29,8 +29,8 @@ proc dump_compare { src options } {
}
}
}
- file delete -force dump1
- file delete -force dump2
+ file delete -force $tmpdir/dump1
+ file delete -force $tmpdir/dump2
}
dump_compare $src $options