diff options
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/tests2/87_ptr_longlong_arith32.c | 15 | ||||
| -rw-r--r-- | tests/tests2/87_ptr_longlong_arith32.expect | 1 |
2 files changed, 16 insertions, 0 deletions
diff --git a/tests/tests2/87_ptr_longlong_arith32.c b/tests/tests2/87_ptr_longlong_arith32.c new file mode 100644 index 0000000..bf07915 --- /dev/null +++ b/tests/tests2/87_ptr_longlong_arith32.c @@ -0,0 +1,15 @@ +int printf(const char *, ...); +char t[] = "012345678"; + +int main(void) +{ + char *data = t; + unsigned long long r = 4; + unsigned a = 5; + unsigned long long b = 12; + + *(unsigned*)(data + r) += a - b; + + printf("data = \"%s\"\n", data); + return 0; +} diff --git a/tests/tests2/87_ptr_longlong_arith32.expect b/tests/tests2/87_ptr_longlong_arith32.expect new file mode 100644 index 0000000..f91e4b4 --- /dev/null +++ b/tests/tests2/87_ptr_longlong_arith32.expect @@ -0,0 +1 @@ +data = "0123-5678" |
