Skip to content

Commit 30804d3

Browse files
author
thk123
committed
Swap to using an unorded set
Modified the tests to not assume the order of the functions. For precise tests no further changes are required since if the removal failed, there will be a label before the call to be jumped to. For the no-match tests, no further changes are required since the goto statements are being verified to be all the there. For the approx tests, we need to verify that the other case statements aren't present in the GOTO program to be sure that the FP removal has been successful. As such, the other case statements are added to the exclude section.
1 parent ad05db6 commit 30804d3

File tree

28 files changed

+246
-202
lines changed
  • regression/goto-analyzer
    • approx-array-variable-const-fp
    • approx-const-fp-array-variable-cast-const-fp
    • approx-const-fp-array-variable-const-fp
    • approx-const-fp-array-variable-const-fp-with-null
    • approx-const-fp-array-variable-const-pointer-const-struct-non-const-fp
    • approx-const-fp-array-variable-const-struct-non-const-fp
    • approx-const-fp-array-variable-invalid-cast-const-fp
    • no-match-const-fp-array-literal-const-fp-run-time
    • no-match-const-fp-array-literal-non-const-fp
    • no-match-const-fp-array-literal-non-const-fp-run-time
    • no-match-const-fp-array-non-const-fp
    • no-match-const-fp-const-pointer-non-const-struct-const-fp
    • no-match-const-fp-dereference-non-const-pointer-const-fp
    • no-match-const-fp-dynamic-array-non-const-fp
    • no-match-const-fp-non-const-fp-direct-assignment
    • no-match-const-fp-non-const-pointer-non-const-struct-const-fp
    • no-match-const-fp-non-const-struct-const-fp
    • no-match-const-fp-non-const-struct-non-const-fp
    • no-match-const-pointer-non-const-struct-const-fp
    • no-match-dereference-const-pointer-const-array-literal-pointer-const-fp
    • no-match-dereference-non-const-struct-const-pointer-const-fp
    • no-match-dereference-non-const-struct-non-const-pointer-const-fp
    • no-match-non-const-fp
    • no-match-non-const-fp-const-fp-direct-assignment
    • no-match-parameter-const-fp
    • no-match-parameter-fp
    • no-match-pointer-const-struct-array-literal-non-const-fp
  • src/goto-programs

28 files changed

+246
-202
lines changed

regression/goto-analyzer/approx-array-variable-const-fp/test.desc

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,15 @@ main.c
33
--show-goto-functions --verbosity 10 --pointer-check
44

55
^Removing function pointers and virtual functions$
6-
^\s*IF fp_tbl\[(signed long int)i\] == f2 THEN GOTO 1$
7-
^\s*IF fp_tbl\[(signed long int)i\] == f3 THEN GOTO 2$
8-
^\s*IF fp_tbl\[(signed long int)i\] == f4 THEN GOTO 3$
6+
^\s*IF fp_tbl\[(signed long int)i\] == f2 THEN GOTO [0-9]$
7+
^\s*IF fp_tbl\[(signed long int)i\] == f3 THEN GOTO [0-9]$
8+
^\s*IF fp_tbl\[(signed long int)i\] == f4 THEN GOTO [0-9]$
99
^SIGNAL=0$
1010
--
11+
^\s*IF fp_tbl\[(signed long int)i\] == f1 THEN GOTO [0-9]$
12+
^\s*IF fp_tbl\[(signed long int)i\] == f5 THEN GOTO [0-9]$
13+
^\s*IF fp_tbl\[(signed long int)i\] == f6 THEN GOTO [0-9]$
14+
^\s*IF fp_tbl\[(signed long int)i\] == f7 THEN GOTO [0-9]$
15+
^\s*IF fp_tbl\[(signed long int)i\] == f8 THEN GOTO [0-9]$
16+
^\s*IF fp_tbl\[(signed long int)i\] == f9 THEN GOTO [0-9]$
1117
^warning: ignoring

regression/goto-analyzer/approx-const-fp-array-variable-cast-const-fp/test.desc

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,15 @@ main.c
33
--show-goto-functions --verbosity 10 --pointer-check
44

55
^Removing function pointers and virtual functions$
6-
^\s*IF fp == f2 THEN GOTO 1$
7-
^\s*IF fp == f3 THEN GOTO 2$
8-
^\s*IF fp == f4 THEN GOTO 3$
6+
^\s*IF fp == f2 THEN GOTO [0-9]$
7+
^\s*IF fp == f3 THEN GOTO [0-9]$
8+
^\s*IF fp == f4 THEN GOTO [0-9]$
99
^SIGNAL=0$
1010
--
1111
^warning: ignoring
12+
^\s*IF fp_tbl\[(signed long int)i\] == f1 THEN GOTO [0-9]$
13+
^\s*IF fp_tbl\[(signed long int)i\] == f5 THEN GOTO [0-9]$
14+
^\s*IF fp_tbl\[(signed long int)i\] == f6 THEN GOTO [0-9]$
15+
^\s*IF fp_tbl\[(signed long int)i\] == f7 THEN GOTO [0-9]$
16+
^\s*IF fp_tbl\[(signed long int)i\] == f8 THEN GOTO [0-9]$
17+
^\s*IF fp_tbl\[(signed long int)i\] == f9 THEN GOTO [0-9]$

regression/goto-analyzer/approx-const-fp-array-variable-const-fp-with-null/test.desc

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,15 @@ main.c
33
--show-goto-functions --verbosity 10 --pointer-check
44

55
^Removing function pointers and virtual functions$
6-
^\s*IF fp == f2 THEN GOTO 1$
7-
^\s*IF fp == f3 THEN GOTO 2$
8-
^\s*IF fp == f4 THEN GOTO 3$
6+
^\s*IF fp == f2 THEN GOTO [0-9]$
7+
^\s*IF fp == f3 THEN GOTO [0-9]$
8+
^\s*IF fp == f4 THEN GOTO [0-9]$
99
^SIGNAL=0$
1010
--
1111
^warning: ignoring
12+
^\s*IF fp_tbl\[(signed long int)i\] == f1 THEN GOTO [0-9]$
13+
^\s*IF fp_tbl\[(signed long int)i\] == f5 THEN GOTO [0-9]$
14+
^\s*IF fp_tbl\[(signed long int)i\] == f6 THEN GOTO [0-9]$
15+
^\s*IF fp_tbl\[(signed long int)i\] == f7 THEN GOTO [0-9]$
16+
^\s*IF fp_tbl\[(signed long int)i\] == f8 THEN GOTO [0-9]$
17+
^\s*IF fp_tbl\[(signed long int)i\] == f9 THEN GOTO [0-9]$

regression/goto-analyzer/approx-const-fp-array-variable-const-fp/test.desc

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,15 @@ main.c
33
--show-goto-functions --verbosity 10 --pointer-check
44

55
^Removing function pointers and virtual functions$
6-
^\s*IF fp == f2 THEN GOTO 1$
7-
^\s*IF fp == f3 THEN GOTO 2$
8-
^\s*IF fp == f4 THEN GOTO 3$
6+
^\s*IF fp == f2 THEN GOTO [0-9]$
7+
^\s*IF fp == f3 THEN GOTO [0-9]$
8+
^\s*IF fp == f4 THEN GOTO [0-9]$
99
^SIGNAL=0$
1010
--
1111
^warning: ignoring
12+
^\s*IF fp_tbl\[(signed long int)i\] == f1 THEN GOTO [0-9]$
13+
^\s*IF fp_tbl\[(signed long int)i\] == f5 THEN GOTO [0-9]$
14+
^\s*IF fp_tbl\[(signed long int)i\] == f6 THEN GOTO [0-9]$
15+
^\s*IF fp_tbl\[(signed long int)i\] == f7 THEN GOTO [0-9]$
16+
^\s*IF fp_tbl\[(signed long int)i\] == f8 THEN GOTO [0-9]$
17+
^\s*IF fp_tbl\[(signed long int)i\] == f9 THEN GOTO [0-9]$

regression/goto-analyzer/approx-const-fp-array-variable-const-pointer-const-struct-non-const-fp/test.desc

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,15 @@ main.c
33
--show-goto-functions --verbosity 10 --pointer-check
44

55
^Removing function pointers and virtual functions$
6-
^\s*IF fp == f2 THEN GOTO 1$
7-
^\s*IF fp == f3 THEN GOTO 2$
8-
^\s*IF fp == f4 THEN GOTO 3$
6+
^\s*IF fp == f2 THEN GOTO [0-9]$
7+
^\s*IF fp == f3 THEN GOTO [0-9]$
8+
^\s*IF fp == f4 THEN GOTO [0-9]$
99
^SIGNAL=0$
1010
--
1111
^warning: ignoring
12+
^\s*IF fp_tbl\[(signed long int)i\] == f1 THEN GOTO [0-9]$
13+
^\s*IF fp_tbl\[(signed long int)i\] == f5 THEN GOTO [0-9]$
14+
^\s*IF fp_tbl\[(signed long int)i\] == f6 THEN GOTO [0-9]$
15+
^\s*IF fp_tbl\[(signed long int)i\] == f7 THEN GOTO [0-9]$
16+
^\s*IF fp_tbl\[(signed long int)i\] == f8 THEN GOTO [0-9]$
17+
^\s*IF fp_tbl\[(signed long int)i\] == f9 THEN GOTO [0-9]$

regression/goto-analyzer/approx-const-fp-array-variable-const-struct-non-const-fp/test.desc

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,15 @@ main.c
33
--show-goto-functions --verbosity 10 --pointer-check
44

55
^Removing function pointers and virtual functions$
6-
^\s*IF fp == f2 THEN GOTO 1$
7-
^\s*IF fp == f3 THEN GOTO 2$
8-
^\s*IF fp == f4 THEN GOTO 3$
6+
^\s*IF fp == f2 THEN GOTO [0-9]$
7+
^\s*IF fp == f3 THEN GOTO [0-9]$
8+
^\s*IF fp == f4 THEN GOTO [0-9]$
99
^SIGNAL=0$
1010
--
1111
^warning: ignoring
12+
^\s*IF fp_tbl\[(signed long int)i\] == f1 THEN GOTO [0-9]$
13+
^\s*IF fp_tbl\[(signed long int)i\] == f5 THEN GOTO [0-9]$
14+
^\s*IF fp_tbl\[(signed long int)i\] == f6 THEN GOTO [0-9]$
15+
^\s*IF fp_tbl\[(signed long int)i\] == f7 THEN GOTO [0-9]$
16+
^\s*IF fp_tbl\[(signed long int)i\] == f8 THEN GOTO [0-9]$
17+
^\s*IF fp_tbl\[(signed long int)i\] == f9 THEN GOTO [0-9]$

regression/goto-analyzer/approx-const-fp-array-variable-invalid-cast-const-fp/test.desc

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,15 @@ main.c
33
--show-goto-functions --verbosity 10 --pointer-check
44

55
^Removing function pointers and virtual functions$
6-
^\s*IF fp == (void (\*)(void))f2 THEN GOTO 1$
7-
^\s*IF fp == (void (\*)(void))f3 THEN GOTO 2$
8-
^\s*IF fp == (void (\*)(void))f4 THEN GOTO 3$
6+
^\s*IF fp == (void (\*)(void))f2 THEN GOTO [0-9]$
7+
^\s*IF fp == (void (\*)(void))f3 THEN GOTO [0-9]$
8+
^\s*IF fp == (void (\*)(void))f4 THEN GOTO [0-9]$
99
^SIGNAL=0$
1010
--
1111
^warning: ignoring
12+
^\s*IF fp_tbl\[(signed long int)i\] == f1 THEN GOTO [0-9]$
13+
^\s*IF fp_tbl\[(signed long int)i\] == f5 THEN GOTO [0-9]$
14+
^\s*IF fp_tbl\[(signed long int)i\] == f6 THEN GOTO [0-9]$
15+
^\s*IF fp_tbl\[(signed long int)i\] == f7 THEN GOTO [0-9]$
16+
^\s*IF fp_tbl\[(signed long int)i\] == f8 THEN GOTO [0-9]$
17+
^\s*IF fp_tbl\[(signed long int)i\] == f9 THEN GOTO [0-9]$

regression/goto-analyzer/no-match-const-fp-array-literal-const-fp-run-time/test.desc

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@ main.c
33
--show-goto-functions --verbosity 10 --pointer-check
44

55
^Removing function pointers and virtual functions$
6-
^\s*IF fp == f1 THEN GOTO 1$
7-
^\s*IF fp == f2 THEN GOTO 2$
8-
^\s*IF fp == f3 THEN GOTO 3$
9-
^\s*IF fp == f4 THEN GOTO 4$
10-
^\s*IF fp == f5 THEN GOTO 5$
11-
^\s*IF fp == f6 THEN GOTO 6$
12-
^\s*IF fp == f7 THEN GOTO 7$
13-
^\s*IF fp == f8 THEN GOTO 8$
14-
^\s*IF fp == f9 THEN GOTO 9$
6+
^\s*IF fp == f1 THEN GOTO [0-9]$
7+
^\s*IF fp == f2 THEN GOTO [0-9]$
8+
^\s*IF fp == f3 THEN GOTO [0-9]$
9+
^\s*IF fp == f4 THEN GOTO [0-9]$
10+
^\s*IF fp == f5 THEN GOTO [0-9]$
11+
^\s*IF fp == f6 THEN GOTO [0-9]$
12+
^\s*IF fp == f7 THEN GOTO [0-9]$
13+
^\s*IF fp == f8 THEN GOTO [0-9]$
14+
^\s*IF fp == f9 THEN GOTO [0-9]$
1515
^SIGNAL=0$
1616
--
1717
^warning: ignoring

regression/goto-analyzer/no-match-const-fp-array-literal-non-const-fp-run-time/test.desc

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@ main.c
33
--show-goto-functions --verbosity 10 --pointer-check
44

55
^Removing function pointers and virtual functions$
6-
^\s*IF fp == f1 THEN GOTO 1$
7-
^\s*IF fp == f2 THEN GOTO 2$
8-
^\s*IF fp == f3 THEN GOTO 3$
9-
^\s*IF fp == f4 THEN GOTO 4$
10-
^\s*IF fp == f5 THEN GOTO 5$
11-
^\s*IF fp == f6 THEN GOTO 6$
12-
^\s*IF fp == f7 THEN GOTO 7$
13-
^\s*IF fp == f8 THEN GOTO 8$
14-
^\s*IF fp == f9 THEN GOTO 9$
6+
^\s*IF fp == f1 THEN GOTO [0-9]$
7+
^\s*IF fp == f2 THEN GOTO [0-9]$
8+
^\s*IF fp == f3 THEN GOTO [0-9]$
9+
^\s*IF fp == f4 THEN GOTO [0-9]$
10+
^\s*IF fp == f5 THEN GOTO [0-9]$
11+
^\s*IF fp == f6 THEN GOTO [0-9]$
12+
^\s*IF fp == f7 THEN GOTO [0-9]$
13+
^\s*IF fp == f8 THEN GOTO [0-9]$
14+
^\s*IF fp == f9 THEN GOTO [0-9]$
1515
^SIGNAL=0$
1616
--
1717
^warning: ignoring

regression/goto-analyzer/no-match-const-fp-array-literal-non-const-fp/test.desc

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@ main.c
33
--show-goto-functions --verbosity 10 --pointer-check
44

55
^Removing function pointers and virtual functions$
6-
^\s*IF fp2 == f1 THEN GOTO 1$
7-
^\s*IF fp2 == f2 THEN GOTO 2$
8-
^\s*IF fp2 == f3 THEN GOTO 3$
9-
^\s*IF fp2 == f4 THEN GOTO 4$
10-
^\s*IF fp2 == f5 THEN GOTO 5$
11-
^\s*IF fp2 == f6 THEN GOTO 6$
12-
^\s*IF fp2 == f7 THEN GOTO 7$
13-
^\s*IF fp2 == f8 THEN GOTO 8$
14-
^\s*IF fp2 == f9 THEN GOTO 9$
6+
^\s*IF fp2 == f1 THEN GOTO [0-9]$
7+
^\s*IF fp2 == f2 THEN GOTO [0-9]$
8+
^\s*IF fp2 == f3 THEN GOTO [0-9]$
9+
^\s*IF fp2 == f4 THEN GOTO [0-9]$
10+
^\s*IF fp2 == f5 THEN GOTO [0-9]$
11+
^\s*IF fp2 == f6 THEN GOTO [0-9]$
12+
^\s*IF fp2 == f7 THEN GOTO [0-9]$
13+
^\s*IF fp2 == f8 THEN GOTO [0-9]$
14+
^\s*IF fp2 == f9 THEN GOTO [0-9]$
1515
^SIGNAL=0$
1616
--
1717
^warning: ignoring

regression/goto-analyzer/no-match-const-fp-array-non-const-fp/test.desc

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@ main.c
33
--show-goto-functions --verbosity 10 --pointer-check
44

55
^Removing function pointers and virtual functions$
6-
^\s*IF fp2 == f1 THEN GOTO 1$
7-
^\s*IF fp2 == f2 THEN GOTO 2$
8-
^\s*IF fp2 == f3 THEN GOTO 3$
9-
^\s*IF fp2 == f4 THEN GOTO 4$
10-
^\s*IF fp2 == f5 THEN GOTO 5$
11-
^\s*IF fp2 == f6 THEN GOTO 6$
12-
^\s*IF fp2 == f7 THEN GOTO 7$
13-
^\s*IF fp2 == f8 THEN GOTO 8$
14-
^\s*IF fp2 == f9 THEN GOTO 9$
6+
^\s*IF fp2 == f1 THEN GOTO [0-9]$
7+
^\s*IF fp2 == f2 THEN GOTO [0-9]$
8+
^\s*IF fp2 == f3 THEN GOTO [0-9]$
9+
^\s*IF fp2 == f4 THEN GOTO [0-9]$
10+
^\s*IF fp2 == f5 THEN GOTO [0-9]$
11+
^\s*IF fp2 == f6 THEN GOTO [0-9]$
12+
^\s*IF fp2 == f7 THEN GOTO [0-9]$
13+
^\s*IF fp2 == f8 THEN GOTO [0-9]$
14+
^\s*IF fp2 == f9 THEN GOTO [0-9]$
1515
^SIGNAL=0$
1616
--
1717
^warning: ignoring

regression/goto-analyzer/no-match-const-fp-const-pointer-non-const-struct-const-fp/test.desc

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@ main.c
33
--show-goto-functions --verbosity 10 --pointer-check
44

55
^Removing function pointers and virtual functions$
6-
^\s*IF fp == f1 THEN GOTO 1$
7-
^\s*IF fp == f2 THEN GOTO 2$
8-
^\s*IF fp == f3 THEN GOTO 3$
9-
^\s*IF fp == f4 THEN GOTO 4$
10-
^\s*IF fp == f5 THEN GOTO 5$
11-
^\s*IF fp == f6 THEN GOTO 6$
12-
^\s*IF fp == f7 THEN GOTO 7$
13-
^\s*IF fp == f8 THEN GOTO 8$
14-
^\s*IF fp == f9 THEN GOTO 9$
6+
^\s*IF fp == f1 THEN GOTO [0-9]$
7+
^\s*IF fp == f2 THEN GOTO [0-9]$
8+
^\s*IF fp == f3 THEN GOTO [0-9]$
9+
^\s*IF fp == f4 THEN GOTO [0-9]$
10+
^\s*IF fp == f5 THEN GOTO [0-9]$
11+
^\s*IF fp == f6 THEN GOTO [0-9]$
12+
^\s*IF fp == f7 THEN GOTO [0-9]$
13+
^\s*IF fp == f8 THEN GOTO [0-9]$
14+
^\s*IF fp == f9 THEN GOTO [0-9]$
1515
^SIGNAL=0$
1616
--
1717
^warning: ignoring

regression/goto-analyzer/no-match-const-fp-dereference-non-const-pointer-const-fp/test.desc

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@ main.c
33
--show-goto-functions --verbosity 10 --pointer-check
44

55
^Removing function pointers and virtual functions$
6-
^\s*IF final_fp == f1 THEN GOTO 1$
7-
^\s*IF final_fp == f2 THEN GOTO 2$
8-
^\s*IF final_fp == f3 THEN GOTO 3$
9-
^\s*IF final_fp == f4 THEN GOTO 4$
10-
^\s*IF final_fp == f5 THEN GOTO 5$
11-
^\s*IF final_fp == f6 THEN GOTO 6$
12-
^\s*IF final_fp == f7 THEN GOTO 7$
13-
^\s*IF final_fp == f8 THEN GOTO 8$
14-
^\s*IF final_fp == f9 THEN GOTO 9$
6+
^\s*IF final_fp == f1 THEN GOTO [0-9]$
7+
^\s*IF final_fp == f2 THEN GOTO [0-9]$
8+
^\s*IF final_fp == f3 THEN GOTO [0-9]$
9+
^\s*IF final_fp == f4 THEN GOTO [0-9]$
10+
^\s*IF final_fp == f5 THEN GOTO [0-9]$
11+
^\s*IF final_fp == f6 THEN GOTO [0-9]$
12+
^\s*IF final_fp == f7 THEN GOTO [0-9]$
13+
^\s*IF final_fp == f8 THEN GOTO [0-9]$
14+
^\s*IF final_fp == f9 THEN GOTO [0-9]$
1515
^SIGNAL=0$
1616
--
1717
^warning: ignoring

regression/goto-analyzer/no-match-const-fp-dynamic-array-non-const-fp/test.desc

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@ main.c
33
--show-goto-functions --verbosity 10 --pointer-check
44

55
^Removing function pointers and virtual functions$
6-
^\s*IF fp == f1 THEN GOTO 1$
7-
^\s*IF fp == f2 THEN GOTO 2$
8-
^\s*IF fp == f3 THEN GOTO 3$
9-
^\s*IF fp == f4 THEN GOTO 4$
10-
^\s*IF fp == f5 THEN GOTO 5$
11-
^\s*IF fp == f6 THEN GOTO 6$
12-
^\s*IF fp == f7 THEN GOTO 7$
13-
^\s*IF fp == f8 THEN GOTO 8$
14-
^\s*IF fp == f9 THEN GOTO 9$
6+
^\s*IF fp == f1 THEN GOTO [0-9]$
7+
^\s*IF fp == f2 THEN GOTO [0-9]$
8+
^\s*IF fp == f3 THEN GOTO [0-9]$
9+
^\s*IF fp == f4 THEN GOTO [0-9]$
10+
^\s*IF fp == f5 THEN GOTO [0-9]$
11+
^\s*IF fp == f6 THEN GOTO [0-9]$
12+
^\s*IF fp == f7 THEN GOTO [0-9]$
13+
^\s*IF fp == f8 THEN GOTO [0-9]$
14+
^\s*IF fp == f9 THEN GOTO [0-9]$
1515
^SIGNAL=0$
1616
--
1717
^warning: ignoring

regression/goto-analyzer/no-match-const-fp-non-const-fp-direct-assignment/test.desc

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@ CORE
22
main.c
33
--show-goto-functions --verbosity 10 --pointer-check
44
^Removing function pointers and virtual functions$
5-
^\s*IF fp2 == f1 THEN GOTO 1$
6-
^\s*IF fp2 == f2 THEN GOTO 2$
7-
^\s*IF fp2 == f3 THEN GOTO 3$
8-
^\s*IF fp2 == f4 THEN GOTO 4$
9-
^\s*IF fp2 == f5 THEN GOTO 5$
10-
^\s*IF fp2 == f6 THEN GOTO 6$
11-
^\s*IF fp2 == f7 THEN GOTO 7$
12-
^\s*IF fp2 == f8 THEN GOTO 8$
13-
^\s*IF fp2 == f9 THEN GOTO 9$
5+
^\s*IF fp2 == f1 THEN GOTO [0-9]$
6+
^\s*IF fp2 == f2 THEN GOTO [0-9]$
7+
^\s*IF fp2 == f3 THEN GOTO [0-9]$
8+
^\s*IF fp2 == f4 THEN GOTO [0-9]$
9+
^\s*IF fp2 == f5 THEN GOTO [0-9]$
10+
^\s*IF fp2 == f6 THEN GOTO [0-9]$
11+
^\s*IF fp2 == f7 THEN GOTO [0-9]$
12+
^\s*IF fp2 == f8 THEN GOTO [0-9]$
13+
^\s*IF fp2 == f9 THEN GOTO [0-9]$
1414
^SIGNAL=0$
1515
--
1616
^warning: ignoring

regression/goto-analyzer/no-match-const-fp-non-const-pointer-non-const-struct-const-fp/test.desc

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@ main.c
33
--show-goto-functions --verbosity 10 --pointer-check
44

55
^Removing function pointers and virtual functions$
6-
^\s*IF fp == f1 THEN GOTO 1$
7-
^\s*IF fp == f2 THEN GOTO 2$
8-
^\s*IF fp == f3 THEN GOTO 3$
9-
^\s*IF fp == f4 THEN GOTO 4$
10-
^\s*IF fp == f5 THEN GOTO 5$
11-
^\s*IF fp == f6 THEN GOTO 6$
12-
^\s*IF fp == f7 THEN GOTO 7$
13-
^\s*IF fp == f8 THEN GOTO 8$
14-
^\s*IF fp == f9 THEN GOTO 9$
6+
^\s*IF fp == f1 THEN GOTO [0-9]$
7+
^\s*IF fp == f2 THEN GOTO [0-9]$
8+
^\s*IF fp == f3 THEN GOTO [0-9]$
9+
^\s*IF fp == f4 THEN GOTO [0-9]$
10+
^\s*IF fp == f5 THEN GOTO [0-9]$
11+
^\s*IF fp == f6 THEN GOTO [0-9]$
12+
^\s*IF fp == f7 THEN GOTO [0-9]$
13+
^\s*IF fp == f8 THEN GOTO [0-9]$
14+
^\s*IF fp == f9 THEN GOTO [0-9]$
1515
^SIGNAL=0$
1616
--
1717
^warning: ignoring

regression/goto-analyzer/no-match-const-fp-non-const-struct-const-fp/test.desc

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@ main.c
33
--show-goto-functions --verbosity 10 --pointer-check
44

55
^Removing function pointers and virtual functions$
6-
^\s*IF fp == f1 THEN GOTO 1$
7-
^\s*IF fp == f2 THEN GOTO 2$
8-
^\s*IF fp == f3 THEN GOTO 3$
9-
^\s*IF fp == f4 THEN GOTO 4$
10-
^\s*IF fp == f5 THEN GOTO 5$
11-
^\s*IF fp == f6 THEN GOTO 6$
12-
^\s*IF fp == f7 THEN GOTO 7$
13-
^\s*IF fp == f8 THEN GOTO 8$
14-
^\s*IF fp == f9 THEN GOTO 9$
6+
^\s*IF fp == f1 THEN GOTO [0-9]$
7+
^\s*IF fp == f2 THEN GOTO [0-9]$
8+
^\s*IF fp == f3 THEN GOTO [0-9]$
9+
^\s*IF fp == f4 THEN GOTO [0-9]$
10+
^\s*IF fp == f5 THEN GOTO [0-9]$
11+
^\s*IF fp == f6 THEN GOTO [0-9]$
12+
^\s*IF fp == f7 THEN GOTO [0-9]$
13+
^\s*IF fp == f8 THEN GOTO [0-9]$
14+
^\s*IF fp == f9 THEN GOTO [0-9]$
1515
^SIGNAL=0$
1616
--
1717
^warning: ignoring

0 commit comments

Comments
 (0)