[Openmp-commits] [openmp] r280138 - Appease older gcc compilers for the many-microtask-args.c test

Jonathan Peyton via Openmp-commits openmp-commits at lists.llvm.org
Tue Aug 30 12:28:58 PDT 2016


Author: jlpeyton
Date: Tue Aug 30 14:28:58 2016
New Revision: 280138

URL: http://llvm.org/viewvc/llvm-project?rev=280138&view=rev
Log:
Appease older gcc compilers for the many-microtask-args.c test

Older gcc compilers error out with the C99 syntax of: for (int i =...)
so this change just moves the int i; declaration up above.

Modified:
    openmp/trunk/runtime/test/misc_bugs/many-microtask-args.c

Modified: openmp/trunk/runtime/test/misc_bugs/many-microtask-args.c
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/test/misc_bugs/many-microtask-args.c?rev=280138&r1=280137&r2=280138&view=diff
==============================================================================
--- openmp/trunk/runtime/test/misc_bugs/many-microtask-args.c (original)
+++ openmp/trunk/runtime/test/misc_bugs/many-microtask-args.c Tue Aug 30 14:28:58 2016
@@ -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;
   }
 




More information about the Openmp-commits mailing list