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 8f16407..582d587 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 0b173c7..9b77d90 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 74d27cc..89b3944 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]
 }