From 8ee81b4d275bac80210cc39bb8c93e1f73e1f307 Mon Sep 17 00:00:00 2001 From: Olivier Hainque Date: Mon, 30 Dec 2019 22:28:18 +0000 Subject: [PATCH] allow $ in scan-tree-dump expressions matching symbol names This change adjusts a few scan-tree-dump expressions to allow '$' as well as '.' when matching symbol names, This improves results on VxWorks targets configured with: #undef NO_DOLLAR_IN_LABEL #define NO_DOT_IN_LABEL 2019-12-20 Olivier Hainque Jerome Lambourg * c-c++-common/pr56493.c: Allow '$' in addition to '.' scan-tree-dump expressions matching symbol names. * gcc.dg/tree-ssa/sra-17.c: Likewise. * gcc.dg/tree-ssa/sra-18.c: Likewise. Co-Authored-By: Jerome Lambourg From-SVN: r279794 --- gcc/testsuite/ChangeLog | 8 ++++++++ gcc/testsuite/c-c++-common/pr56493.c | 2 +- gcc/testsuite/gcc.dg/tree-ssa/sra-17.c | 2 +- gcc/testsuite/gcc.dg/tree-ssa/sra-18.c | 8 ++++---- 4 files changed, 14 insertions(+), 6 deletions(-) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index dd51f671d8d..d894655c843 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,11 @@ +2019-12-20 Olivier Hainque + Jerome Lambourg + + * c-c++-common/pr56493.c: Allow '$' in addition to '.' + scan-tree-dump expressions matching symbol names. + * gcc.dg/tree-ssa/sra-17.c: Likewise. + * gcc.dg/tree-ssa/sra-18.c: Likewise. + 2019-12-30 Joel Brobecker Olivier Hainque diff --git a/gcc/testsuite/c-c++-common/pr56493.c b/gcc/testsuite/c-c++-common/pr56493.c index aa7f6f4fc25..bc9928da941 100644 --- a/gcc/testsuite/c-c++-common/pr56493.c +++ b/gcc/testsuite/c-c++-common/pr56493.c @@ -12,4 +12,4 @@ foo (void) } /* Verify we narrow the addition from unsigned long long to unsigned int type. */ -/* { dg-final { scan-tree-dump " (\[a-zA-Z._0-9]*) = \\(unsigned int\\) \[^;\n\r]*;.* (\[a-zA-Z._0-9]*) = \\(unsigned int\\) \[^;\n\r]*;.* = \\1 \\+ \\2;" "gimple" { target { ilp32 || lp64 } } } } */ +/* { dg-final { scan-tree-dump " (\[a-zA-Z._0-9$]*) = \\(unsigned int\\) \[^;\n\r]*;.* (\[a-zA-Z._0-9$]*) = \\(unsigned int\\) \[^;\n\r]*;.* = \\1 \\+ \\2;" "gimple" { target { ilp32 || lp64 } } } } */ diff --git a/gcc/testsuite/gcc.dg/tree-ssa/sra-17.c b/gcc/testsuite/gcc.dg/tree-ssa/sra-17.c index a66344b5f33..221d96b6cd9 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/sra-17.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/sra-17.c @@ -17,4 +17,4 @@ main (int argc, char **argv) } /* { dg-final { scan-tree-dump-times "Removing load: a = \\\*.?L.?C.?.?.?0;" 1 "esra" } } */ -/* { dg-final { scan-tree-dump-times "SR\\.\[0-9_\]+ = \\\*.?L.?C.?.?.?0\\\[" 4 "esra" } } */ +/* { dg-final { scan-tree-dump-times "SR\[.$\]\[0-9_\]+ = \\\*.?L.?C.?.?.?0\\\[" 4 "esra" } } */ diff --git a/gcc/testsuite/gcc.dg/tree-ssa/sra-18.c b/gcc/testsuite/gcc.dg/tree-ssa/sra-18.c index 47fa204390e..f5e6a21c2ae 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/sra-18.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/sra-18.c @@ -23,7 +23,7 @@ main (int argc, char **argv) } /* { dg-final { scan-tree-dump-times "Removing load: a = \\\*.?L.?C.?.?.?0;" 1 "esra" } } */ -/* { dg-final { scan-tree-dump-times "SR\\.\[0-9_\]+ = \\\*.?L.?C.?.?.?0\\.b\\\[0\\\]\\.f\\\[0\\\]\\.x" 1 "esra" } } */ -/* { dg-final { scan-tree-dump-times "SR\\.\[0-9_\]+ = \\\*.?L.?C.?.?.?0\\.b\\\[0\\\]\\.f\\\[1\\\]\\.x" 1 "esra" } } */ -/* { dg-final { scan-tree-dump-times "SR\\.\[0-9_\]+ = \\\*.?L.?C.?.?.?0\\.b\\\[1\\\]\\.f\\\[0\\\]\\.x" 1 "esra" } } */ -/* { dg-final { scan-tree-dump-times "SR\\.\[0-9_\]+ = \\\*.?L.?C.?.?.?0\\.b\\\[1\\\]\\.f\\\[1\\\]\\.x" 1 "esra" } } */ +/* { dg-final { scan-tree-dump-times "SR\[.$\]\[0-9_\]+ = \\\*.?L.?C.?.?.?0\\.b\\\[0\\\]\\.f\\\[0\\\]\\.x" 1 "esra" } } */ +/* { dg-final { scan-tree-dump-times "SR\[.$\]\[0-9_\]+ = \\\*.?L.?C.?.?.?0\\.b\\\[0\\\]\\.f\\\[1\\\]\\.x" 1 "esra" } } */ +/* { dg-final { scan-tree-dump-times "SR\[.$\]\[0-9_\]+ = \\\*.?L.?C.?.?.?0\\.b\\\[1\\\]\\.f\\\[0\\\]\\.x" 1 "esra" } } */ +/* { dg-final { scan-tree-dump-times "SR\[.$\]\[0-9_\]+ = \\\*.?L.?C.?.?.?0\\.b\\\[1\\\]\\.f\\\[1\\\]\\.x" 1 "esra" } } */ -- 2.30.2