diff options
author | Alon Zakai <azakai@mozilla.com> | 2010-11-14 21:23:48 -0800 |
---|---|---|
committer | Alon Zakai <azakai@mozilla.com> | 2010-11-14 21:23:48 -0800 |
commit | ee0166c83cd91a469bbe2d1da3c27f180da7b582 (patch) | |
tree | ca61137046a01c43e3579c93ef9bc5a0cee4a7a3 /tests | |
parent | 1a9c1c95c6552f835f53493299e90a9f6743c6f7 (diff) |
handle global constants that are llvm function calls +test
Diffstat (limited to 'tests')
-rw-r--r-- | tests/runner.py | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/runner.py b/tests/runner.py index ecabe9eb..2a988f8c 100644 --- a/tests/runner.py +++ b/tests/runner.py @@ -369,6 +369,23 @@ if 'benchmark' not in sys.argv: ''' self.do_test(src, '*7*') + def test_globals(self): + src = ''' + #include <stdio.h> + + + char cache[256], *next = cache; + + int main() + { + cache[10] = 25; + next[20] = 51; + printf("*%d,%d*\\n", next[10], cache[20]); + return 0; + } + ''' + self.do_test(src, '*25,51*') + def test_linked_list(self): src = ''' #include <stdio.h> |