diff options
author | xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e> | 2010-02-17 13:44:32 +0000 |
---|---|---|
committer | xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e> | 2010-02-17 13:44:32 +0000 |
commit | 6224148fdd809170d138216d72b8e6180d626aec (patch) | |
tree | f67127b4ab6026f5e29d0b6aa69bec4f8a223fb2 /test/c/initializers.c | |
parent | f9ebf19ba3ca4c3ee67cc88bbea407d4dd734249 (diff) | |
download | compcert-6224148fdd809170d138216d72b8e6180d626aec.tar.gz compcert-6224148fdd809170d138216d72b8e6180d626aec.zip |
Reorganization test directory
git-svn-id: https://yquem.inria.fr/compcert/svn/compcert/trunk@1253 fca1b0fc-160b-0410-b1d3-a4f43f01ea2e
Diffstat (limited to 'test/c/initializers.c')
-rw-r--r-- | test/c/initializers.c | 68 |
1 files changed, 0 insertions, 68 deletions
diff --git a/test/c/initializers.c b/test/c/initializers.c deleted file mode 100644 index 97ce99b0..00000000 --- a/test/c/initializers.c +++ /dev/null @@ -1,68 +0,0 @@ -#include <stdio.h> - -char x1 = 'x'; - -int x2 = 12345; - -double x3 = 3.14159; - -char x4[4] = { 'a', 'b', 'c', 'd' }; - -int x5[10] = { 1, 2, 3 }; - -struct { int y; int z; } x6 = { 4, 5 }; - -struct { int y; char z; } x7 = { 6, 'u' }; - -struct { char y; int z; } x8 = { 'v', 7 }; - -struct { char y[9]; double z; } x9 = { { 'a', 'b' }, 2.718 }; - -struct { - struct { char y; int z; } u; - double v; -} x10 = { { 'v', 7 }, 2.718 }; - -float x11 = 1 + 1 / 3.14159; - -double x12 = 1 / 3.14159 + 1; - -typedef enum { AAA , BBB } MyEnum; - -const MyEnum x13[2] = { AAA, BBB }; - -int * x14 = &x2; - -struct { char * y; int * z; float * u; double * v; } x15 = { x4, x5, &x11, &x12 }; - -int main(int argc, char ** argv) -{ - int i; - - printf("x1 = '%c'\n", x1); - printf("x2 = %d\n", x2); - printf("x3 = %.5f\n", x3); - printf("x4 = { '%c', '%c', '%c', '%c' }\n", - x4[0], x4[1], x4[2], x4[3]); - printf("x5 = { "); - for (i = 0; i < 10; i++) printf("%d, ", x5[i]); - printf("}\n"); - printf("x6 = { %d, %d }\n", x6.y, x6.z); - printf("x7 = { %d, '%c' }\n", x7.y, x7.z); - printf("x8 = { '%c', %d }\n", x8.y, x8.z); - printf("x9 = { { "); - for (i = 0; i < 9; i++) printf("'%c', ", x9.y[i]); - printf("}, %.3f }\n", x9.z); - printf("x10 = { { '%c', %d }, %.3f }\n", - x10.u.y, x10.u.z, x10.v); - printf("x11 = %.10f\n", x11); - printf("x12 = %.10f\n", x12); - printf("x13 = { %d, %d }\n", x13[0], x13[1]); - if (x14 == &x2) printf("x14 ok\n"); else printf("x14 error\n"); - if (x15.y == x4 && x15.z == x5 && x15.u == &x11 && x15.v == &x12) - printf("x15 ok\n"); - else - printf("x15 error\n"); - return 0; -} - |