UTBotCpp icon indicating copy to clipboard operation
UTBotCpp copied to clipboard

Cannot compile klee file if typename equals variable name

Open IDKWNTCMF opened this issue 2 years ago • 0 comments

Description If a type name equals variable name then klee file cannot be compiled in some cases.

Example

typedef struct {
    int fld;
} str;

int cas(str *str, int val, int new_val) {
    if (str && str->fld == val) {
        str->fld = new_val;
        return 1;
    }
    return 0;
}

To Reproduce Steps to reproduce the behavior:

  1. Copy the example above to your project
  2. Try to generate tests for cas function

Expected behavior Tests are supposed to be generated.

Actual behavior Couldn't compile klee file.

IDKWNTCMF avatar Aug 31 '23 12:08 IDKWNTCMF