Skip to content

Commit

Permalink
Re-add bitwise complement examples (now working)
Browse files Browse the repository at this point in the history
  • Loading branch information
dc-mak committed Jul 23, 2024
1 parent 5129ad5 commit 410d105
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 410d105

Please sign in to comment.