-
Notifications
You must be signed in to change notification settings - Fork 76
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1406 from goblint/no_ovwarn_for_non_program_casts
Suppress Overflow Warnings for Computations Not in the Program
- Loading branch information
Showing
4 changed files
with
50 additions
and
26 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
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
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
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,22 @@ | ||
// PARAM: --enable ana.int.interval | ||
#include <stdio.h> | ||
#include <stdlib.h> | ||
#include <time.h> | ||
|
||
|
||
int main() { | ||
unsigned int length = 5; | ||
int i = 0; | ||
int top; | ||
|
||
if(top) { | ||
i = 10; | ||
} | ||
|
||
// Previously, we would warn as invariant internally casts an artificially created top between types. | ||
if(i < length + 3) //NOWARN | ||
{ | ||
__goblint_check(i <= 8); | ||
i = 8; | ||
} | ||
} |