diff options
author | Alon Zakai <alonzakai@gmail.com> | 2013-07-21 23:23:04 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-07-21 23:23:04 -0700 |
commit | 2fa66559a20ce74d7cc8a301a389778b79ca80a7 (patch) | |
tree | 6e448290c076f5e0f8e4fe4315517c38860a130c /tests | |
parent | eca3f4f9fe135f29f70be8f42c82fa3ef8b192b3 (diff) |
notice varargs when creating library function wrappers
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/runner.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/runner.py b/tests/runner.py index 8a2274ea..717d8914 100755 --- a/tests/runner.py +++ b/tests/runner.py @@ -4522,6 +4522,22 @@ The current address of a is: 0x12345678 The current type of b is: 9 ''') + def test_functionpointer_libfunc_varargs(self): + src = r''' + #include <stdio.h> + #include <fcntl.h> + typedef int (*fp_t)(int, int, ...); + int main(int argc, char **argv) { + fp_t fp = &fcntl; + if (argc == 1337) fp = (fp_t)&main; + (*fp)(0, 10); + (*fp)(0, 10, 5); + printf("waka\n"); + return 0; + } + ''' + self.do_run(src, '''waka''') + def test_structbyval(self): Settings.INLINING_LIMIT = 50 |