summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/c/chomp.c6
-rw-r--r--test/c/vmach.c3
-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
-rw-r--r--test/spass/misc.h2
7 files changed, 11 insertions, 8 deletions
diff --git a/test/c/chomp.c b/test/c/chomp.c
index 042877d..7c8e611 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 15546f8..49c120d 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 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' };
diff --git a/test/spass/misc.h b/test/spass/misc.h
index 69d929d..6f70a23 100644
--- a/test/spass/misc.h
+++ b/test/spass/misc.h
@@ -48,6 +48,8 @@
#ifndef _MISC_
#define _MISC_
+#define __inline__ inline
+
/**************************************************************/
/* Includes */
/**************************************************************/