diff mbox

[libgomp,testsuite] Fix libgomp.c++/task-8.C on Solaris 11 (PR libgomp/49965)

Message ID yddipqct56f.fsf@manam.CeBiTec.Uni-Bielefeld.DE
State New
Headers show

Commit Message

Rainer Orth Aug. 5, 2011, 12:26 p.m. UTC
As described in the PR, libgomp.c++/task-8.C FAILs on Solaris 11 with
Sun ld:

FAIL: libgomp.c++/task-8.C  -O0  (test for excess errors)
Excess errors:
ld: warning: symbol 'err' has differing types:
	(file /var/tmp//ccD0aiQD.o type=OBJT; file /lib/libc.so type=FUNC);
	/var/tmp//ccD0aiQD.o definition taken
ld: warning: symbol 'err' has differing types:
	(file /var/tmp//ccD0aiQD.o type=OBJT; file /lib/libc.so type=FUNC);

Fixed as follows, tested with the appropriate runtest invocations on
x86_64-unknown-linux-gnu, i386-pc-solaris2.10, i386-pc-solaris2.11,
installed on mainline.

	Rainer


2011-08-03  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

	PR libgomp/49965
	* testsuite/libgomp.c++/task-8.C: Replaced err by errval.
diff mbox

Patch

diff --git a/libgomp/testsuite/libgomp.c++/task-8.C b/libgomp/testsuite/libgomp.c++/task-8.C
--- a/libgomp/testsuite/libgomp.c++/task-8.C
+++ b/libgomp/testsuite/libgomp.c++/task-8.C
@@ -3,42 +3,42 @@ 
 #include <omp.h>
 #include <cstdlib>
 
-int err;
+int errval;
 
 int
 main ()
 {
   int e;
-#pragma omp parallel shared(err)
+#pragma omp parallel shared(errval)
   {
     if (omp_in_final ())
       #pragma omp atomic write
-	err = 1;
-    #pragma omp task if (0) shared(err)
+	errval = 1;
+    #pragma omp task if (0) shared(errval)
       {
 	if (omp_in_final ())
 	  #pragma omp atomic write
-	    err = 1;
-	#pragma omp task if (0) shared(err)
+	    errval = 1;
+	#pragma omp task if (0) shared(errval)
 	  if (omp_in_final ())
 	    #pragma omp atomic write
-	      err = 1;
+	      errval = 1;
       }
-    #pragma omp task final (1) shared(err)
+    #pragma omp task final (1) shared(errval)
       {
 	if (!omp_in_final ())
 	  #pragma omp atomic write
-	    err = 1;
+	    errval = 1;
 	#pragma omp taskyield
 	#pragma omp taskwait
-	#pragma omp task shared(err)
+	#pragma omp task shared(errval)
 	  if (!omp_in_final ())
 	    #pragma omp atomic write
-	      err = 1;
+	      errval = 1;
       }
   }
   #pragma omp atomic read
-    e = err;
+    e = errval;
   if (e)
     abort ();
 }