-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CN: explicit split_case in funptr tests
It works. It could use a less verbose version.
- Loading branch information
Showing
3 changed files
with
34 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,29 @@ | ||
|
||
int global_x; | ||
void *global_void_ptr; | ||
|
||
extern int extern_f (void); | ||
|
||
int | ||
g (int x) | ||
{ | ||
return 0; | ||
} | ||
|
||
/*@ | ||
function ({u32 x1, u32 x2}) get_globals () | ||
{ {x1: (u32) (&g), x2: (u32) (&extern_f)} } | ||
@*/ | ||
|
||
int | ||
f (int x) | ||
/*@ accesses global_x @*/ | ||
{ | ||
/* resolution of the 'g' & 'extern_f' addrs triggered a bug at one point */ | ||
/*@ assert (((u32) (&x)) == ((u32) (&x))); @*/; | ||
/*@ assert (((u32) (&global_x)) == ((u32) (&global_x))); @*/; | ||
/*@ assert (get_globals () == get_globals ()); @*/; | ||
/*@ assert (((u32) (&g)) == ((u32) (&g))); @*/; | ||
|
||
return x == global_x; | ||
} |
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