forked from diffblue/cbmc
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Failing regression test from diffblue#933
- Loading branch information
1 parent
1132562
commit 204c60f
Showing
2 changed files
with
58 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
#include <cassert> | ||
#include <stdint.h> | ||
#include <stdbool.h> | ||
|
||
#undef HOTFIX | ||
|
||
typedef struct { | ||
uint32_t value_31_0 : 32; | ||
} signal32_t; | ||
|
||
typedef struct { | ||
uint8_t value_0_0 : 1; | ||
} signal1_t; | ||
|
||
static inline bool yosys_simplec_get_bit_25_of_32(const signal32_t *sig) | ||
{ | ||
return (sig->value_31_0 >> 25) & 1; | ||
} | ||
|
||
struct rvfi_insn_srai_state_t | ||
{ | ||
signal32_t rvfi_insn; | ||
signal32_t rvfi_rs1_rdata; | ||
signal1_t _abc_1398_n364; | ||
signal1_t _abc_1398_n363; | ||
}; | ||
|
||
void test(rvfi_insn_srai_state_t state, bool valid) | ||
{ | ||
#ifndef HOTFIX | ||
state._abc_1398_n364.value_0_0 = yosys_simplec_get_bit_25_of_32(&state.rvfi_insn) ? | ||
yosys_simplec_get_bit_25_of_32(&state.rvfi_rs1_rdata) : state._abc_1398_n363.value_0_0; | ||
#else | ||
state._abc_1398_n364.value_0_0 = yosys_simplec_get_bit_25_of_32(&state.rvfi_insn) ? | ||
yosys_simplec_get_bit_25_of_32(&state.rvfi_rs1_rdata) : (bool)state._abc_1398_n363.value_0_0; | ||
#endif | ||
|
||
assert(valid); | ||
} | ||
|
||
int main(int argc, char* argv[]) | ||
{ | ||
rvfi_insn_srai_state_t state; | ||
bool valid; | ||
test(state, valid); | ||
return 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
KNOWNBUG | ||
main.cpp | ||
|
||
^EXIT=0$ | ||
^SIGNAL=0$ | ||
^VERIFICATION SUCCESSFUL$ | ||
-- | ||
^warning: ignoring | ||
^equality without matching types | ||
-- | ||
This has been reported as #933. |