Add dot-file scans to pr70161.c
authorTom de Vries <tom@codesourcery.com>
Mon, 18 Apr 2016 08:53:41 +0000 (08:53 +0000)
committerTom de Vries <vries@gcc.gnu.org>
Mon, 18 Apr 2016 08:53:41 +0000 (08:53 +0000)
2016-04-18  Tom de Vries  <tom@codesourcery.com>

PR testsuite/70699
* gcc.dg/pr70161.c: Add dot-file scans.
* lib/scandump.exp (dump-suffix): Return suffix after first dot char,
instead of after last dot char.

From-SVN: r235095

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/pr70161.c
gcc/testsuite/lib/scandump.exp

index 8f16407c5d69c8fc92cfab11a09170c43d899b78..582d5873937fd5e84a8ece89b78c691ae1fc438b 100644 (file)
@@ -1,3 +1,10 @@
+2016-04-18  Tom de Vries  <tom@codesourcery.com>
+
+       PR testsuite/70699
+       * gcc.dg/pr70161.c: Add dot-file scans.
+       * lib/scandump.exp (dump-suffix): Return suffix after first dot char,
+       instead of after last dot char.
+
 2016-04-17  Eric Botcazou  <ebotcazou@adacore.com>
 
        * c-c++-common/dump-ada-spec-3.c: New test.
index 0b173c7ee9d48df34fe869f49dda3fc0ccdb2f19..9b77d90b80817e87ce8f855e702dd451df6c1de3 100644 (file)
@@ -5,3 +5,6 @@ void
 foo (void)
 {
 }
+
+/* { dg-final { scan-ipa-dump-times "subgraph" 1 "inline.dot" } } */
+/* { dg-final { scan-ipa-dump-times "subgraph" 1 "cp.dot" } } */
index 74d27cc32ec2d4184d7d1d3def0d59282bdfaa88..89b3944c71b32443327de5ad13e45dc616ed0904 100644 (file)
@@ -22,7 +22,7 @@
 # Extract the constant part of the dump file suffix from the regexp.
 # Argument 0 is the regular expression.
 proc dump-suffix { arg } {
-    set idx [expr [string last "." $arg] + 1]
+    set idx [expr [string first "." $arg] + 1]
     return [string range $arg $idx end]
 }