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/regression/Results/attribs1 | 1 + test/regression/attribs1.c | 3 +++ test/regression/packedstruct1.c | 2 +- test/regression/packedstruct2.c | 2 +- 4 files changed, 6 insertions(+), 2 deletions(-) (limited to 'test/regression') diff --git a/test/regression/Results/attribs1 b/test/regression/Results/attribs1 index 0464ec8..0089875 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 b6e5c22..808610b 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 e5526ed..8b138dd 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 37c736e..d742655 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' }; -- cgit v1.2.3