Skip to content

Commit

Permalink
Merge pull request #63 from rems-project/bw-compl
Browse files Browse the repository at this point in the history
Re-add bitwise complement examples (now working)
  • Loading branch information
cp526 authored Jul 24, 2024
2 parents 4d270cd + 410d105 commit 637b332
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 0 deletions.
29 changes: 29 additions & 0 deletions src/example-archive/c-testsuite/working/00104.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
/*
internal error: todo: M_BW_COMPL
cn: internal error, uncaught exception:
Failure("internal error: todo: M_BW_COMPL")
*/
// Cause: unknown

#include <stdint.h>

int
main()
{
int32_t x;
int64_t l;

x = 0;
l = 0;

x = ~x;
if (x != 0xffffffff)
return 1;

l = ~l;
if (x != 0xffffffffffffffff)
return 2;


return 0;
}
21 changes: 21 additions & 0 deletions src/example-archive/c-testsuite/working/00126.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/*
internal error: todo: M_BW_COMPL
cn: internal error, uncaught exception:
Failure("internal error: todo: M_BW_COMPL")
*/
// Cause: unknown

int
main()
{
int x;

x = 3;
x = !x;
x = !x;
x = ~x;
x = -x;
if(x != 2)
return 1;
return 0;
}
1 change: 1 addition & 0 deletions src/example-archive/simple-examples/working/bit_compl_1.c
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
void a() { ~0; }

0 comments on commit 637b332

Please sign in to comment.