Browse Source

gcc: Fix test case to work with `-O0'.

* gcc-plugin/tests/lib-user.c (main): Align X.
Ludovic Courtès 13 years ago
parent
commit
b82f6ef09e
1 changed files with 4 additions and 1 deletions
  1. 4 1
      gcc-plugin/tests/lib-user.c

+ 4 - 1
gcc-plugin/tests/lib-user.c

@@ -28,7 +28,10 @@ main (int argc, char *argv[])
 {
 {
 #pragma starpu initialize
 #pragma starpu initialize
 
 
-  static const char x[] = { 0, 1, 2, 3, 4, 5 };
+  /* Align X so that the assumptions behind `dummy_pointer_to_handle'
+     hold.  */
+  static const char x[] __attribute__ ((aligned (8))) = { 0, 1, 2, 3, 4, 5 };
+
   float y[sizeof x];
   float y[sizeof x];
 
 
   static const char forty_two = 42;
   static const char forty_two = 42;