Skip to content

Commit

Permalink
add unsound test case so that we can debug
Browse files Browse the repository at this point in the history
  • Loading branch information
reb-ddm committed Jan 12, 2024
1 parent 38a8ed2 commit 97f25be
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions tests/regression/77-lin2vareq/34-svcomp-signextension.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
// SKIP PARAM: --set ana.activated[+] lin2vareq --set sem.int.signed_overflow assume_none

#include <stdio.h>
int main() {

unsigned short int allbits = -1;
short int signedallbits = allbits;
int unsignedtosigned = allbits;
unsigned int unsignedtounsigned = allbits;
int signedtosigned = signedallbits;
unsigned int signedtounsigned = signedallbits;

/*
printf ("unsignedtosigned: %d\n", unsignedtosigned);
printf ("unsignedtounsigned: %u\n", unsignedtounsigned);
printf ("signedtosigned: %d\n", signedtosigned);
printf ("signedtounsigned: %u\n", signedtounsigned);
*/

if (unsignedtosigned == 65535 && unsignedtounsigned == 65535 &&
signedtosigned == -1 && signedtounsigned == 4294967295) {
return (-1);
}

return (0);
}

0 comments on commit 97f25be

Please sign in to comment.