From f1d236b83003eda71e12840732d159fd23b1b771 Mon Sep 17 00:00:00 2001 From: xleroy Date: Tue, 29 Apr 2014 13:58:18 +0000 Subject: Integration of Jacques-Henri Jourdan's verified parser. (Merge of branch newparser.) git-svn-id: https://yquem.inria.fr/compcert/svn/compcert/trunk@2469 fca1b0fc-160b-0410-b1d3-a4f43f01ea2e --- test/c/chomp.c | 6 ++---- test/c/vmach.c | 3 +-- test/regression/Results/attribs1 | 1 + test/regression/attribs1.c | 3 +++ test/regression/packedstruct1.c | 2 +- test/regression/packedstruct2.c | 2 +- test/spass/misc.h | 2 ++ 7 files changed, 11 insertions(+), 8 deletions(-) (limited to 'test') diff --git a/test/c/chomp.c b/test/c/chomp.c index 042877d9..7c8e6110 100644 --- a/test/c/chomp.c +++ b/test/c/chomp.c @@ -21,8 +21,7 @@ struct _play int nrow,ncol; /* global so as to avoid passing them all over the place */ -int *copy_data(data) /* creates a duplicate of a given -data list */ -int *data; +int *copy_data(int* data) /* creates a duplicate of a given -data list */ { int *new = NDATA; int counter = ncol; @@ -93,8 +92,7 @@ void dump_list(struct _list *list) /* same for a _list structure */ } } -void dump_play(play) /* and for the entire game tree */ -struct _play *play; +void dump_play(struct _play *play) /* and for the entire game tree */ { if (play != NULL) { diff --git a/test/c/vmach.c b/test/c/vmach.c index 15546f86..49c120dd 100644 --- a/test/c/vmach.c +++ b/test/c/vmach.c @@ -52,8 +52,7 @@ enum wordcode_instruct { long stack[STACKSIZE]; -long wordcode_interp(code) - unsigned int * code; +long wordcode_interp(unsigned int* code) { long * sp; unsigned int * pc; diff --git a/test/regression/Results/attribs1 b/test/regression/Results/attribs1 index 0464ec87..0089875e 100644 --- a/test/regression/Results/attribs1 +++ b/test/regression/Results/attribs1 @@ -1,5 +1,6 @@ Address of a = 0 mod 16 Address of b = 0 mod 8 +Address of g = 0 mod 8 Delta d - c = 4 Delta f - e = 4 Address of u = 0 mod 8 diff --git a/test/regression/attribs1.c b/test/regression/attribs1.c index b6e5c22d..808610b7 100644 --- a/test/regression/attribs1.c +++ b/test/regression/attribs1.c @@ -11,6 +11,8 @@ char filler1 = 1; __attribute((__aligned__(1<<4))) int a = 1234; char filler2 = 1; __attribute((__aligned__(8))) char b = 'b'; +char filler7 = 1; +char g __attribute((__aligned__(8))) = 'g'; /* Sections */ @@ -40,6 +42,7 @@ int main() { printf("Address of a = %u mod 16\n", ((unsigned int) &a) & 0xF); printf("Address of b = %u mod 8\n", ((unsigned int) &b) & 0x7); + printf("Address of g = %u mod 8\n", ((unsigned int) &g) & 0x7); printf("Delta d - c = %u\n", ((unsigned int) &d) - ((unsigned int) &c)); printf("Delta f - e = %u\n", ((unsigned int) &f) - ((unsigned int) &e)); printf("Address of u = %u mod 8\n", ((unsigned int) &u) & 0x7); diff --git a/test/regression/packedstruct1.c b/test/regression/packedstruct1.c index e5526ed9..8b138dd4 100644 --- a/test/regression/packedstruct1.c +++ b/test/regression/packedstruct1.c @@ -6,7 +6,7 @@ /* Simple packing */ -struct __packed__ s1 { unsigned short x; int y; double z; }; +struct __packed__(1) s1 { unsigned short x; int y; double z; }; void test1(void) { diff --git a/test/regression/packedstruct2.c b/test/regression/packedstruct2.c index 37c736ec..d742655e 100644 --- a/test/regression/packedstruct2.c +++ b/test/regression/packedstruct2.c @@ -4,7 +4,7 @@ /* Simple packing */ -struct __packed__ s1 { unsigned short x; int y; char z; }; +struct __packed__(1) s1 { unsigned short x; int y; char z; }; struct s1 s1 = { 2345, -12345678, 'x' }; diff --git a/test/spass/misc.h b/test/spass/misc.h index 69d929d1..6f70a232 100644 --- a/test/spass/misc.h +++ b/test/spass/misc.h @@ -48,6 +48,8 @@ #ifndef _MISC_ #define _MISC_ +#define __inline__ inline + /**************************************************************/ /* Includes */ /**************************************************************/ -- cgit