fehler61: static function whose address is stored in a global variable incorrectly...
authorChristoph Mallon <christoph.mallon@gmx.de>
Mon, 6 Aug 2007 14:24:49 +0000 (14:24 +0000)
committerChristoph Mallon <christoph.mallon@gmx.de>
Mon, 6 Aug 2007 14:24:49 +0000 (14:24 +0000)
[r15479]

ir/be/test/fehler61.c [new file with mode: 0644]

diff --git a/ir/be/test/fehler61.c b/ir/be/test/fehler61.c
new file mode 100644 (file)
index 0000000..d720c2c
--- /dev/null
@@ -0,0 +1,14 @@
+#include <stdio.h>
+
+static void f(int i)
+{
+       printf("%d (should be 42)\n", i);
+}
+
+void (*x)(int) = f;
+
+int main(void)
+{
+       x(42);
+       return 0;
+}