This is the mail archive of the libffi-discuss@sourceware.org mailing list for the libffi project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH 1/6] Put declarations before statements, C89 style


---
 ChangeLog                                          |   71 ++++++++++++++++++++
 testsuite/libffi.call/cls_12byte.c                 |    8 +-
 testsuite/libffi.call/cls_16byte.c                 |    8 +-
 testsuite/libffi.call/cls_18byte.c                 |    8 +-
 testsuite/libffi.call/cls_19byte.c                 |    8 +-
 testsuite/libffi.call/cls_1_1byte.c                |    8 +-
 testsuite/libffi.call/cls_20byte.c                 |    8 +-
 testsuite/libffi.call/cls_20byte1.c                |    8 +-
 testsuite/libffi.call/cls_24byte.c                 |   10 ++--
 testsuite/libffi.call/cls_2byte.c                  |    8 +-
 testsuite/libffi.call/cls_3_1byte.c                |    8 +-
 testsuite/libffi.call/cls_3byte1.c                 |    8 +-
 testsuite/libffi.call/cls_3byte2.c                 |    8 +-
 testsuite/libffi.call/cls_4_1byte.c                |    8 +-
 testsuite/libffi.call/cls_4byte.c                  |    8 +-
 testsuite/libffi.call/cls_5_1_byte.c               |    8 +-
 testsuite/libffi.call/cls_5byte.c                  |    8 +-
 testsuite/libffi.call/cls_64byte.c                 |   10 ++--
 testsuite/libffi.call/cls_6_1_byte.c               |    8 +-
 testsuite/libffi.call/cls_6byte.c                  |    8 +-
 testsuite/libffi.call/cls_7_1_byte.c               |    8 +-
 testsuite/libffi.call/cls_7byte.c                  |    8 +-
 testsuite/libffi.call/cls_8byte.c                  |    8 +-
 testsuite/libffi.call/cls_9byte1.c                 |    8 +-
 testsuite/libffi.call/cls_9byte2.c                 |    8 +-
 testsuite/libffi.call/cls_align_double.c           |    8 +-
 testsuite/libffi.call/cls_align_float.c            |    8 +-
 testsuite/libffi.call/cls_align_longdouble.c       |    8 +-
 testsuite/libffi.call/cls_align_longdouble_split.c |    8 +-
 .../libffi.call/cls_align_longdouble_split2.c      |    8 +-
 testsuite/libffi.call/cls_align_pointer.c          |    8 +-
 testsuite/libffi.call/cls_align_sint16.c           |    8 +-
 testsuite/libffi.call/cls_align_sint32.c           |    8 +-
 testsuite/libffi.call/cls_align_sint64.c           |    8 +-
 testsuite/libffi.call/cls_align_uint16.c           |    8 +-
 testsuite/libffi.call/cls_align_uint32.c           |    8 +-
 testsuite/libffi.call/cls_align_uint64.c           |    8 +-
 testsuite/libffi.call/cls_dbls_struct.c            |    4 +-
 testsuite/libffi.call/cls_pointer_stack.c          |    6 +-
 testsuite/libffi.call/err_bad_typedef.c            |    4 +-
 testsuite/libffi.call/huge_struct.c                |   26 ++++----
 testsuite/libffi.call/nested_struct.c              |   12 ++--
 testsuite/libffi.call/nested_struct1.c             |   14 ++--
 testsuite/libffi.call/nested_struct10.c            |   12 ++--
 testsuite/libffi.call/nested_struct2.c             |   10 ++--
 testsuite/libffi.call/nested_struct3.c             |   10 ++--
 testsuite/libffi.call/nested_struct4.c             |   10 ++--
 testsuite/libffi.call/nested_struct5.c             |   10 ++--
 testsuite/libffi.call/nested_struct6.c             |   12 ++--
 testsuite/libffi.call/nested_struct7.c             |   10 ++--
 testsuite/libffi.call/nested_struct8.c             |   12 ++--
 testsuite/libffi.call/nested_struct9.c             |   12 ++--
 testsuite/libffi.call/stret_large.c                |   10 ++--
 testsuite/libffi.call/stret_large2.c               |   10 ++--
 testsuite/libffi.call/stret_medium.c               |   10 ++--
 testsuite/libffi.call/stret_medium2.c              |   10 ++--
 testsuite/libffi.call/struct1.c                    |   12 ++--
 testsuite/libffi.call/struct1_win32.c              |   12 ++--
 testsuite/libffi.call/struct2.c                    |   10 ++--
 testsuite/libffi.call/struct2_win32.c              |   10 ++--
 testsuite/libffi.call/struct3.c                    |    9 ++-
 testsuite/libffi.call/struct4.c                    |   13 ++--
 testsuite/libffi.call/struct5.c                    |   13 ++--
 testsuite/libffi.call/struct6.c                    |   14 ++--
 testsuite/libffi.call/struct7.c                    |   14 ++--
 testsuite/libffi.call/struct8.c                    |   13 ++--
 testsuite/libffi.call/struct9.c                    |   13 ++--
 testsuite/libffi.call/testclosure.c                |    4 +-
 68 files changed, 393 insertions(+), 311 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 6d35a09..70ecba9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,76 @@
 2012-03-22  Peter Rosin  <peda@lysator.liu.se>
 
+	* testsuite/libffi.call/cls_12byte.c: Adjust to the C89 style
+	with no declarations after statements.
+	* testsuite/libffi.call/cls_16byte.c: Likewise.
+	* testsuite/libffi.call/cls_18byte.c: Likewise.
+	* testsuite/libffi.call/cls_19byte.c: Likewise.
+	* testsuite/libffi.call/cls_1_1byte.c: Likewise.
+	* testsuite/libffi.call/cls_20byte.c: Likewise.
+	* testsuite/libffi.call/cls_20byte1.c: Likewise.
+	* testsuite/libffi.call/cls_24byte.c: Likewise.
+	* testsuite/libffi.call/cls_2byte.c: Likewise.
+	* testsuite/libffi.call/cls_3_1byte.c: Likewise.
+	* testsuite/libffi.call/cls_3byte1.c: Likewise.
+	* testsuite/libffi.call/cls_3byte2.c: Likewise.
+	* testsuite/libffi.call/cls_4_1byte.c: Likewise.
+	* testsuite/libffi.call/cls_4byte.c: Likewise.
+	* testsuite/libffi.call/cls_5_1_byte.c: Likewise.
+	* testsuite/libffi.call/cls_5byte.c: Likewise.
+	* testsuite/libffi.call/cls_64byte.c: Likewise.
+	* testsuite/libffi.call/cls_6_1_byte.c: Likewise.
+	* testsuite/libffi.call/cls_6byte.c: Likewise.
+	* testsuite/libffi.call/cls_7_1_byte.c: Likewise.
+	* testsuite/libffi.call/cls_7byte.c: Likewise.
+	* testsuite/libffi.call/cls_8byte.c: Likewise.
+	* testsuite/libffi.call/cls_9byte1.c: Likewise.
+	* testsuite/libffi.call/cls_9byte2.c: Likewise.
+	* testsuite/libffi.call/cls_align_double.c: Likewise.
+	* testsuite/libffi.call/cls_align_float.c: Likewise.
+	* testsuite/libffi.call/cls_align_longdouble.c: Likewise.
+	* testsuite/libffi.call/cls_align_longdouble_split.c: Likewise.
+	* testsuite/libffi.call/cls_align_longdouble_split2.c: Likewise.
+	* testsuite/libffi.call/cls_align_pointer.c: Likewise.
+	* testsuite/libffi.call/cls_align_sint16.c: Likewise.
+	* testsuite/libffi.call/cls_align_sint32.c: Likewise.
+	* testsuite/libffi.call/cls_align_sint64.c: Likewise.
+	* testsuite/libffi.call/cls_align_uint16.c: Likewise.
+	* testsuite/libffi.call/cls_align_uint32.c: Likewise.
+	* testsuite/libffi.call/cls_align_uint64.c: Likewise.
+	* testsuite/libffi.call/cls_dbls_struct.c: Likewise.
+	* testsuite/libffi.call/cls_pointer_stack.c: Likewise.
+	* testsuite/libffi.call/err_bad_typedef.c: Likewise.
+	* testsuite/libffi.call/huge_struct.c: Likewise.
+	* testsuite/libffi.call/nested_struct.c: Likewise.
+	* testsuite/libffi.call/nested_struct1.c: Likewise.
+	* testsuite/libffi.call/nested_struct10.c: Likewise.
+	* testsuite/libffi.call/nested_struct2.c: Likewise.
+	* testsuite/libffi.call/nested_struct3.c: Likewise.
+	* testsuite/libffi.call/nested_struct4.c: Likewise.
+	* testsuite/libffi.call/nested_struct5.c: Likewise.
+	* testsuite/libffi.call/nested_struct6.c: Likewise.
+	* testsuite/libffi.call/nested_struct7.c: Likewise.
+	* testsuite/libffi.call/nested_struct8.c: Likewise.
+	* testsuite/libffi.call/nested_struct9.c: Likewise.
+	* testsuite/libffi.call/stret_large.c: Likewise.
+	* testsuite/libffi.call/stret_large2.c: Likewise.
+	* testsuite/libffi.call/stret_medium.c: Likewise.
+	* testsuite/libffi.call/stret_medium2.c: Likewise.
+	* testsuite/libffi.call/struct1.c: Likewise.
+	* testsuite/libffi.call/struct1_win32.c: Likewise.
+	* testsuite/libffi.call/struct2.c: Likewise.
+	* testsuite/libffi.call/struct2_win32.c: Likewise.
+	* testsuite/libffi.call/struct3.c: Likewise.
+	* testsuite/libffi.call/struct4.c: Likewise.
+	* testsuite/libffi.call/struct5.c: Likewise.
+	* testsuite/libffi.call/struct6.c: Likewise.
+	* testsuite/libffi.call/struct7.c: Likewise.
+	* testsuite/libffi.call/struct8.c: Likewise.
+	* testsuite/libffi.call/struct9.c: Likewise.
+	* testsuite/libffi.call/testclosure.c: Likewise.
+
+2012-03-22  Peter Rosin  <peda@lysator.liu.se>
+
 	* src/x86/ffi.c (FFI_INIT_TRAMPOLINE_THISCALL): Use the correct
 	distance (__dis) between the call site and the destination.
 
diff --git a/testsuite/libffi.call/cls_12byte.c b/testsuite/libffi.call/cls_12byte.c
index f0a334f..ea0825d 100644
--- a/testsuite/libffi.call/cls_12byte.c
+++ b/testsuite/libffi.call/cls_12byte.c
@@ -49,15 +49,15 @@ int main (void)
   ffi_type cls_struct_type;
   ffi_type* dbl_arg_types[5];
 
+  struct cls_struct_12byte h_dbl = { 7, 4, 9 };
+  struct cls_struct_12byte j_dbl = { 1, 5, 3 };
+  struct cls_struct_12byte res_dbl;
+
   cls_struct_type.size = 0;
   cls_struct_type.alignment = 0;
   cls_struct_type.type = FFI_TYPE_STRUCT;
   cls_struct_type.elements = cls_struct_fields;
 
-  struct cls_struct_12byte h_dbl = { 7, 4, 9 };
-  struct cls_struct_12byte j_dbl = { 1, 5, 3 };
-  struct cls_struct_12byte res_dbl;
-
   cls_struct_fields[0] = &ffi_type_sint;
   cls_struct_fields[1] = &ffi_type_sint;
   cls_struct_fields[2] = &ffi_type_sint;
diff --git a/testsuite/libffi.call/cls_16byte.c b/testsuite/libffi.call/cls_16byte.c
index 9b9292a..89a08a2 100644
--- a/testsuite/libffi.call/cls_16byte.c
+++ b/testsuite/libffi.call/cls_16byte.c
@@ -50,15 +50,15 @@ int main (void)
   ffi_type cls_struct_type;
   ffi_type* dbl_arg_types[5];
 
+  struct cls_struct_16byte h_dbl = { 7, 8.0, 9 };
+  struct cls_struct_16byte j_dbl = { 1, 9.0, 3 };
+  struct cls_struct_16byte res_dbl;
+
   cls_struct_type.size = 0;
   cls_struct_type.alignment = 0;
   cls_struct_type.type = FFI_TYPE_STRUCT;
   cls_struct_type.elements = cls_struct_fields;
 
-  struct cls_struct_16byte h_dbl = { 7, 8.0, 9 };
-  struct cls_struct_16byte j_dbl = { 1, 9.0, 3 };
-  struct cls_struct_16byte res_dbl;
-
   cls_struct_fields[0] = &ffi_type_sint;
   cls_struct_fields[1] = &ffi_type_double;
   cls_struct_fields[2] = &ffi_type_sint;
diff --git a/testsuite/libffi.call/cls_18byte.c b/testsuite/libffi.call/cls_18byte.c
index 40c8c6d..9f75da8 100644
--- a/testsuite/libffi.call/cls_18byte.c
+++ b/testsuite/libffi.call/cls_18byte.c
@@ -54,15 +54,15 @@ int main (void)
   ffi_type cls_struct_type;
   ffi_type* dbl_arg_types[3];
 
+  struct cls_struct_18byte g_dbl = { 1.0, 127, 126, 3.0 };
+  struct cls_struct_18byte f_dbl = { 4.0, 125, 124, 5.0 };
+  struct cls_struct_18byte res_dbl;
+
   cls_struct_type.size = 0;
   cls_struct_type.alignment = 0;
   cls_struct_type.type = FFI_TYPE_STRUCT;
   cls_struct_type.elements = cls_struct_fields;
 
-  struct cls_struct_18byte g_dbl = { 1.0, 127, 126, 3.0 };
-  struct cls_struct_18byte f_dbl = { 4.0, 125, 124, 5.0 };
-  struct cls_struct_18byte res_dbl;
-
   cls_struct_fields[0] = &ffi_type_double;
   cls_struct_fields[1] = &ffi_type_uchar;
   cls_struct_fields[2] = &ffi_type_uchar;
diff --git a/testsuite/libffi.call/cls_19byte.c b/testsuite/libffi.call/cls_19byte.c
index aa64248..278794b 100644
--- a/testsuite/libffi.call/cls_19byte.c
+++ b/testsuite/libffi.call/cls_19byte.c
@@ -57,15 +57,15 @@ int main (void)
   ffi_type cls_struct_type;
   ffi_type* dbl_arg_types[3];
 
+  struct cls_struct_19byte g_dbl = { 1.0, 127, 126, 3.0, 120 };
+  struct cls_struct_19byte f_dbl = { 4.0, 125, 124, 5.0, 119 };
+  struct cls_struct_19byte res_dbl;
+
   cls_struct_type.size = 0;
   cls_struct_type.alignment = 0;
   cls_struct_type.type = FFI_TYPE_STRUCT;
   cls_struct_type.elements = cls_struct_fields;
 
-  struct cls_struct_19byte g_dbl = { 1.0, 127, 126, 3.0, 120 };
-  struct cls_struct_19byte f_dbl = { 4.0, 125, 124, 5.0, 119 };
-  struct cls_struct_19byte res_dbl;
-
   cls_struct_fields[0] = &ffi_type_double;
   cls_struct_fields[1] = &ffi_type_uchar;
   cls_struct_fields[2] = &ffi_type_uchar;
diff --git a/testsuite/libffi.call/cls_1_1byte.c b/testsuite/libffi.call/cls_1_1byte.c
index b9402d6..82492c0 100644
--- a/testsuite/libffi.call/cls_1_1byte.c
+++ b/testsuite/libffi.call/cls_1_1byte.c
@@ -50,15 +50,15 @@ int main (void)
   ffi_type cls_struct_type;
   ffi_type* dbl_arg_types[5];
 
+  struct cls_struct_1_1byte g_dbl = { 12 };
+  struct cls_struct_1_1byte f_dbl = { 178 };
+  struct cls_struct_1_1byte res_dbl;
+
   cls_struct_type.size = 0;
   cls_struct_type.alignment = 0;
   cls_struct_type.type = FFI_TYPE_STRUCT;
   cls_struct_type.elements = cls_struct_fields;
 
-  struct cls_struct_1_1byte g_dbl = { 12 };
-  struct cls_struct_1_1byte f_dbl = { 178 };
-  struct cls_struct_1_1byte res_dbl;
-
   cls_struct_fields[0] = &ffi_type_uchar;
   cls_struct_fields[1] = NULL;
 
diff --git a/testsuite/libffi.call/cls_20byte.c b/testsuite/libffi.call/cls_20byte.c
index 80dd7ac..3f8bb28 100644
--- a/testsuite/libffi.call/cls_20byte.c
+++ b/testsuite/libffi.call/cls_20byte.c
@@ -50,15 +50,15 @@ int main (void)
   ffi_type cls_struct_type;
   ffi_type* dbl_arg_types[5];
 
+  struct cls_struct_20byte g_dbl = { 1.0, 2.0, 3 };
+  struct cls_struct_20byte f_dbl = { 4.0, 5.0, 7 };
+  struct cls_struct_20byte res_dbl;
+
   cls_struct_type.size = 0;
   cls_struct_type.alignment = 0;
   cls_struct_type.type = FFI_TYPE_STRUCT;
   cls_struct_type.elements = cls_struct_fields;
 
-  struct cls_struct_20byte g_dbl = { 1.0, 2.0, 3 };
-  struct cls_struct_20byte f_dbl = { 4.0, 5.0, 7 };
-  struct cls_struct_20byte res_dbl;
-
   cls_struct_fields[0] = &ffi_type_double;
   cls_struct_fields[1] = &ffi_type_double;
   cls_struct_fields[2] = &ffi_type_sint;
diff --git a/testsuite/libffi.call/cls_20byte1.c b/testsuite/libffi.call/cls_20byte1.c
index 50bcbbf..6562727 100644
--- a/testsuite/libffi.call/cls_20byte1.c
+++ b/testsuite/libffi.call/cls_20byte1.c
@@ -52,15 +52,15 @@ int main (void)
   ffi_type cls_struct_type;
   ffi_type* dbl_arg_types[3];
 
+  struct cls_struct_20byte g_dbl = { 1, 2.0, 3.0 };
+  struct cls_struct_20byte f_dbl = { 4, 5.0, 7.0 };
+  struct cls_struct_20byte res_dbl;
+
   cls_struct_type.size = 0;
   cls_struct_type.alignment = 0;
   cls_struct_type.type = FFI_TYPE_STRUCT;
   cls_struct_type.elements = cls_struct_fields;
 
-  struct cls_struct_20byte g_dbl = { 1, 2.0, 3.0 };
-  struct cls_struct_20byte f_dbl = { 4, 5.0, 7.0 };
-  struct cls_struct_20byte res_dbl;
-
   cls_struct_fields[0] = &ffi_type_sint;
   cls_struct_fields[1] = &ffi_type_double;
   cls_struct_fields[2] = &ffi_type_double;
diff --git a/testsuite/libffi.call/cls_24byte.c b/testsuite/libffi.call/cls_24byte.c
index 46a6eb4..1d82f6e 100644
--- a/testsuite/libffi.call/cls_24byte.c
+++ b/testsuite/libffi.call/cls_24byte.c
@@ -61,17 +61,17 @@ int main (void)
   ffi_type cls_struct_type;
   ffi_type* dbl_arg_types[5];
 
-  cls_struct_type.size = 0;
-  cls_struct_type.alignment = 0;
-  cls_struct_type.type = FFI_TYPE_STRUCT;
-  cls_struct_type.elements = cls_struct_fields;
-
   struct cls_struct_24byte e_dbl = { 9.0, 2.0, 6, 5.0 };
   struct cls_struct_24byte f_dbl = { 1.0, 2.0, 3, 7.0 };
   struct cls_struct_24byte g_dbl = { 4.0, 5.0, 7, 9.0 };
   struct cls_struct_24byte h_dbl = { 8.0, 6.0, 1, 4.0 };
   struct cls_struct_24byte res_dbl;
 
+  cls_struct_type.size = 0;
+  cls_struct_type.alignment = 0;
+  cls_struct_type.type = FFI_TYPE_STRUCT;
+  cls_struct_type.elements = cls_struct_fields;
+
   cls_struct_fields[0] = &ffi_type_double;
   cls_struct_fields[1] = &ffi_type_double;
   cls_struct_fields[2] = &ffi_type_sint;
diff --git a/testsuite/libffi.call/cls_2byte.c b/testsuite/libffi.call/cls_2byte.c
index 101e130..81bb0a6 100644
--- a/testsuite/libffi.call/cls_2byte.c
+++ b/testsuite/libffi.call/cls_2byte.c
@@ -50,15 +50,15 @@ int main (void)
   ffi_type cls_struct_type;
   ffi_type* dbl_arg_types[5];
 
+  struct cls_struct_2byte g_dbl = { 12, 127 };
+  struct cls_struct_2byte f_dbl = { 1, 13 };
+  struct cls_struct_2byte res_dbl;
+
   cls_struct_type.size = 0;
   cls_struct_type.alignment = 0;
   cls_struct_type.type = FFI_TYPE_STRUCT;
   cls_struct_type.elements = cls_struct_fields;
 
-  struct cls_struct_2byte g_dbl = { 12, 127 };
-  struct cls_struct_2byte f_dbl = { 1, 13 };
-  struct cls_struct_2byte res_dbl;
-
   cls_struct_fields[0] = &ffi_type_uchar;
   cls_struct_fields[1] = &ffi_type_uchar;
   cls_struct_fields[2] = NULL;
diff --git a/testsuite/libffi.call/cls_3_1byte.c b/testsuite/libffi.call/cls_3_1byte.c
index fc780c3..b782746 100644
--- a/testsuite/libffi.call/cls_3_1byte.c
+++ b/testsuite/libffi.call/cls_3_1byte.c
@@ -54,15 +54,15 @@ int main (void)
   ffi_type cls_struct_type;
   ffi_type* dbl_arg_types[5];
 
+  struct cls_struct_3_1byte g_dbl = { 12, 13, 14 };
+  struct cls_struct_3_1byte f_dbl = { 178, 179, 180 };
+  struct cls_struct_3_1byte res_dbl;
+
   cls_struct_type.size = 0;
   cls_struct_type.alignment = 0;
   cls_struct_type.type = FFI_TYPE_STRUCT;
   cls_struct_type.elements = cls_struct_fields;
 
-  struct cls_struct_3_1byte g_dbl = { 12, 13, 14 };
-  struct cls_struct_3_1byte f_dbl = { 178, 179, 180 };
-  struct cls_struct_3_1byte res_dbl;
-
   cls_struct_fields[0] = &ffi_type_uchar;
   cls_struct_fields[1] = &ffi_type_uchar;
   cls_struct_fields[2] = &ffi_type_uchar;
diff --git a/testsuite/libffi.call/cls_3byte1.c b/testsuite/libffi.call/cls_3byte1.c
index 5705ce3..a02c463 100644
--- a/testsuite/libffi.call/cls_3byte1.c
+++ b/testsuite/libffi.call/cls_3byte1.c
@@ -50,15 +50,15 @@ int main (void)
   ffi_type cls_struct_type;
   ffi_type* dbl_arg_types[5];
 
+  struct cls_struct_3byte g_dbl = { 12, 119 };
+  struct cls_struct_3byte f_dbl = { 1, 15 };
+  struct cls_struct_3byte res_dbl;
+
   cls_struct_type.size = 0;
   cls_struct_type.alignment = 0;
   cls_struct_type.type = FFI_TYPE_STRUCT;
   cls_struct_type.elements = cls_struct_fields;
 
-  struct cls_struct_3byte g_dbl = { 12, 119 };
-  struct cls_struct_3byte f_dbl = { 1, 15 };
-  struct cls_struct_3byte res_dbl;
-
   cls_struct_fields[0] = &ffi_type_ushort;
   cls_struct_fields[1] = &ffi_type_uchar;
   cls_struct_fields[2] = NULL;
diff --git a/testsuite/libffi.call/cls_3byte2.c b/testsuite/libffi.call/cls_3byte2.c
index 01770a0..c7251ce 100644
--- a/testsuite/libffi.call/cls_3byte2.c
+++ b/testsuite/libffi.call/cls_3byte2.c
@@ -50,15 +50,15 @@ int main (void)
   ffi_type cls_struct_type;
   ffi_type* dbl_arg_types[5];
 
+  struct cls_struct_3byte_1 g_dbl = { 15, 125 };
+  struct cls_struct_3byte_1 f_dbl = { 9, 19 };
+  struct cls_struct_3byte_1 res_dbl;
+
   cls_struct_type.size = 0;
   cls_struct_type.alignment = 0;
   cls_struct_type.type = FFI_TYPE_STRUCT;
   cls_struct_type.elements = cls_struct_fields;
 
-  struct cls_struct_3byte_1 g_dbl = { 15, 125 };
-  struct cls_struct_3byte_1 f_dbl = { 9, 19 };
-  struct cls_struct_3byte_1 res_dbl;
-
   cls_struct_fields[0] = &ffi_type_uchar;
   cls_struct_fields[1] = &ffi_type_ushort;
   cls_struct_fields[2] = NULL;
diff --git a/testsuite/libffi.call/cls_4_1byte.c b/testsuite/libffi.call/cls_4_1byte.c
index f3806d7..2d6d8b6 100644
--- a/testsuite/libffi.call/cls_4_1byte.c
+++ b/testsuite/libffi.call/cls_4_1byte.c
@@ -56,15 +56,15 @@ int main (void)
   ffi_type cls_struct_type;
   ffi_type* dbl_arg_types[5];
 
+  struct cls_struct_4_1byte g_dbl = { 12, 13, 14, 15 };
+  struct cls_struct_4_1byte f_dbl = { 178, 179, 180, 181 };
+  struct cls_struct_4_1byte res_dbl;
+
   cls_struct_type.size = 0;
   cls_struct_type.alignment = 0;
   cls_struct_type.type = FFI_TYPE_STRUCT;
   cls_struct_type.elements = cls_struct_fields;
 
-  struct cls_struct_4_1byte g_dbl = { 12, 13, 14, 15 };
-  struct cls_struct_4_1byte f_dbl = { 178, 179, 180, 181 };
-  struct cls_struct_4_1byte res_dbl;
-
   cls_struct_fields[0] = &ffi_type_uchar;
   cls_struct_fields[1] = &ffi_type_uchar;
   cls_struct_fields[2] = &ffi_type_uchar;
diff --git a/testsuite/libffi.call/cls_4byte.c b/testsuite/libffi.call/cls_4byte.c
index a1aba3c..4ac3787 100644
--- a/testsuite/libffi.call/cls_4byte.c
+++ b/testsuite/libffi.call/cls_4byte.c
@@ -50,15 +50,15 @@ int main (void)
   ffi_type cls_struct_type;
   ffi_type* dbl_arg_types[5];
 
+  struct cls_struct_4byte g_dbl = { 127, 120 };
+  struct cls_struct_4byte f_dbl = { 12, 128 };
+  struct cls_struct_4byte res_dbl;
+
   cls_struct_type.size = 0;
   cls_struct_type.alignment = 0;
   cls_struct_type.type = FFI_TYPE_STRUCT;
   cls_struct_type.elements = cls_struct_fields;
 
-  struct cls_struct_4byte g_dbl = { 127, 120 };
-  struct cls_struct_4byte f_dbl = { 12, 128 };
-  struct cls_struct_4byte res_dbl;
-
   cls_struct_fields[0] = &ffi_type_ushort;
   cls_struct_fields[1] = &ffi_type_ushort;
   cls_struct_fields[2] = NULL;
diff --git a/testsuite/libffi.call/cls_5_1_byte.c b/testsuite/libffi.call/cls_5_1_byte.c
index 2ceba3d..ad9d51c 100644
--- a/testsuite/libffi.call/cls_5_1_byte.c
+++ b/testsuite/libffi.call/cls_5_1_byte.c
@@ -58,15 +58,15 @@ int main (void)
   ffi_type cls_struct_type;
   ffi_type* dbl_arg_types[5];
 
+  struct cls_struct_5byte g_dbl = { 127, 120, 1, 3, 4 };
+  struct cls_struct_5byte f_dbl = { 12, 128, 9, 3, 4 };
+  struct cls_struct_5byte res_dbl = { 0, 0, 0, 0, 0 };
+
   cls_struct_type.size = 0;
   cls_struct_type.alignment = 0;
   cls_struct_type.type = FFI_TYPE_STRUCT;
   cls_struct_type.elements = cls_struct_fields;
 
-  struct cls_struct_5byte g_dbl = { 127, 120, 1, 3, 4 };
-  struct cls_struct_5byte f_dbl = { 12, 128, 9, 3, 4 };
-  struct cls_struct_5byte res_dbl = { 0, 0, 0, 0, 0 };
-
   cls_struct_fields[0] = &ffi_type_uchar;
   cls_struct_fields[1] = &ffi_type_uchar;
   cls_struct_fields[2] = &ffi_type_uchar;
diff --git a/testsuite/libffi.call/cls_5byte.c b/testsuite/libffi.call/cls_5byte.c
index 61d595c..4e0c000 100644
--- a/testsuite/libffi.call/cls_5byte.c
+++ b/testsuite/libffi.call/cls_5byte.c
@@ -53,15 +53,15 @@ int main (void)
   ffi_type cls_struct_type;
   ffi_type* dbl_arg_types[5];
 
+  struct cls_struct_5byte g_dbl = { 127, 120, 1 };
+  struct cls_struct_5byte f_dbl = { 12, 128, 9 };
+  struct cls_struct_5byte res_dbl = { 0, 0, 0 };
+
   cls_struct_type.size = 0;
   cls_struct_type.alignment = 0;
   cls_struct_type.type = FFI_TYPE_STRUCT;
   cls_struct_type.elements = cls_struct_fields;
 
-  struct cls_struct_5byte g_dbl = { 127, 120, 1 };
-  struct cls_struct_5byte f_dbl = { 12, 128, 9 };
-  struct cls_struct_5byte res_dbl = { 0, 0, 0 };
-
   cls_struct_fields[0] = &ffi_type_ushort;
   cls_struct_fields[1] = &ffi_type_ushort;
   cls_struct_fields[2] = &ffi_type_uchar;
diff --git a/testsuite/libffi.call/cls_64byte.c b/testsuite/libffi.call/cls_64byte.c
index 576ebe0..a55edc2 100644
--- a/testsuite/libffi.call/cls_64byte.c
+++ b/testsuite/libffi.call/cls_64byte.c
@@ -66,17 +66,17 @@ int main (void)
   ffi_type cls_struct_type;
   ffi_type* dbl_arg_types[5];
 
-  cls_struct_type.size = 0;
-  cls_struct_type.alignment = 0;
-  cls_struct_type.type = FFI_TYPE_STRUCT;
-  cls_struct_type.elements = cls_struct_fields;
-
   struct cls_struct_64byte e_dbl = { 9.0, 2.0, 6.0, 5.0, 3.0, 4.0, 8.0, 1.0 };
   struct cls_struct_64byte f_dbl = { 1.0, 2.0, 3.0, 7.0, 2.0, 5.0, 6.0, 7.0 };
   struct cls_struct_64byte g_dbl = { 4.0, 5.0, 7.0, 9.0, 1.0, 1.0, 2.0, 9.0 };
   struct cls_struct_64byte h_dbl = { 8.0, 6.0, 1.0, 4.0, 0.0, 3.0, 3.0, 1.0 };
   struct cls_struct_64byte res_dbl;
 
+  cls_struct_type.size = 0;
+  cls_struct_type.alignment = 0;
+  cls_struct_type.type = FFI_TYPE_STRUCT;
+  cls_struct_type.elements = cls_struct_fields;
+
   cls_struct_fields[0] = &ffi_type_double;
   cls_struct_fields[1] = &ffi_type_double;
   cls_struct_fields[2] = &ffi_type_double;
diff --git a/testsuite/libffi.call/cls_6_1_byte.c b/testsuite/libffi.call/cls_6_1_byte.c
index 9f2eff6..b4dcdba 100644
--- a/testsuite/libffi.call/cls_6_1_byte.c
+++ b/testsuite/libffi.call/cls_6_1_byte.c
@@ -60,15 +60,15 @@ int main (void)
   ffi_type cls_struct_type;
   ffi_type* dbl_arg_types[5];
 
+  struct cls_struct_6byte g_dbl = { 127, 120, 1, 3, 4, 5 };
+  struct cls_struct_6byte f_dbl = { 12, 128, 9, 3, 4, 5 };
+  struct cls_struct_6byte res_dbl = { 0, 0, 0, 0, 0, 0 };
+
   cls_struct_type.size = 0;
   cls_struct_type.alignment = 0;
   cls_struct_type.type = FFI_TYPE_STRUCT;
   cls_struct_type.elements = cls_struct_fields;
 
-  struct cls_struct_6byte g_dbl = { 127, 120, 1, 3, 4, 5 };
-  struct cls_struct_6byte f_dbl = { 12, 128, 9, 3, 4, 5 };
-  struct cls_struct_6byte res_dbl = { 0, 0, 0, 0, 0, 0 };
-
   cls_struct_fields[0] = &ffi_type_uchar;
   cls_struct_fields[1] = &ffi_type_uchar;
   cls_struct_fields[2] = &ffi_type_uchar;
diff --git a/testsuite/libffi.call/cls_6byte.c b/testsuite/libffi.call/cls_6byte.c
index 73257b0..7406780 100644
--- a/testsuite/libffi.call/cls_6byte.c
+++ b/testsuite/libffi.call/cls_6byte.c
@@ -56,15 +56,15 @@ int main (void)
   ffi_type cls_struct_type;
   ffi_type* dbl_arg_types[5];
 
+  struct cls_struct_6byte g_dbl = { 127, 120, 1, 128 };
+  struct cls_struct_6byte f_dbl = { 12, 128, 9, 127 };
+  struct cls_struct_6byte res_dbl;
+
   cls_struct_type.size = 0;
   cls_struct_type.alignment = 0;
   cls_struct_type.type = FFI_TYPE_STRUCT;
   cls_struct_type.elements = cls_struct_fields;
 
-  struct cls_struct_6byte g_dbl = { 127, 120, 1, 128 };
-  struct cls_struct_6byte f_dbl = { 12, 128, 9, 127 };
-  struct cls_struct_6byte res_dbl;
-
   cls_struct_fields[0] = &ffi_type_ushort;
   cls_struct_fields[1] = &ffi_type_ushort;
   cls_struct_fields[2] = &ffi_type_uchar;
diff --git a/testsuite/libffi.call/cls_7_1_byte.c b/testsuite/libffi.call/cls_7_1_byte.c
index 50d09c9..14a7e96 100644
--- a/testsuite/libffi.call/cls_7_1_byte.c
+++ b/testsuite/libffi.call/cls_7_1_byte.c
@@ -62,15 +62,15 @@ int main (void)
   ffi_type cls_struct_type;
   ffi_type* dbl_arg_types[5];
 
+  struct cls_struct_7byte g_dbl = { 127, 120, 1, 3, 4, 5, 6 };
+  struct cls_struct_7byte f_dbl = { 12, 128, 9, 3, 4, 5, 6 };
+  struct cls_struct_7byte res_dbl = { 0, 0, 0, 0, 0, 0, 0 };
+
   cls_struct_type.size = 0;
   cls_struct_type.alignment = 0;
   cls_struct_type.type = FFI_TYPE_STRUCT;
   cls_struct_type.elements = cls_struct_fields;
 
-  struct cls_struct_7byte g_dbl = { 127, 120, 1, 3, 4, 5, 6 };
-  struct cls_struct_7byte f_dbl = { 12, 128, 9, 3, 4, 5, 6 };
-  struct cls_struct_7byte res_dbl = { 0, 0, 0, 0, 0, 0, 0 };
-
   cls_struct_fields[0] = &ffi_type_uchar;
   cls_struct_fields[1] = &ffi_type_uchar;
   cls_struct_fields[2] = &ffi_type_uchar;
diff --git a/testsuite/libffi.call/cls_7byte.c b/testsuite/libffi.call/cls_7byte.c
index f5c0000..1645cc6 100644
--- a/testsuite/libffi.call/cls_7byte.c
+++ b/testsuite/libffi.call/cls_7byte.c
@@ -55,15 +55,15 @@ int main (void)
   ffi_type cls_struct_type;
   ffi_type* dbl_arg_types[5];
 
+  struct cls_struct_7byte g_dbl = { 127, 120, 1, 254 };
+  struct cls_struct_7byte f_dbl = { 12, 128, 9, 255 };
+  struct cls_struct_7byte res_dbl;
+
   cls_struct_type.size = 0;
   cls_struct_type.alignment = 0;
   cls_struct_type.type = FFI_TYPE_STRUCT;
   cls_struct_type.elements = cls_struct_fields;
 
-  struct cls_struct_7byte g_dbl = { 127, 120, 1, 254 };
-  struct cls_struct_7byte f_dbl = { 12, 128, 9, 255 };
-  struct cls_struct_7byte res_dbl;
-
   cls_struct_fields[0] = &ffi_type_ushort;
   cls_struct_fields[1] = &ffi_type_ushort;
   cls_struct_fields[2] = &ffi_type_uchar;
diff --git a/testsuite/libffi.call/cls_8byte.c b/testsuite/libffi.call/cls_8byte.c
index 4aa99d1..f6c1ea5 100644
--- a/testsuite/libffi.call/cls_8byte.c
+++ b/testsuite/libffi.call/cls_8byte.c
@@ -49,15 +49,15 @@ int main (void)
   ffi_type cls_struct_type;
   ffi_type* dbl_arg_types[5];
 
+  struct cls_struct_8byte g_dbl = { 1, 2.0 };
+  struct cls_struct_8byte f_dbl = { 4, 5.0 };
+  struct cls_struct_8byte res_dbl;
+
   cls_struct_type.size = 0;
   cls_struct_type.alignment = 0;
   cls_struct_type.type = FFI_TYPE_STRUCT;
   cls_struct_type.elements = cls_struct_fields;
 
-  struct cls_struct_8byte g_dbl = { 1, 2.0 };
-  struct cls_struct_8byte f_dbl = { 4, 5.0 };
-  struct cls_struct_8byte res_dbl;
-
   cls_struct_fields[0] = &ffi_type_sint;
   cls_struct_fields[1] = &ffi_type_float;
   cls_struct_fields[2] = NULL;
diff --git a/testsuite/libffi.call/cls_9byte1.c b/testsuite/libffi.call/cls_9byte1.c
index cc5e9d6..0b85722 100644
--- a/testsuite/libffi.call/cls_9byte1.c
+++ b/testsuite/libffi.call/cls_9byte1.c
@@ -50,15 +50,15 @@ int main (void)
   ffi_type cls_struct_type;
   ffi_type* dbl_arg_types[3];
 
+  struct cls_struct_9byte h_dbl = { 7, 8.0};
+  struct cls_struct_9byte j_dbl = { 1, 9.0};
+  struct cls_struct_9byte res_dbl;
+
   cls_struct_type.size = 0;
   cls_struct_type.alignment = 0;
   cls_struct_type.type = FFI_TYPE_STRUCT;
   cls_struct_type.elements = cls_struct_fields;
 
-  struct cls_struct_9byte h_dbl = { 7, 8.0};
-  struct cls_struct_9byte j_dbl = { 1, 9.0};
-  struct cls_struct_9byte res_dbl;
-
   cls_struct_fields[0] = &ffi_type_sint;
   cls_struct_fields[1] = &ffi_type_double;
   cls_struct_fields[2] = NULL;
diff --git a/testsuite/libffi.call/cls_9byte2.c b/testsuite/libffi.call/cls_9byte2.c
index 5c0ba0d..edf991d 100644
--- a/testsuite/libffi.call/cls_9byte2.c
+++ b/testsuite/libffi.call/cls_9byte2.c
@@ -50,15 +50,15 @@ int main (void)
   ffi_type cls_struct_type;
   ffi_type* dbl_arg_types[3];
 
+  struct cls_struct_9byte h_dbl = { 7.0, 8};
+  struct cls_struct_9byte j_dbl = { 1.0, 9};
+  struct cls_struct_9byte res_dbl;
+
   cls_struct_type.size = 0;
   cls_struct_type.alignment = 0;
   cls_struct_type.type = FFI_TYPE_STRUCT;
   cls_struct_type.elements = cls_struct_fields;
 
-  struct cls_struct_9byte h_dbl = { 7.0, 8};
-  struct cls_struct_9byte j_dbl = { 1.0, 9};
-  struct cls_struct_9byte res_dbl;
-
   cls_struct_fields[0] = &ffi_type_double;
   cls_struct_fields[1] = &ffi_type_sint;
   cls_struct_fields[2] = NULL;
diff --git a/testsuite/libffi.call/cls_align_double.c b/testsuite/libffi.call/cls_align_double.c
index 22b94d5..aad5f3c 100644
--- a/testsuite/libffi.call/cls_align_double.c
+++ b/testsuite/libffi.call/cls_align_double.c
@@ -52,15 +52,15 @@ int main (void)
   ffi_type cls_struct_type;
   ffi_type* dbl_arg_types[5];
 
+  struct cls_struct_align g_dbl = { 12, 4951, 127 };
+  struct cls_struct_align f_dbl = { 1, 9320, 13 };
+  struct cls_struct_align res_dbl;
+
   cls_struct_type.size = 0;
   cls_struct_type.alignment = 0;
   cls_struct_type.type = FFI_TYPE_STRUCT;
   cls_struct_type.elements = cls_struct_fields;
 
-  struct cls_struct_align g_dbl = { 12, 4951, 127 };
-  struct cls_struct_align f_dbl = { 1, 9320, 13 };
-  struct cls_struct_align res_dbl;
-
   cls_struct_fields[0] = &ffi_type_uchar;
   cls_struct_fields[1] = &ffi_type_double;
   cls_struct_fields[2] = &ffi_type_uchar;
diff --git a/testsuite/libffi.call/cls_align_float.c b/testsuite/libffi.call/cls_align_float.c
index 62637f2..37e0855 100644
--- a/testsuite/libffi.call/cls_align_float.c
+++ b/testsuite/libffi.call/cls_align_float.c
@@ -50,15 +50,15 @@ int main (void)
   ffi_type cls_struct_type;
   ffi_type* dbl_arg_types[5];
 
+  struct cls_struct_align g_dbl = { 12, 4951, 127 };
+  struct cls_struct_align f_dbl = { 1, 9320, 13 };
+  struct cls_struct_align res_dbl;
+
   cls_struct_type.size = 0;
   cls_struct_type.alignment = 0;
   cls_struct_type.type = FFI_TYPE_STRUCT;
   cls_struct_type.elements = cls_struct_fields;
 
-  struct cls_struct_align g_dbl = { 12, 4951, 127 };
-  struct cls_struct_align f_dbl = { 1, 9320, 13 };
-  struct cls_struct_align res_dbl;
-
   cls_struct_fields[0] = &ffi_type_uchar;
   cls_struct_fields[1] = &ffi_type_float;
   cls_struct_fields[2] = &ffi_type_uchar;
diff --git a/testsuite/libffi.call/cls_align_longdouble.c b/testsuite/libffi.call/cls_align_longdouble.c
index af38060..b3322d8 100644
--- a/testsuite/libffi.call/cls_align_longdouble.c
+++ b/testsuite/libffi.call/cls_align_longdouble.c
@@ -51,15 +51,15 @@ int main (void)
   ffi_type cls_struct_type;
   ffi_type* dbl_arg_types[5];
 
+  struct cls_struct_align g_dbl = { 12, 4951, 127 };
+  struct cls_struct_align f_dbl = { 1, 9320, 13 };
+  struct cls_struct_align res_dbl;
+
   cls_struct_type.size = 0;
   cls_struct_type.alignment = 0;
   cls_struct_type.type = FFI_TYPE_STRUCT;
   cls_struct_type.elements = cls_struct_fields;
 
-  struct cls_struct_align g_dbl = { 12, 4951, 127 };
-  struct cls_struct_align f_dbl = { 1, 9320, 13 };
-  struct cls_struct_align res_dbl;
-
   cls_struct_fields[0] = &ffi_type_uchar;
   cls_struct_fields[1] = &ffi_type_longdouble;
   cls_struct_fields[2] = &ffi_type_uchar;
diff --git a/testsuite/libffi.call/cls_align_longdouble_split.c b/testsuite/libffi.call/cls_align_longdouble_split.c
index a3732bd..15f9365 100644
--- a/testsuite/libffi.call/cls_align_longdouble_split.c
+++ b/testsuite/libffi.call/cls_align_longdouble_split.c
@@ -87,15 +87,15 @@ int main (void)
 	ffi_type cls_struct_type;
 	ffi_type* dbl_arg_types[3];
 
+	struct cls_struct_align g_dbl = { 1, 2, 3, 4, 5, 6, 7 };
+	struct cls_struct_align f_dbl = { 8, 9, 10, 11, 12, 13, 14 };
+	struct cls_struct_align res_dbl;
+
 	cls_struct_type.size = 0;
 	cls_struct_type.alignment = 0;
 	cls_struct_type.type = FFI_TYPE_STRUCT;
 	cls_struct_type.elements = cls_struct_fields;
 
-	struct cls_struct_align g_dbl = { 1, 2, 3, 4, 5, 6, 7 };
-	struct cls_struct_align f_dbl = { 8, 9, 10, 11, 12, 13, 14 };
-	struct cls_struct_align res_dbl;
-
 	cls_struct_fields[0] = &ffi_type_longdouble;
 	cls_struct_fields[1] = &ffi_type_longdouble;
 	cls_struct_fields[2] = &ffi_type_longdouble;
diff --git a/testsuite/libffi.call/cls_align_longdouble_split2.c b/testsuite/libffi.call/cls_align_longdouble_split2.c
index 63a0f76..ca1c356 100644
--- a/testsuite/libffi.call/cls_align_longdouble_split2.c
+++ b/testsuite/libffi.call/cls_align_longdouble_split2.c
@@ -67,15 +67,15 @@ int main (void)
 	ffi_type cls_struct_type;
 	ffi_type* dbl_arg_types[3];
 
+	struct cls_struct_align g_dbl = { 1, 2, 3, 4, 5, 6, 7 };
+	struct cls_struct_align f_dbl = { 8, 9, 10, 11, 12, 13, 14 };
+	struct cls_struct_align res_dbl;
+
 	cls_struct_type.size = 0;
 	cls_struct_type.alignment = 0;
 	cls_struct_type.type = FFI_TYPE_STRUCT;
 	cls_struct_type.elements = cls_struct_fields;
 
-	struct cls_struct_align g_dbl = { 1, 2, 3, 4, 5, 6, 7 };
-	struct cls_struct_align f_dbl = { 8, 9, 10, 11, 12, 13, 14 };
-	struct cls_struct_align res_dbl;
-
 	cls_struct_fields[0] = &ffi_type_longdouble;
 	cls_struct_fields[1] = &ffi_type_longdouble;
 	cls_struct_fields[2] = &ffi_type_longdouble;
diff --git a/testsuite/libffi.call/cls_align_pointer.c b/testsuite/libffi.call/cls_align_pointer.c
index cbc4f95..8fbf36a 100644
--- a/testsuite/libffi.call/cls_align_pointer.c
+++ b/testsuite/libffi.call/cls_align_pointer.c
@@ -54,15 +54,15 @@ int main (void)
   ffi_type cls_struct_type;
   ffi_type* dbl_arg_types[5];
 
+  struct cls_struct_align g_dbl = { 12, (void *)4951, 127 };
+  struct cls_struct_align f_dbl = { 1, (void *)9320, 13 };
+  struct cls_struct_align res_dbl;
+
   cls_struct_type.size = 0;
   cls_struct_type.alignment = 0;
   cls_struct_type.type = FFI_TYPE_STRUCT;
   cls_struct_type.elements = cls_struct_fields;
 
-  struct cls_struct_align g_dbl = { 12, (void *)4951, 127 };
-  struct cls_struct_align f_dbl = { 1, (void *)9320, 13 };
-  struct cls_struct_align res_dbl;
-
   cls_struct_fields[0] = &ffi_type_uchar;
   cls_struct_fields[1] = &ffi_type_pointer;
   cls_struct_fields[2] = &ffi_type_uchar;
diff --git a/testsuite/libffi.call/cls_align_sint16.c b/testsuite/libffi.call/cls_align_sint16.c
index 383ea41..039b874 100644
--- a/testsuite/libffi.call/cls_align_sint16.c
+++ b/testsuite/libffi.call/cls_align_sint16.c
@@ -50,15 +50,15 @@ int main (void)
   ffi_type cls_struct_type;
   ffi_type* dbl_arg_types[5];
 
+  struct cls_struct_align g_dbl = { 12, 4951, 127 };
+  struct cls_struct_align f_dbl = { 1, 9320, 13 };
+  struct cls_struct_align res_dbl;
+
   cls_struct_type.size = 0;
   cls_struct_type.alignment = 0;
   cls_struct_type.type = FFI_TYPE_STRUCT;
   cls_struct_type.elements = cls_struct_fields;
 
-  struct cls_struct_align g_dbl = { 12, 4951, 127 };
-  struct cls_struct_align f_dbl = { 1, 9320, 13 };
-  struct cls_struct_align res_dbl;
-
   cls_struct_fields[0] = &ffi_type_uchar;
   cls_struct_fields[1] = &ffi_type_sshort;
   cls_struct_fields[2] = &ffi_type_uchar;
diff --git a/testsuite/libffi.call/cls_align_sint32.c b/testsuite/libffi.call/cls_align_sint32.c
index 705d78c..c96c6d1 100644
--- a/testsuite/libffi.call/cls_align_sint32.c
+++ b/testsuite/libffi.call/cls_align_sint32.c
@@ -50,15 +50,15 @@ int main (void)
   ffi_type cls_struct_type;
   ffi_type* dbl_arg_types[5];
 
+  struct cls_struct_align g_dbl = { 12, 4951, 127 };
+  struct cls_struct_align f_dbl = { 1, 9320, 13 };
+  struct cls_struct_align res_dbl;
+
   cls_struct_type.size = 0;
   cls_struct_type.alignment = 0;
   cls_struct_type.type = FFI_TYPE_STRUCT;
   cls_struct_type.elements = cls_struct_fields;
 
-  struct cls_struct_align g_dbl = { 12, 4951, 127 };
-  struct cls_struct_align f_dbl = { 1, 9320, 13 };
-  struct cls_struct_align res_dbl;
-
   cls_struct_fields[0] = &ffi_type_uchar;
   cls_struct_fields[1] = &ffi_type_sint;
   cls_struct_fields[2] = &ffi_type_uchar;
diff --git a/testsuite/libffi.call/cls_align_sint64.c b/testsuite/libffi.call/cls_align_sint64.c
index 31d53af..9aa7bdd 100644
--- a/testsuite/libffi.call/cls_align_sint64.c
+++ b/testsuite/libffi.call/cls_align_sint64.c
@@ -51,15 +51,15 @@ int main (void)
   ffi_type cls_struct_type;
   ffi_type* dbl_arg_types[5];
 
+  struct cls_struct_align g_dbl = { 12, 4951, 127 };
+  struct cls_struct_align f_dbl = { 1, 9320, 13 };
+  struct cls_struct_align res_dbl;
+
   cls_struct_type.size = 0;
   cls_struct_type.alignment = 0;
   cls_struct_type.type = FFI_TYPE_STRUCT;
   cls_struct_type.elements = cls_struct_fields;
 
-  struct cls_struct_align g_dbl = { 12, 4951, 127 };
-  struct cls_struct_align f_dbl = { 1, 9320, 13 };
-  struct cls_struct_align res_dbl;
-
   cls_struct_fields[0] = &ffi_type_uchar;
   cls_struct_fields[1] = &ffi_type_sint64;
   cls_struct_fields[2] = &ffi_type_uchar;
diff --git a/testsuite/libffi.call/cls_align_uint16.c b/testsuite/libffi.call/cls_align_uint16.c
index cb6b748..97620b7 100644
--- a/testsuite/libffi.call/cls_align_uint16.c
+++ b/testsuite/libffi.call/cls_align_uint16.c
@@ -50,15 +50,15 @@ int main (void)
   ffi_type cls_struct_type;
   ffi_type* dbl_arg_types[5];
 
+  struct cls_struct_align g_dbl = { 12, 4951, 127 };
+  struct cls_struct_align f_dbl = { 1, 9320, 13 };
+  struct cls_struct_align res_dbl;
+
   cls_struct_type.size = 0;
   cls_struct_type.alignment = 0;
   cls_struct_type.type = FFI_TYPE_STRUCT;
   cls_struct_type.elements = cls_struct_fields;
 
-  struct cls_struct_align g_dbl = { 12, 4951, 127 };
-  struct cls_struct_align f_dbl = { 1, 9320, 13 };
-  struct cls_struct_align res_dbl;
-
   cls_struct_fields[0] = &ffi_type_uchar;
   cls_struct_fields[1] = &ffi_type_ushort;
   cls_struct_fields[2] = &ffi_type_uchar;
diff --git a/testsuite/libffi.call/cls_align_uint32.c b/testsuite/libffi.call/cls_align_uint32.c
index e453d3e..5766fad 100644
--- a/testsuite/libffi.call/cls_align_uint32.c
+++ b/testsuite/libffi.call/cls_align_uint32.c
@@ -50,15 +50,15 @@ int main (void)
   ffi_type cls_struct_type;
   ffi_type* dbl_arg_types[5];
 
+  struct cls_struct_align g_dbl = { 12, 4951, 127 };
+  struct cls_struct_align f_dbl = { 1, 9320, 13 };
+  struct cls_struct_align res_dbl;
+
   cls_struct_type.size = 0;
   cls_struct_type.alignment = 0;
   cls_struct_type.type = FFI_TYPE_STRUCT;
   cls_struct_type.elements = cls_struct_fields;
 
-  struct cls_struct_align g_dbl = { 12, 4951, 127 };
-  struct cls_struct_align f_dbl = { 1, 9320, 13 };
-  struct cls_struct_align res_dbl;
-
   cls_struct_fields[0] = &ffi_type_uchar;
   cls_struct_fields[1] = &ffi_type_uint;
   cls_struct_fields[2] = &ffi_type_uchar;
diff --git a/testsuite/libffi.call/cls_align_uint64.c b/testsuite/libffi.call/cls_align_uint64.c
index 495c79f..a52cb89 100644
--- a/testsuite/libffi.call/cls_align_uint64.c
+++ b/testsuite/libffi.call/cls_align_uint64.c
@@ -52,15 +52,15 @@ int main (void)
   ffi_type cls_struct_type;
   ffi_type* dbl_arg_types[5];
 
+  struct cls_struct_align g_dbl = { 12, 4951, 127 };
+  struct cls_struct_align f_dbl = { 1, 9320, 13 };
+  struct cls_struct_align res_dbl;
+
   cls_struct_type.size = 0;
   cls_struct_type.alignment = 0;
   cls_struct_type.type = FFI_TYPE_STRUCT;
   cls_struct_type.elements = cls_struct_fields;
 
-  struct cls_struct_align g_dbl = { 12, 4951, 127 };
-  struct cls_struct_align f_dbl = { 1, 9320, 13 };
-  struct cls_struct_align res_dbl;
-
   cls_struct_fields[0] = &ffi_type_uchar;
   cls_struct_fields[1] = &ffi_type_uint64;
   cls_struct_fields[2] = &ffi_type_uchar;
diff --git a/testsuite/libffi.call/cls_dbls_struct.c b/testsuite/libffi.call/cls_dbls_struct.c
index 660dabb..d663791 100644
--- a/testsuite/libffi.call/cls_dbls_struct.c
+++ b/testsuite/libffi.call/cls_dbls_struct.c
@@ -37,6 +37,8 @@ int main(int argc __UNUSED__, char** argv __UNUSED__)
 	ffi_type	ts1_type;
 	ffi_type*	ts1_type_elements[4];
 
+	Dbls arg = { 1.0, 2.0 };
+
 	ts1_type.size = 0;
 	ts1_type.alignment = 0;
 	ts1_type.type = FFI_TYPE_STRUCT;
@@ -48,8 +50,6 @@ int main(int argc __UNUSED__, char** argv __UNUSED__)
 
 	cl_arg_types[0] = &ts1_type;
 
-	Dbls arg = { 1.0, 2.0 };
-
 	/* Initialize the cif */
 	CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 1,
 				 &ffi_type_void, cl_arg_types) == FFI_OK);
diff --git a/testsuite/libffi.call/cls_pointer_stack.c b/testsuite/libffi.call/cls_pointer_stack.c
index d631cf8..e31139e 100644
--- a/testsuite/libffi.call/cls_pointer_stack.c
+++ b/testsuite/libffi.call/cls_pointer_stack.c
@@ -28,11 +28,12 @@ void* cls_pointer_fn2(void* a1, void* a2)
 	char		trample6	= trample4 + ((char*)&a2)[1];
 	long double	trample7	= (intptr_t)trample5 + (intptr_t)trample1;
 	char		trample8	= trample6 + trample2;
+	void*		result;
 
 	dummyVar	= dummy_func(trample1, trample2, trample3, trample4,
 		trample5, trample6, trample7, trample8);
 
-	void*	result	= (void*)((intptr_t)a1 + (intptr_t)a2);
+	result	= (void*)((intptr_t)a1 + (intptr_t)a2);
 
 	printf("0x%08x 0x%08x: 0x%08x\n", 
 	       (unsigned int)(uintptr_t) a1,
@@ -52,11 +53,12 @@ void* cls_pointer_fn1(void* a1, void* a2)
 	char		trample6	= trample4 + ((char*)&a2)[1];
 	long double	trample7	= (intptr_t)trample5 + (intptr_t)trample1;
 	char		trample8	= trample6 + trample2;
+	void*		result;
 
 	dummyVar	= dummy_func(trample1, trample2, trample3, trample4,
 		trample5, trample6, trample7, trample8);
 
-	void*	result	= (void*)((intptr_t)a1 + (intptr_t)a2);
+	result	= (void*)((intptr_t)a1 + (intptr_t)a2);
 
 	printf("0x%08x 0x%08x: 0x%08x\n",
                (unsigned int)(intptr_t) a1,
diff --git a/testsuite/libffi.call/err_bad_typedef.c b/testsuite/libffi.call/err_bad_typedef.c
index 2539273..bf60161 100644
--- a/testsuite/libffi.call/err_bad_typedef.c
+++ b/testsuite/libffi.call/err_bad_typedef.c
@@ -13,10 +13,10 @@ int main (void)
 	ffi_cif cif;
 	ffi_type* arg_types[1];
 
-	arg_types[0] = NULL;
-
 	ffi_type	badType	= ffi_type_void;
 
+	arg_types[0] = NULL;
+
 	badType.size = 0;
 
 	CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 0, &badType,
diff --git a/testsuite/libffi.call/huge_struct.c b/testsuite/libffi.call/huge_struct.c
index e04e1d5..380fedf 100644
--- a/testsuite/libffi.call/huge_struct.c
+++ b/testsuite/libffi.call/huge_struct.c
@@ -229,6 +229,19 @@ main(int argc __UNUSED__, const char** argv __UNUSED__)
 	ffi_type*	st_fields[51];
 	BigStruct	retVal;
 
+	uint8_t		ui8		= 1;
+	int8_t		si8		= 2;
+	uint16_t	ui16	= 3;
+	int16_t		si16	= 4;
+	uint32_t	ui32	= 5;
+	int32_t		si32	= 6;
+	uint64_t	ui64	= 7;
+	int64_t		si64	= 8;
+	float		f		= 9;
+	double		d		= 10;
+	long double	ld		= 11;
+	char*		p		= (char*)0x12345678;
+
 	memset (&retVal, 0, sizeof(retVal));
 
 	ret_struct_type.size = 0;
@@ -251,19 +264,6 @@ main(int argc __UNUSED__, const char** argv __UNUSED__)
 
 	st_fields[50] = NULL;
 
-	uint8_t		ui8		= 1;
-	int8_t		si8		= 2;
-	uint16_t	ui16	= 3;
-	int16_t		si16	= 4;
-	uint32_t	ui32	= 5;
-	int32_t		si32	= 6;
-	uint64_t	ui64	= 7;
-	int64_t		si64	= 8;
-	float		f		= 9;
-	double		d		= 10;
-	long double	ld		= 11;
-	char*		p		= (char*)0x12345678;
-
 	argTypes[0]		= argTypes[12]	= argTypes[24]	= argTypes[36]	= argTypes[48]	= &ffi_type_uint8;
 	argValues[0]	= argValues[12]	= argValues[24]	= argValues[36]	= argValues[48]	= &ui8;
 	argTypes[1]		= argTypes[13]	= argTypes[25]	= argTypes[37]	= argTypes[49]	= &ffi_type_sint8;
diff --git a/testsuite/libffi.call/nested_struct.c b/testsuite/libffi.call/nested_struct.c
index 8aa527e..c15e3a0 100644
--- a/testsuite/libffi.call/nested_struct.c
+++ b/testsuite/libffi.call/nested_struct.c
@@ -77,6 +77,12 @@ int main (void)
   ffi_type cls_struct_type, cls_struct_type1, cls_struct_type2;
   ffi_type* dbl_arg_types[5];
 
+  struct cls_struct_16byte1 e_dbl = { 9.0, 2.0, 6};
+  struct cls_struct_16byte2 f_dbl = { 1, 2.0, 3.0};
+  struct cls_struct_combined g_dbl = {{4.0, 5.0, 6},
+				      {3, 1.0, 8.0}};
+  struct cls_struct_combined res_dbl;
+
   cls_struct_type.size = 0;
   cls_struct_type.alignment = 0;
   cls_struct_type.type = FFI_TYPE_STRUCT;
@@ -92,12 +98,6 @@ int main (void)
   cls_struct_type2.type = FFI_TYPE_STRUCT;
   cls_struct_type2.elements = cls_struct_fields2;
 
-  struct cls_struct_16byte1 e_dbl = { 9.0, 2.0, 6};
-  struct cls_struct_16byte2 f_dbl = { 1, 2.0, 3.0};
-  struct cls_struct_combined g_dbl = {{4.0, 5.0, 6},
-				      {3, 1.0, 8.0}};
-  struct cls_struct_combined res_dbl;
-
   cls_struct_fields[0] = &ffi_type_double;
   cls_struct_fields[1] = &ffi_type_float;
   cls_struct_fields[2] = &ffi_type_sint;
diff --git a/testsuite/libffi.call/nested_struct1.c b/testsuite/libffi.call/nested_struct1.c
index 2a9f515..1087f7b 100644
--- a/testsuite/libffi.call/nested_struct1.c
+++ b/testsuite/libffi.call/nested_struct1.c
@@ -81,6 +81,13 @@ int main (void)
   ffi_type cls_struct_type, cls_struct_type1, cls_struct_type2;
   ffi_type* dbl_arg_types[5];
 
+  struct cls_struct_16byte1 e_dbl = { 9.0, 2.0, 6};
+  struct cls_struct_16byte2 f_dbl = { 1, 2.0, 3.0};
+  struct cls_struct_combined g_dbl = {{4.0, 5.0, 6},
+				      {3, 1.0, 8.0}};
+  struct cls_struct_16byte1 h_dbl = { 3.0, 2.0, 4};
+  struct cls_struct_combined res_dbl;
+
   cls_struct_type.size = 0;
   cls_struct_type.alignment = 0;
   cls_struct_type.type = FFI_TYPE_STRUCT;
@@ -96,13 +103,6 @@ int main (void)
   cls_struct_type2.type = FFI_TYPE_STRUCT;
   cls_struct_type2.elements = cls_struct_fields2;
 
-  struct cls_struct_16byte1 e_dbl = { 9.0, 2.0, 6};
-  struct cls_struct_16byte2 f_dbl = { 1, 2.0, 3.0};
-  struct cls_struct_combined g_dbl = {{4.0, 5.0, 6},
-				      {3, 1.0, 8.0}};
-  struct cls_struct_16byte1 h_dbl = { 3.0, 2.0, 4};
-  struct cls_struct_combined res_dbl;
-
   cls_struct_fields[0] = &ffi_type_double;
   cls_struct_fields[1] = &ffi_type_float;
   cls_struct_fields[2] = &ffi_type_sint;
diff --git a/testsuite/libffi.call/nested_struct10.c b/testsuite/libffi.call/nested_struct10.c
index d6a718b..34a74e7 100644
--- a/testsuite/libffi.call/nested_struct10.c
+++ b/testsuite/libffi.call/nested_struct10.c
@@ -67,6 +67,12 @@ int main (void)
   ffi_type cls_struct_type, cls_struct_type1, cls_struct_type2;
   ffi_type* dbl_arg_types[4];
 
+  struct A e_dbl = { 1LL, 7};
+  struct B f_dbl = { 99, {12LL , 127}, 255};
+  struct C g_dbl = { 2LL, 9};
+
+  struct B res_dbl;
+
   cls_struct_type.size = 0;
   cls_struct_type.alignment = 0;
   cls_struct_type.type = FFI_TYPE_STRUCT;
@@ -82,12 +88,6 @@ int main (void)
   cls_struct_type2.type = FFI_TYPE_STRUCT;
   cls_struct_type2.elements = cls_struct_fields2;
 
-  struct A e_dbl = { 1LL, 7};
-  struct B f_dbl = { 99, {12LL , 127}, 255};
-  struct C g_dbl = { 2LL, 9};
-
-  struct B res_dbl;
-
   cls_struct_fields[0] = &ffi_type_uint64;
   cls_struct_fields[1] = &ffi_type_uchar;
   cls_struct_fields[2] = NULL;
diff --git a/testsuite/libffi.call/nested_struct2.c b/testsuite/libffi.call/nested_struct2.c
index de1584c..69268cd 100644
--- a/testsuite/libffi.call/nested_struct2.c
+++ b/testsuite/libffi.call/nested_struct2.c
@@ -57,6 +57,11 @@ int main (void)
   ffi_type cls_struct_type, cls_struct_type1;
   ffi_type* dbl_arg_types[3];
 
+  struct A e_dbl = { 1, 7};
+  struct B f_dbl = {{12 , 127}, 99};
+
+  struct B res_dbl;
+
   cls_struct_type.size = 0;
   cls_struct_type.alignment = 0;
   cls_struct_type.type = FFI_TYPE_STRUCT;
@@ -67,11 +72,6 @@ int main (void)
   cls_struct_type1.type = FFI_TYPE_STRUCT;
   cls_struct_type1.elements = cls_struct_fields1;
 
-  struct A e_dbl = { 1, 7};
-  struct B f_dbl = {{12 , 127}, 99};
-
-  struct B res_dbl;
-
   cls_struct_fields[0] = &ffi_type_ulong;
   cls_struct_fields[1] = &ffi_type_uchar;
   cls_struct_fields[2] = NULL;
diff --git a/testsuite/libffi.call/nested_struct3.c b/testsuite/libffi.call/nested_struct3.c
index 58aa853..ab18cad 100644
--- a/testsuite/libffi.call/nested_struct3.c
+++ b/testsuite/libffi.call/nested_struct3.c
@@ -58,6 +58,11 @@ int main (void)
   ffi_type cls_struct_type, cls_struct_type1;
   ffi_type* dbl_arg_types[3];
 
+  struct A e_dbl = { 1LL, 7};
+  struct B f_dbl = {{12LL , 127}, 99};
+
+  struct B res_dbl;
+
   cls_struct_type.size = 0;
   cls_struct_type.alignment = 0;
   cls_struct_type.type = FFI_TYPE_STRUCT;
@@ -68,11 +73,6 @@ int main (void)
   cls_struct_type1.type = FFI_TYPE_STRUCT;
   cls_struct_type1.elements = cls_struct_fields1;
 
-  struct A e_dbl = { 1LL, 7};
-  struct B f_dbl = {{12LL , 127}, 99};
-
-  struct B res_dbl;
-
   cls_struct_fields[0] = &ffi_type_uint64;
   cls_struct_fields[1] = &ffi_type_uchar;
   cls_struct_fields[2] = NULL;
diff --git a/testsuite/libffi.call/nested_struct4.c b/testsuite/libffi.call/nested_struct4.c
index 98e491e..2ffb4d6 100644
--- a/testsuite/libffi.call/nested_struct4.c
+++ b/testsuite/libffi.call/nested_struct4.c
@@ -58,6 +58,11 @@ int main (void)
   ffi_type cls_struct_type, cls_struct_type1;
   ffi_type* dbl_arg_types[3];
 
+  struct A e_dbl = { 1.0, 7};
+  struct B f_dbl = {{12.0 , 127}, 99};
+
+  struct B res_dbl;
+
   cls_struct_type.size = 0;
   cls_struct_type.alignment = 0;
   cls_struct_type.type = FFI_TYPE_STRUCT;
@@ -68,11 +73,6 @@ int main (void)
   cls_struct_type1.type = FFI_TYPE_STRUCT;
   cls_struct_type1.elements = cls_struct_fields1;
 
-  struct A e_dbl = { 1.0, 7};
-  struct B f_dbl = {{12.0 , 127}, 99};
-
-  struct B res_dbl;
-
   cls_struct_fields[0] = &ffi_type_double;
   cls_struct_fields[1] = &ffi_type_uchar;
   cls_struct_fields[2] = NULL;
diff --git a/testsuite/libffi.call/nested_struct5.c b/testsuite/libffi.call/nested_struct5.c
index d8e3537..6c79845 100644
--- a/testsuite/libffi.call/nested_struct5.c
+++ b/testsuite/libffi.call/nested_struct5.c
@@ -58,6 +58,11 @@ int main (void)
   ffi_type cls_struct_type, cls_struct_type1;
   ffi_type* dbl_arg_types[3];
 
+  struct A e_dbl = { 1.0, 7};
+  struct B f_dbl = {{12.0 , 127}, 99};
+
+  struct B res_dbl;
+
   cls_struct_type.size = 0;
   cls_struct_type.alignment = 0;
   cls_struct_type.type = FFI_TYPE_STRUCT;
@@ -68,11 +73,6 @@ int main (void)
   cls_struct_type1.type = FFI_TYPE_STRUCT;
   cls_struct_type1.elements = cls_struct_fields1;
 
-  struct A e_dbl = { 1.0, 7};
-  struct B f_dbl = {{12.0 , 127}, 99};
-
-  struct B res_dbl;
-
   cls_struct_fields[0] = &ffi_type_longdouble;
   cls_struct_fields[1] = &ffi_type_uchar;
   cls_struct_fields[2] = NULL;
diff --git a/testsuite/libffi.call/nested_struct6.c b/testsuite/libffi.call/nested_struct6.c
index 2f2b25a..59d3579 100644
--- a/testsuite/libffi.call/nested_struct6.c
+++ b/testsuite/libffi.call/nested_struct6.c
@@ -66,6 +66,12 @@ int main (void)
   ffi_type cls_struct_type, cls_struct_type1, cls_struct_type2;
   ffi_type* dbl_arg_types[4];
 
+  struct A e_dbl = { 1.0, 7};
+  struct B f_dbl = {{12.0 , 127}, 99};
+  struct C g_dbl = { 2, 9};
+
+  struct B res_dbl;
+
   cls_struct_type.size = 0;
   cls_struct_type.alignment = 0;
   cls_struct_type.type = FFI_TYPE_STRUCT;
@@ -81,12 +87,6 @@ int main (void)
   cls_struct_type2.type = FFI_TYPE_STRUCT;
   cls_struct_type2.elements = cls_struct_fields2;
 
-  struct A e_dbl = { 1.0, 7};
-  struct B f_dbl = {{12.0 , 127}, 99};
-  struct C g_dbl = { 2, 9};
-
-  struct B res_dbl;
-
   cls_struct_fields[0] = &ffi_type_double;
   cls_struct_fields[1] = &ffi_type_uchar;
   cls_struct_fields[2] = NULL;
diff --git a/testsuite/libffi.call/nested_struct7.c b/testsuite/libffi.call/nested_struct7.c
index 14c7023..27595e6 100644
--- a/testsuite/libffi.call/nested_struct7.c
+++ b/testsuite/libffi.call/nested_struct7.c
@@ -58,6 +58,11 @@ int main (void)
   ffi_type cls_struct_type, cls_struct_type1;
   ffi_type* dbl_arg_types[3];
 
+  struct A e_dbl = { 1LL, 7};
+  struct B f_dbl = {{12.0 , 127}, 99};
+
+  struct B res_dbl;
+
   cls_struct_type.size = 0;
   cls_struct_type.alignment = 0;
   cls_struct_type.type = FFI_TYPE_STRUCT;
@@ -68,11 +73,6 @@ int main (void)
   cls_struct_type1.type = FFI_TYPE_STRUCT;
   cls_struct_type1.elements = cls_struct_fields1;
 
-  struct A e_dbl = { 1LL, 7};
-  struct B f_dbl = {{12.0 , 127}, 99};
-
-  struct B res_dbl;
-
   cls_struct_fields[0] = &ffi_type_uint64;
   cls_struct_fields[1] = &ffi_type_uchar;
   cls_struct_fields[2] = NULL;
diff --git a/testsuite/libffi.call/nested_struct8.c b/testsuite/libffi.call/nested_struct8.c
index bb77ead..0e6c682 100644
--- a/testsuite/libffi.call/nested_struct8.c
+++ b/testsuite/libffi.call/nested_struct8.c
@@ -66,6 +66,12 @@ int main (void)
   ffi_type cls_struct_type, cls_struct_type1, cls_struct_type2;
   ffi_type* dbl_arg_types[4];
 
+  struct A e_dbl = { 1LL, 7};
+  struct B f_dbl = {{12LL , 127}, 99};
+  struct C g_dbl = { 2LL, 9};
+
+  struct B res_dbl;
+
   cls_struct_type.size = 0;
   cls_struct_type.alignment = 0;
   cls_struct_type.type = FFI_TYPE_STRUCT;
@@ -81,12 +87,6 @@ int main (void)
   cls_struct_type2.type = FFI_TYPE_STRUCT;
   cls_struct_type2.elements = cls_struct_fields2;
 
-  struct A e_dbl = { 1LL, 7};
-  struct B f_dbl = {{12LL , 127}, 99};
-  struct C g_dbl = { 2LL, 9};
-
-  struct B res_dbl;
-
   cls_struct_fields[0] = &ffi_type_uint64;
   cls_struct_fields[1] = &ffi_type_uchar;
   cls_struct_fields[2] = NULL;
diff --git a/testsuite/libffi.call/nested_struct9.c b/testsuite/libffi.call/nested_struct9.c
index e9f541c..5f7ac67 100644
--- a/testsuite/libffi.call/nested_struct9.c
+++ b/testsuite/libffi.call/nested_struct9.c
@@ -66,6 +66,12 @@ int main (void)
   ffi_type cls_struct_type, cls_struct_type1, cls_struct_type2;
   ffi_type* dbl_arg_types[4];
 
+  struct A e_dbl = { 1, 7LL};
+  struct B f_dbl = {{12.0 , 127}, 99};
+  struct C g_dbl = { 2, 9};
+
+  struct B res_dbl;
+
   cls_struct_type.size = 0;
   cls_struct_type.alignment = 0;
   cls_struct_type.type = FFI_TYPE_STRUCT;
@@ -81,12 +87,6 @@ int main (void)
   cls_struct_type2.type = FFI_TYPE_STRUCT;
   cls_struct_type2.elements = cls_struct_fields2;
 
-  struct A e_dbl = { 1, 7LL};
-  struct B f_dbl = {{12.0 , 127}, 99};
-  struct C g_dbl = { 2, 9};
-
-  struct B res_dbl;
-
   cls_struct_fields[0] = &ffi_type_uchar;
   cls_struct_fields[1] = &ffi_type_uint64;
   cls_struct_fields[2] = NULL;
diff --git a/testsuite/libffi.call/stret_large.c b/testsuite/libffi.call/stret_large.c
index 23a93b9..f32938c 100644
--- a/testsuite/libffi.call/stret_large.c
+++ b/testsuite/libffi.call/stret_large.c
@@ -82,17 +82,17 @@ int main (void)
 	ffi_type cls_struct_type;
 	ffi_type* dbl_arg_types[5];
 
-	cls_struct_type.size = 0;
-	cls_struct_type.alignment = 0;
-	cls_struct_type.type = FFI_TYPE_STRUCT;
-	cls_struct_type.elements = cls_struct_fields;
-
 	struct_108byte e_dbl = { 9.0, 2.0, 6.0, 5.0, 3.0, 4.0, 8.0, 1.0, 1.0, 2.0, 3.0, 7.0, 2.0, 7 };
 	struct_108byte f_dbl = { 1.0, 2.0, 3.0, 7.0, 2.0, 5.0, 6.0, 7.0, 4.0, 5.0, 7.0, 9.0, 1.0, 4 };
 	struct_108byte g_dbl = { 4.0, 5.0, 7.0, 9.0, 1.0, 1.0, 2.0, 9.0, 8.0, 6.0, 1.0, 4.0, 0.0, 3 };
 	struct_108byte h_dbl = { 8.0, 6.0, 1.0, 4.0, 0.0, 3.0, 3.0, 1.0, 9.0, 2.0, 6.0, 5.0, 3.0, 2 };
 	struct_108byte res_dbl;
 
+	cls_struct_type.size = 0;
+	cls_struct_type.alignment = 0;
+	cls_struct_type.type = FFI_TYPE_STRUCT;
+	cls_struct_type.elements = cls_struct_fields;
+
 	cls_struct_fields[0] = &ffi_type_double;
 	cls_struct_fields[1] = &ffi_type_double;
 	cls_struct_fields[2] = &ffi_type_double;
diff --git a/testsuite/libffi.call/stret_large2.c b/testsuite/libffi.call/stret_large2.c
index e2599d2..3b0ef9a 100644
--- a/testsuite/libffi.call/stret_large2.c
+++ b/testsuite/libffi.call/stret_large2.c
@@ -84,17 +84,17 @@ int main (void)
 	ffi_type cls_struct_type;
 	ffi_type* dbl_arg_types[5];
 
-	cls_struct_type.size = 0;
-	cls_struct_type.alignment = 0;
-	cls_struct_type.type = FFI_TYPE_STRUCT;
-	cls_struct_type.elements = cls_struct_fields;
-
 	struct_116byte e_dbl = { 9.0, 2.0, 6.0, 5.0, 3.0, 4.0, 8.0, 1.0, 1.0, 2.0, 3.0, 7.0, 2.0, 5.0, 7 };
 	struct_116byte f_dbl = { 1.0, 2.0, 3.0, 7.0, 2.0, 5.0, 6.0, 7.0, 4.0, 5.0, 7.0, 9.0, 1.0, 6.0, 4 };
 	struct_116byte g_dbl = { 4.0, 5.0, 7.0, 9.0, 1.0, 1.0, 2.0, 9.0, 8.0, 6.0, 1.0, 4.0, 0.0, 7.0, 3 };
 	struct_116byte h_dbl = { 8.0, 6.0, 1.0, 4.0, 0.0, 3.0, 3.0, 1.0, 9.0, 2.0, 6.0, 5.0, 3.0, 8.0, 2 };
 	struct_116byte res_dbl;
 
+	cls_struct_type.size = 0;
+	cls_struct_type.alignment = 0;
+	cls_struct_type.type = FFI_TYPE_STRUCT;
+	cls_struct_type.elements = cls_struct_fields;
+
 	cls_struct_fields[0] = &ffi_type_double;
 	cls_struct_fields[1] = &ffi_type_double;
 	cls_struct_fields[2] = &ffi_type_double;
diff --git a/testsuite/libffi.call/stret_medium.c b/testsuite/libffi.call/stret_medium.c
index 1fc6a9e..973ee02 100644
--- a/testsuite/libffi.call/stret_medium.c
+++ b/testsuite/libffi.call/stret_medium.c
@@ -68,17 +68,17 @@ int main (void)
 	ffi_type cls_struct_type;
 	ffi_type* dbl_arg_types[5];
 
-	cls_struct_type.size = 0;
-	cls_struct_type.alignment = 0;
-	cls_struct_type.type = FFI_TYPE_STRUCT;
-	cls_struct_type.elements = cls_struct_fields;
-
 	struct_72byte e_dbl = { 9.0, 2.0, 6.0, 5.0, 3.0, 4.0, 8.0, 1.0, 7.0 };
 	struct_72byte f_dbl = { 1.0, 2.0, 3.0, 7.0, 2.0, 5.0, 6.0, 7.0, 4.0 };
 	struct_72byte g_dbl = { 4.0, 5.0, 7.0, 9.0, 1.0, 1.0, 2.0, 9.0, 3.0 };
 	struct_72byte h_dbl = { 8.0, 6.0, 1.0, 4.0, 0.0, 3.0, 3.0, 1.0, 2.0 };
 	struct_72byte res_dbl;
 
+	cls_struct_type.size = 0;
+	cls_struct_type.alignment = 0;
+	cls_struct_type.type = FFI_TYPE_STRUCT;
+	cls_struct_type.elements = cls_struct_fields;
+
 	cls_struct_fields[0] = &ffi_type_double;
 	cls_struct_fields[1] = &ffi_type_double;
 	cls_struct_fields[2] = &ffi_type_double;
diff --git a/testsuite/libffi.call/stret_medium2.c b/testsuite/libffi.call/stret_medium2.c
index cb2f2fb..84323d1 100644
--- a/testsuite/libffi.call/stret_medium2.c
+++ b/testsuite/libffi.call/stret_medium2.c
@@ -69,17 +69,17 @@ int main (void)
 	ffi_type cls_struct_type;
 	ffi_type* dbl_arg_types[5];
 
-	cls_struct_type.size = 0;
-	cls_struct_type.alignment = 0;
-	cls_struct_type.type = FFI_TYPE_STRUCT;
-	cls_struct_type.elements = cls_struct_fields;
-
 	struct_72byte e_dbl = { 9.0, 2.0, 6.0, 5.0, 3.0, 4.0, 8.0, 1.0, 7 };
 	struct_72byte f_dbl = { 1.0, 2.0, 3.0, 7.0, 2.0, 5.0, 6.0, 7.0, 4 };
 	struct_72byte g_dbl = { 4.0, 5.0, 7.0, 9.0, 1.0, 1.0, 2.0, 9.0, 3 };
 	struct_72byte h_dbl = { 8.0, 6.0, 1.0, 4.0, 0.0, 3.0, 3.0, 1.0, 2 };
 	struct_72byte res_dbl;
 
+	cls_struct_type.size = 0;
+	cls_struct_type.alignment = 0;
+	cls_struct_type.type = FFI_TYPE_STRUCT;
+	cls_struct_type.elements = cls_struct_fields;
+
 	cls_struct_fields[0] = &ffi_type_double;
 	cls_struct_fields[1] = &ffi_type_double;
 	cls_struct_fields[2] = &ffi_type_double;
diff --git a/testsuite/libffi.call/struct1.c b/testsuite/libffi.call/struct1.c
index ea76c85..bfc23f6 100644
--- a/testsuite/libffi.call/struct1.c
+++ b/testsuite/libffi.call/struct1.c
@@ -30,6 +30,13 @@ int main (void)
   void *values[MAX_ARGS];
   ffi_type ts1_type;
   ffi_type *ts1_type_elements[4];
+
+  test_structure_1 ts1_arg;
+
+  /* This is a hack to get a properly aligned result buffer */
+  test_structure_1 *ts1_result =
+    (test_structure_1 *) malloc (sizeof(test_structure_1));
+
   ts1_type.size = 0;
   ts1_type.alignment = 0;
   ts1_type.type = FFI_TYPE_STRUCT;
@@ -39,11 +46,6 @@ int main (void)
   ts1_type_elements[2] = &ffi_type_uint;
   ts1_type_elements[3] = NULL;
   
-  test_structure_1 ts1_arg;
-  /* This is a hack to get a properly aligned result buffer */
-  test_structure_1 *ts1_result = 
-    (test_structure_1 *) malloc (sizeof(test_structure_1));
-  
   args[0] = &ts1_type;
   values[0] = &ts1_arg;
   
diff --git a/testsuite/libffi.call/struct1_win32.c b/testsuite/libffi.call/struct1_win32.c
index 4a7eb94..a97e981 100644
--- a/testsuite/libffi.call/struct1_win32.c
+++ b/testsuite/libffi.call/struct1_win32.c
@@ -30,6 +30,13 @@ int main (void)
   void *values[MAX_ARGS];
   ffi_type ts1_type;
   ffi_type *ts1_type_elements[4];
+
+  test_structure_1 ts1_arg;
+
+  /* This is a hack to get a properly aligned result buffer */
+  test_structure_1 *ts1_result =
+    (test_structure_1 *) malloc (sizeof(test_structure_1));
+
   ts1_type.size = 0;
   ts1_type.alignment = 0;
   ts1_type.type = FFI_TYPE_STRUCT;
@@ -39,11 +46,6 @@ int main (void)
   ts1_type_elements[2] = &ffi_type_uint;
   ts1_type_elements[3] = NULL;
   
-  test_structure_1 ts1_arg;
-  /* This is a hack to get a properly aligned result buffer */
-  test_structure_1 *ts1_result = 
-    (test_structure_1 *) malloc (sizeof(test_structure_1));
-  
   args[0] = &ts1_type;
   values[0] = &ts1_arg;
   
diff --git a/testsuite/libffi.call/struct2.c b/testsuite/libffi.call/struct2.c
index 14bc9fd..d85385e 100644
--- a/testsuite/libffi.call/struct2.c
+++ b/testsuite/libffi.call/struct2.c
@@ -29,6 +29,11 @@ int main (void)
   test_structure_2 ts2_arg;
   ffi_type ts2_type;
   ffi_type *ts2_type_elements[3];
+
+  /* This is a hack to get a properly aligned result buffer */
+  test_structure_2 *ts2_result =
+    (test_structure_2 *) malloc (sizeof(test_structure_2));
+
   ts2_type.size = 0;
   ts2_type.alignment = 0;
   ts2_type.type = FFI_TYPE_STRUCT;
@@ -37,11 +42,6 @@ int main (void)
   ts2_type_elements[1] = &ffi_type_double;
   ts2_type_elements[2] = NULL;
 
-  
-  /* This is a hack to get a properly aligned result buffer */
-  test_structure_2 *ts2_result = 
-    (test_structure_2 *) malloc (sizeof(test_structure_2));
-  
   args[0] = &ts2_type;
   values[0] = &ts2_arg;
   
diff --git a/testsuite/libffi.call/struct2_win32.c b/testsuite/libffi.call/struct2_win32.c
index 2bfbdc5..f4505be 100644
--- a/testsuite/libffi.call/struct2_win32.c
+++ b/testsuite/libffi.call/struct2_win32.c
@@ -29,6 +29,11 @@ int main (void)
   test_structure_2 ts2_arg;
   ffi_type ts2_type;
   ffi_type *ts2_type_elements[3];
+
+  /* This is a hack to get a properly aligned result buffer */
+  test_structure_2 *ts2_result =
+    (test_structure_2 *) malloc (sizeof(test_structure_2));
+
   ts2_type.size = 0;
   ts2_type.alignment = 0;
   ts2_type.type = FFI_TYPE_STRUCT;
@@ -37,11 +42,6 @@ int main (void)
   ts2_type_elements[1] = &ffi_type_double;
   ts2_type_elements[2] = NULL;
 
-  
-  /* This is a hack to get a properly aligned result buffer */
-  test_structure_2 *ts2_result = 
-    (test_structure_2 *) malloc (sizeof(test_structure_2));
-  
   args[0] = &ts2_type;
   values[0] = &ts2_arg;
   
diff --git a/testsuite/libffi.call/struct3.c b/testsuite/libffi.call/struct3.c
index e0bb09b..de883c2 100644
--- a/testsuite/libffi.call/struct3.c
+++ b/testsuite/libffi.call/struct3.c
@@ -27,6 +27,11 @@ int main (void)
   int compare_value;
   ffi_type ts3_type;
   ffi_type *ts3_type_elements[2];
+
+  test_structure_3 ts3_arg;
+  test_structure_3 *ts3_result =
+    (test_structure_3 *) malloc (sizeof(test_structure_3));
+
   ts3_type.size = 0;
   ts3_type.alignment = 0;
   ts3_type.type = FFI_TYPE_STRUCT;
@@ -34,10 +39,6 @@ int main (void)
   ts3_type_elements[0] = &ffi_type_sint;
   ts3_type_elements[1] = NULL;
 
-  test_structure_3 ts3_arg;
-  test_structure_3 *ts3_result = 
-    (test_structure_3 *) malloc (sizeof(test_structure_3));
-  
   args[0] = &ts3_type;
   values[0] = &ts3_arg;
   
diff --git a/testsuite/libffi.call/struct4.c b/testsuite/libffi.call/struct4.c
index 0ad0a83..48e0349 100644
--- a/testsuite/libffi.call/struct4.c
+++ b/testsuite/libffi.call/struct4.c
@@ -28,21 +28,22 @@ int main (void)
   void *values[MAX_ARGS];
   ffi_type ts4_type;
   ffi_type *ts4_type_elements[4];  
+
+  test_structure_4 ts4_arg;
+
+  /* This is a hack to get a properly aligned result buffer */
+  test_structure_4 *ts4_result =
+    (test_structure_4 *) malloc (sizeof(test_structure_4));
+
   ts4_type.size = 0;
   ts4_type.alignment = 0;
   ts4_type.type = FFI_TYPE_STRUCT;
-  test_structure_4 ts4_arg;
   ts4_type.elements = ts4_type_elements;
   ts4_type_elements[0] = &ffi_type_uint;
   ts4_type_elements[1] = &ffi_type_uint;
   ts4_type_elements[2] = &ffi_type_uint;
   ts4_type_elements[3] = NULL;
 
-  
-  /* This is a hack to get a properly aligned result buffer */
-  test_structure_4 *ts4_result = 
-    (test_structure_4 *) malloc (sizeof(test_structure_4));
-  
   args[0] = &ts4_type;
   values[0] = &ts4_arg;
   
diff --git a/testsuite/libffi.call/struct5.c b/testsuite/libffi.call/struct5.c
index c03cc97..28b1f0c 100644
--- a/testsuite/libffi.call/struct5.c
+++ b/testsuite/libffi.call/struct5.c
@@ -27,6 +27,13 @@ int main (void)
   void *values[MAX_ARGS];
   ffi_type ts5_type;
   ffi_type *ts5_type_elements[3];
+
+  test_structure_5 ts5_arg1, ts5_arg2;
+
+  /* This is a hack to get a properly aligned result buffer */
+  test_structure_5 *ts5_result =
+    (test_structure_5 *) malloc (sizeof(test_structure_5));
+
   ts5_type.size = 0;
   ts5_type.alignment = 0;
   ts5_type.type = FFI_TYPE_STRUCT;
@@ -35,12 +42,6 @@ int main (void)
   ts5_type_elements[1] = &ffi_type_schar;
   ts5_type_elements[2] = NULL;
 
-  test_structure_5 ts5_arg1, ts5_arg2;
-  
-  /* This is a hack to get a properly aligned result buffer */
-  test_structure_5 *ts5_result = 
-    (test_structure_5 *) malloc (sizeof(test_structure_5));
-  
   args[0] = &ts5_type;
   args[1] = &ts5_type;
   values[0] = &ts5_arg1;
diff --git a/testsuite/libffi.call/struct6.c b/testsuite/libffi.call/struct6.c
index 83db9af..0e26746 100644
--- a/testsuite/libffi.call/struct6.c
+++ b/testsuite/libffi.call/struct6.c
@@ -27,6 +27,13 @@ int main (void)
   void *values[MAX_ARGS];
   ffi_type ts6_type;
   ffi_type *ts6_type_elements[3];
+
+  test_structure_6 ts6_arg;
+
+  /* This is a hack to get a properly aligned result buffer */
+  test_structure_6 *ts6_result =
+    (test_structure_6 *) malloc (sizeof(test_structure_6));
+
   ts6_type.size = 0;
   ts6_type.alignment = 0;
   ts6_type.type = FFI_TYPE_STRUCT;
@@ -35,13 +42,6 @@ int main (void)
   ts6_type_elements[1] = &ffi_type_double;
   ts6_type_elements[2] = NULL;
 
-
-  test_structure_6 ts6_arg;
-
-  /* This is a hack to get a properly aligned result buffer */
-  test_structure_6 *ts6_result = 
-    (test_structure_6 *) malloc (sizeof(test_structure_6));
-  
   args[0] = &ts6_type;
   values[0] = &ts6_arg;
 
diff --git a/testsuite/libffi.call/struct7.c b/testsuite/libffi.call/struct7.c
index 58aac4c..8f2bbfd 100644
--- a/testsuite/libffi.call/struct7.c
+++ b/testsuite/libffi.call/struct7.c
@@ -29,6 +29,13 @@ int main (void)
   void *values[MAX_ARGS];
   ffi_type ts7_type;
   ffi_type *ts7_type_elements[4];
+
+  test_structure_7 ts7_arg;
+
+  /* This is a hack to get a properly aligned result buffer */
+  test_structure_7 *ts7_result =
+    (test_structure_7 *) malloc (sizeof(test_structure_7));
+
   ts7_type.size = 0;
   ts7_type.alignment = 0;
   ts7_type.type = FFI_TYPE_STRUCT;
@@ -38,13 +45,6 @@ int main (void)
   ts7_type_elements[2] = &ffi_type_double;
   ts7_type_elements[3] = NULL;
 
-
-  test_structure_7 ts7_arg;
-  
-  /* This is a hack to get a properly aligned result buffer */
-  test_structure_7 *ts7_result = 
-    (test_structure_7 *) malloc (sizeof(test_structure_7));
-  
   args[0] = &ts7_type;
   values[0] = &ts7_arg;
   
diff --git a/testsuite/libffi.call/struct8.c b/testsuite/libffi.call/struct8.c
index c773ac7..266e1f0 100644
--- a/testsuite/libffi.call/struct8.c
+++ b/testsuite/libffi.call/struct8.c
@@ -31,6 +31,13 @@ int main (void)
   void *values[MAX_ARGS];
   ffi_type ts8_type;
   ffi_type *ts8_type_elements[5];
+
+  test_structure_8 ts8_arg;
+
+  /* This is a hack to get a properly aligned result buffer */
+  test_structure_8 *ts8_result =
+    (test_structure_8 *) malloc (sizeof(test_structure_8));
+
   ts8_type.size = 0;
   ts8_type.alignment = 0;
   ts8_type.type = FFI_TYPE_STRUCT;
@@ -41,12 +48,6 @@ int main (void)
   ts8_type_elements[3] = &ffi_type_float;
   ts8_type_elements[4] = NULL;
 
-  test_structure_8 ts8_arg;
-  
-  /* This is a hack to get a properly aligned result buffer */
-  test_structure_8 *ts8_result = 
-    (test_structure_8 *) malloc (sizeof(test_structure_8));
-  
   args[0] = &ts8_type;
   values[0] = &ts8_arg;
   
diff --git a/testsuite/libffi.call/struct9.c b/testsuite/libffi.call/struct9.c
index f30091f..efeb716 100644
--- a/testsuite/libffi.call/struct9.c
+++ b/testsuite/libffi.call/struct9.c
@@ -28,6 +28,13 @@ int main (void)
   void *values[MAX_ARGS];
   ffi_type ts9_type;
   ffi_type *ts9_type_elements[3];
+
+  test_structure_9 ts9_arg;
+
+  /* This is a hack to get a properly aligned result buffer */
+  test_structure_9 *ts9_result =
+    (test_structure_9 *) malloc (sizeof(test_structure_9));
+
   ts9_type.size = 0;
   ts9_type.alignment = 0;
   ts9_type.type = FFI_TYPE_STRUCT;
@@ -36,12 +43,6 @@ int main (void)
   ts9_type_elements[1] = &ffi_type_sint;
   ts9_type_elements[2] = NULL;
 
-  test_structure_9 ts9_arg;
-  
-  /* This is a hack to get a properly aligned result buffer */
-  test_structure_9 *ts9_result = 
-    (test_structure_9 *) malloc (sizeof(test_structure_9));
-  
   args[0] = &ts9_type;
   values[0] = &ts9_arg;
   
diff --git a/testsuite/libffi.call/testclosure.c b/testsuite/libffi.call/testclosure.c
index 161cc89..ca31056 100644
--- a/testsuite/libffi.call/testclosure.c
+++ b/testsuite/libffi.call/testclosure.c
@@ -43,13 +43,13 @@ int main (void)
   ffi_type cls_struct_type0;
   ffi_type* dbl_arg_types[5];
 
+  struct cls_struct_combined g_dbl = {4.0, 5.0, 1.0, 8.0};
+
   cls_struct_type0.size = 0;
   cls_struct_type0.alignment = 0;
   cls_struct_type0.type = FFI_TYPE_STRUCT;
   cls_struct_type0.elements = cls_struct_fields0;
 
-  struct cls_struct_combined g_dbl = {4.0, 5.0, 1.0, 8.0};
-
   cls_struct_fields0[0] = &ffi_type_float;
   cls_struct_fields0[1] = &ffi_type_float;
   cls_struct_fields0[2] = &ffi_type_float;
-- 
1.7.9


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]