Appease older gcc compilers for the many-microtask-args.c test
authorJonathan Peyton <jonathan.l.peyton@intel.com>
Tue, 30 Aug 2016 19:28:58 +0000 (19:28 +0000)
committerJonathan Peyton <jonathan.l.peyton@intel.com>
Tue, 30 Aug 2016 19:28:58 +0000 (19:28 +0000)
Older gcc compilers error out with the C99 syntax of: for (int i =...)
so this change just moves the int i; declaration up above.

llvm-svn: 280138

openmp/runtime/test/misc_bugs/many-microtask-args.c

index a354872..d644515 100644 (file)
@@ -4,6 +4,7 @@
 int main()
 {
 
+  int i;
   int i1 = 0;
   int i2 = 1;
   int i3 = 2;
@@ -23,7 +24,7 @@ int main()
  
   int r = 0; 
   #pragma omp parallel for firstprivate(i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16) reduction(+:r)
-  for (int i = 0; i < i16; i++) {
+  for (i = 0; i < i16; i++) {
     r += i + i1 + i2 + i3 + i4 + i5 + i6 + i7 + i8 + i9 + i10 + i11 + i12 + i13 + i14 + i15 + i16;
   }