add test for return padding
authorMichael Beck <beck@ipd.info.uni-karlsruhe.de>
Tue, 24 Jun 2008 23:16:42 +0000 (23:16 +0000)
committerMichael Beck <beck@ipd.info.uni-karlsruhe.de>
Tue, 24 Jun 2008 23:16:42 +0000 (23:16 +0000)
[r20247]

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

diff --git a/ir/be/test/pad_return.c b/ir/be/test/pad_return.c
new file mode 100644 (file)
index 0000000..0dea4e5
--- /dev/null
@@ -0,0 +1,16 @@
+int A;
+
+int test(int a) {
+       if (a == 23)
+               goto end;
+       while (A != 0) {
+               A = A * a;
+       }
+end:
+       /* return should be padded by using ret $0 */
+       return a;
+}
+
+int main(int argc, char *argv[]) {
+       return 23 != test(23);
+}