if-to-switch: Fix test-suite patterns.
authorMartin Liska <mliska@suse.cz>
Tue, 1 Dec 2020 19:38:40 +0000 (20:38 +0100)
committerMartin Liska <mliska@suse.cz>
Tue, 1 Dec 2020 19:53:04 +0000 (20:53 +0100)
gcc/testsuite/ChangeLog:

PR testsuite/98085
* g++.dg/tree-ssa/if-to-switch-1.C: Do not expect precise number
of BBs.
* gcc.dg/tree-ssa/if-to-switch-1.c: Likewise.
* gcc.dg/tree-ssa/if-to-switch-2.c: Likewise. Find better name
for the function.
* gcc.dg/tree-ssa/if-to-switch-3.c: Likewise. Find better name
for the function.
* gcc.dg/tree-ssa/if-to-switch-5.c: Likewise.

gcc/testsuite/g++.dg/tree-ssa/if-to-switch-1.C
gcc/testsuite/gcc.dg/tree-ssa/if-to-switch-1.c
gcc/testsuite/gcc.dg/tree-ssa/if-to-switch-2.c
gcc/testsuite/gcc.dg/tree-ssa/if-to-switch-3.c
gcc/testsuite/gcc.dg/tree-ssa/if-to-switch-5.c

index 88505e8..96c4d57 100644 (file)
@@ -22,4 +22,4 @@ void tree_node() {
   int g = 0;
 }
 
-/* { dg-final { scan-tree-dump "Condition chain with 3 BBs transformed into a switch statement." "iftoswitch" } } */
+/* { dg-final { scan-tree-dump "Condition chain with .* BBs transformed into a switch statement." "iftoswitch" } } */
index 92df4e9..52f92ae 100644 (file)
@@ -32,4 +32,4 @@ int main(int argc, char **argv)
   return 0;
 }
 
-/* { dg-final { scan-tree-dump "Condition chain with 5 BBs transformed into a switch statement." "iftoswitch" } } */
+/* { dg-final { scan-tree-dump "Condition chain with .* BBs transformed into a switch statement." "iftoswitch" } } */
index 36e62ae..c229614 100644 (file)
@@ -1,11 +1,11 @@
 /* { dg-do compile } */
 /* { dg-options "-O2 -fdump-tree-iftoswitch-optimized" } */
 
-int IsHTMLWhitespaceNoRange(int aChar)
+int isMyRandomCharacter(int aChar)
 {
   return aChar == 0x0001 || aChar == 0x000A ||
          aChar == 0x000C || aChar == 0x000E ||
          aChar == 0x0020;
 }
 
-/* { dg-final { scan-tree-dump "Condition chain with 3 BBs transformed into a switch statement." "iftoswitch" } } */
+/* { dg-final { scan-tree-dump "Condition chain with .* BBs transformed into a switch statement." "iftoswitch" } } */
index 9a4ce16..4c7253c 100644 (file)
@@ -1,11 +1,11 @@
 /* { dg-do compile } */
 /* { dg-options "-O2 -fdump-tree-iftoswitch-optimized" } */
 
-int IsHTMLWhitespace(int aChar)
+int IsMySuperRandomChar(int aChar)
 {
   return aChar == 0x0009 || aChar == 0x000A ||
          aChar == 0x000C || aChar == 0x000D ||
          aChar == 0x0020 || aChar == 0x0030;
 }
 
-/* { dg-final { scan-tree-dump "Condition chain with 3 BBs transformed into a switch statement." "iftoswitch" } } */
+/* { dg-final { scan-tree-dump "Condition chain with .* BBs transformed into a switch statement." "iftoswitch" } } */
index 7734a58..43b0f31 100644 (file)
@@ -9,4 +9,4 @@ int crud (unsigned char c)
           || (int) c == 39) != 0);
 }
 
-/* { dg-final { scan-tree-dump "Condition chain with 5 BBs transformed into a switch statement." "iftoswitch" } } */
+/* { dg-final { scan-tree-dump "Condition chain with .* BBs transformed into a switch statement." "iftoswitch" } } */