From 09bf04cac407696a6bc9bb4a557cbc2caf244553 Mon Sep 17 00:00:00 2001 From: Christoph Mallon Date: Thu, 27 Sep 2007 18:58:12 +0000 Subject: [PATCH] fehler86: 64bit in 32bit address calculation. The frontend probably should generate a ConvIu. [r15980] --- ir/be/test/fehler86.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 ir/be/test/fehler86.c diff --git a/ir/be/test/fehler86.c b/ir/be/test/fehler86.c new file mode 100644 index 000000000..fd2e92b3d --- /dev/null +++ b/ir/be/test/fehler86.c @@ -0,0 +1,13 @@ +int w[] = { 1, 2, 3 }; +int *x = w; + +int f(long long a) +{ + return x[a]; +} + +int main(void) +{ + printf("%d (should be 2)\n", f(1)); + return 0; +} -- 2.20.1