Skip to content

Commit c811e73

Browse files
authored
Merge pull request #7844 from tautschnig/bugfixes/unsigned-char
Fix tests for unsigned-char architectures
2 parents 05559e9 + 7babf45 commit c811e73

File tree

7 files changed

+8
-8
lines changed

7 files changed

+8
-8
lines changed

regression/cbmc-incr-smt2/bitvector-bitwise-operators/shift_right.desc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ shift_right.c
55
\[main\.assertion\.2\] line \d+ Right shifting a positive number has a lower bound of 0: SUCCESS
66
\[main\.assertion\.3\] line \d+ Right shifting a negative number has a lower bound value of -1: SUCCESS
77
second=128
8-
result_unsigned=64
8+
result_unsigned=(64|'@')
99
^EXIT=10$
1010
^SIGNAL=0$
1111
--

regression/cbmc/integral-trace/test.desc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ activate-multi-line-match
55
^EXIT=10$
66
^SIGNAL=0$
77
VERIFICATION FAILED
8-
<full_lhs>u8</full_lhs>\s*<full_lhs_value binary="01100001">97</full_lhs_value>
8+
<full_lhs>u8</full_lhs>\s*<full_lhs_value binary="01100001">(97|'a')</full_lhs_value>
99
<full_lhs>u16</full_lhs>\s*<full_lhs_value binary="0{12}1000">8</full_lhs_value>
1010
<full_lhs>u32</full_lhs>\s*<full_lhs_value binary="0{27}10000">16ul?</full_lhs_value>
1111
<full_lhs>u64</full_lhs>\s*<full_lhs_value binary="0{58}100000">32ull?</full_lhs_value>
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
CORE
22
main.c
33
--trace
4-
^\s*ub.*=\(char \*\)&dynamic_object \+ \d+
4+
^\s*ub.*=(\(char \*\)&)?dynamic_object \+ \d+
55
^\s*offset_ubp1=\d+ul* \(00000000 1[0 ]+1\)$
66
^VERIFICATION FAILED$
77
^EXIT=10$
88
^SIGNAL=0$
99
--
1010
^warning: ignoring
11-
^\s*ub.*=\(char \*\)&dynamic_object \+ -\d+
11+
^\s*ub.*=(\(char \*\)&)?dynamic_object \+ -\d+
1212
^\s*offset_ubp1=\d+ul* \(11111111 1
1313
--
1414
Verifies that all offsets use unsigned arithmetic.

regression/goto-instrument-json/rol_signed/test-signed.desc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ test-signed.json
33
--dump-c
44
^EXIT=0$
55
^SIGNAL=0$
6-
signed char rol8=\(unsigned char\)'8' << 3 % 8 \| \(unsigned char\)'8' >> 8 - 3 % 8;
6+
signed char rol8=\(unsigned char\)('8'|56) << 3 % 8 \| \(unsigned char\)('8'|56) >> 8 - 3 % 8;
77
--
88
irep
99
--

regression/goto-instrument-json/rol_unsigned/test.desc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ test.json
33
--dump-c
44
^EXIT=0$
55
^SIGNAL=0$
6-
unsigned char rol8=56 << 3 % 8 \| 56 >> 8 - 3 % 8;
6+
unsigned char rol8=(56|'8') << 3 % 8 \| (56|'8') >> 8 - 3 % 8;
77
--
88
irep
99
--

regression/goto-instrument-json/ror_signed/test-signed.desc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ test-signed.json
33
--dump-c
44
^EXIT=0$
55
^SIGNAL=0$
6-
signed char ror8=\(unsigned char\)'8' >> 3 % 8 \| \(unsigned char\)'8' << 8 - 3 % 8;
6+
signed char ror8=\(unsigned char\)('8'|56) >> 3 % 8 \| \(unsigned char\)('8'|56) << 8 - 3 % 8;
77
--
88
irep
99
--

regression/goto-instrument-json/ror_unsigned/test.desc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ test.json
33
--dump-c
44
^EXIT=0$
55
^SIGNAL=0$
6-
unsigned char ror8=56 >> 3 % 8 \| 56 << 8 - 3 % 8;
6+
unsigned char ror8=(56|'8') >> 3 % 8 \| (56|'8') << 8 - 3 % 8;
77
--
88
irep
99
--

0 commit comments

Comments
 (0)