source: CIVL/mods/dev.civl.abc/examples/c/indirectcall.c

main
Last change on this file was aad342c, checked in by Stephen Siegel <siegel@…>, 3 years ago

Performing huge refactor to incorporate ABC, GMC, and SARL into CIVL repo and use Java modules.

git-svn-id: svn://vsl.cis.udel.edu/civl/trunk@5664 fb995dde-84ed-4084-dfe6-e5aef3e2452c

  • Property mode set to 100644
File size: 424 bytes
Line 
1/*
2 * Expected result are:
3 * main calls {main, foo, bar} <- due to imprecision
4 * foo called by {main}
5 * bar called by {main}
6 */
7
8int foo() {
9 return 0;
10}
11
12int bar() {
13 return 1;
14}
15
16// not included as a callee of main due to parameter
17int bat(int x) {
18 return x;
19}
20
21// not included as a callee of main due return type
22double bas() {
23 return 0.0;
24}
25
26
27int main() {
28 int (*fun)(void) = foo;
29 int x = (fun)();
30}
Note: See TracBrowser for help on using the repository browser.