summaryrefslogtreecommitdiff
path: root/test/regression
diff options
context:
space:
mode:
authorGravatar xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e>2014-04-29 13:58:18 +0000
committerGravatar xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e>2014-04-29 13:58:18 +0000
commitf1d236b83003eda71e12840732d159fd23b1b771 (patch)
tree0edad805ea24f7b626d2c6fee9fc50da23acfc47 /test/regression
parent39df8fb19bacb38f317abf06de432b83296dfdd1 (diff)
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
Diffstat (limited to 'test/regression')
-rw-r--r--test/regression/Results/attribs11
-rw-r--r--test/regression/attribs1.c3
-rw-r--r--test/regression/packedstruct1.c2
-rw-r--r--test/regression/packedstruct2.c2
4 files changed, 6 insertions, 2 deletions
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' };