Skip to content

CBMC error caused by conditional statements if 2nd operand is missing #2662

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
polgreen opened this issue Aug 2, 2018 · 0 comments
Closed
Assignees

Comments

@polgreen
Copy link
Contributor

polgreen commented Aug 2, 2018

CBMC can't currently handle correctly conditional statements without the 2nd operand, e.g., C = A?: B, equivalent to C = A ? A : B

The following example causes CBMC to return the error
file conditional.c line 6 function main: symex_assign: unexpected side effect: gcc_conditional_expression

int A = 10;
int B = 20;

int main()
{
  int C = A ?: B;   
 __CPROVER_assert(0,"");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants