diff --git a/tools/analysis/traceevent/src/cinterp.rs b/tools/analysis/traceevent/src/cinterp.rs index 4bc480a8ff..930c011af6 100644 --- a/tools/analysis/traceevent/src/cinterp.rs +++ b/tools/analysis/traceevent/src/cinterp.rs @@ -2093,6 +2093,18 @@ mod tests { test(b"1 ? (int *)42 : (void *)43", unsigned(42)); test(b"1 ? (void *)42 : (int *)43", unsigned(42)); test(b"1 ? (void *)42 : (void *)43", unsigned(42)); + test(b"1 ? (int *)42 : (int *)0", unsigned(42)); + test(b"1 ? (int *)42 : (void *)0", unsigned(42)); + test(b"1 ? (void *)42 : (int *)0", unsigned(42)); + test(b"1 ? (void *)42 : (void *)0", unsigned(42)); + test(b"1 ? (int *)0 : (int *)0", unsigned(0)); + test(b"1 ? (int *)0 : (void *)0", unsigned(0)); + test(b"1 ? (void *)0 : (int *)0", unsigned(0)); + test(b"1 ? (void *)0 : (void *)0", unsigned(0)); + test(b"1 ? (int *)0 : (int *)42", unsigned(0)); + test(b"1 ? (int *)0 : (void *)42", unsigned(0)); + test(b"1 ? (void *)0 : (int *)42", unsigned(0)); + test(b"1 ? (void *)0 : (void *)42", unsigned(0)); // Casts test(b"(int)0", signed(0));