From 14b5d8ec2b97b2872e17a78fd9be745e0781560c Mon Sep 17 00:00:00 2001 From: Matthew Gretton-Dann Date: Tue, 5 Dec 2017 19:16:52 +0000 Subject: [PATCH] dump-noaddr.x: Generate dump files in tmpdir. 2017-12-05 Matthew Gretton-Dann * gcc.c-torture/unsorted/dump-noaddr.x: Generate dump files in tmpdir. From-SVN: r255432 --- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/gcc.c-torture/unsorted/dump-noaddr.x | 20 ++++++++++---------- 2 files changed, 15 insertions(+), 10 deletions(-) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 58a4c00..983bcd8 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2017-12-05 Matthew Gretton-Dann + + * gcc.c-torture/unsorted/dump-noaddr.x: Generate dump files in + tmpdir. + 2017-12-05 Nathan Sidwell PR c++/83287 diff --git a/gcc/testsuite/gcc.c-torture/unsorted/dump-noaddr.x b/gcc/testsuite/gcc.c-torture/unsorted/dump-noaddr.x index d14d494..c70741d 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 - 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 - 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 + file delete -force $tmpdir/dump1 + file mkdir $tmpdir/dump1 + c-torture-compile $src "$option $options -dumpbase $tmpdir/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 $tmpdir/dump2 + file mkdir $tmpdir/dump2 + c-torture-compile $src "$option $options -dumpbase $tmpdir/dump2/$dumpbase -DMASK=2 -x c -fdump-ipa-all -fdump-rtl-all -fdump-tree-all -fdump-noaddr" + 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 -- 2.7.4