[gomp] Fix return codes in test cases

Diego Novillo dnovillo@redhat.com
Mon Aug 1 21:50:00 GMT 2005


None of the omp_* files were returning 0.  This also adds -O2 to
work around the -O0 ICE I'm working on.



	* libgomp.dg/dg.exp: Use -O2 for now.
	* libgomp.dg/omp_hello.c: Fix return code
	* libgomp.dg/omp_matvec.c: Likewise.
	* libgomp.dg/omp_orphan.c: Likewise
	* libgomp.dg/omp_reduction.c: Likewise
	* libgomp.dg/omp_workshare1.c: Likewise
	* libgomp.dg/omp_workshare2.c: Likewise
	* libgomp.dg/omp_workshare3.c: Likewise
	* libgomp.dg/omp_workshare4.c: Likewise

Index: testsuite/libgomp.dg/dg.exp
===================================================================
RCS file: /cvs/gcc/gcc/libgomp/testsuite/libgomp.dg/Attic/dg.exp,v
retrieving revision 1.1.2.2
diff -d -u -p -r1.1.2.2 dg.exp
--- testsuite/libgomp.dg/dg.exp	7 Jul 2005 22:56:08 -0000	1.1.2.2
+++ testsuite/libgomp.dg/dg.exp	1 Aug 2005 21:46:30 -0000
@@ -2,7 +2,7 @@ load_lib libgomp-dg.exp
 
 # If a testcase doesn't have special options, use these.
 if ![info exists DEFAULT_CFLAGS] then {
-    set DEFAULT_CFLAGS "-fopenmp"
+    set DEFAULT_CFLAGS "-O2 -fopenmp"
 }
 
 # Initialize dg.
Index: testsuite/libgomp.dg/omp_hello.c
===================================================================
RCS file: /cvs/gcc/gcc/libgomp/testsuite/libgomp.dg/Attic/omp_hello.c,v
retrieving revision 1.1.2.2
diff -d -u -p -r1.1.2.2 omp_hello.c
--- testsuite/libgomp.dg/omp_hello.c	7 Jul 2005 22:56:08 -0000	1.1.2.2
+++ testsuite/libgomp.dg/omp_hello.c	1 Aug 2005 21:46:30 -0000
@@ -35,5 +35,5 @@ int nthreads, tid;
 
   }  /* All threads join master thread and disband */
 
+  return 0;
 }
-
Index: testsuite/libgomp.dg/omp_matvec.c
===================================================================
RCS file: /cvs/gcc/gcc/libgomp/testsuite/libgomp.dg/Attic/omp_matvec.c,v
retrieving revision 1.1.2.2
diff -d -u -p -r1.1.2.2 omp_matvec.c
--- testsuite/libgomp.dg/omp_matvec.c	7 Jul 2005 22:56:08 -0000	1.1.2.2
+++ testsuite/libgomp.dg/omp_matvec.c	1 Aug 2005 21:46:30 -0000
@@ -67,5 +67,6 @@ printf("\nResults by thread/row:\n");
 
 printf("\nMatrix-vector total - sum of all c[] = %.2f\n\n",total);
 
+  return 0;
 }
 
Index: testsuite/libgomp.dg/omp_orphan.c
===================================================================
RCS file: /cvs/gcc/gcc/libgomp/testsuite/libgomp.dg/Attic/omp_orphan.c,v
retrieving revision 1.1.2.2
diff -d -u -p -r1.1.2.2 omp_orphan.c
--- testsuite/libgomp.dg/omp_orphan.c	7 Jul 2005 22:56:08 -0000	1.1.2.2
+++ testsuite/libgomp.dg/omp_orphan.c	1 Aug 2005 21:46:30 -0000
@@ -43,5 +43,5 @@ sum = 0.0;
 
 printf("Sum = %f\n",sum);
 
+  return 0;
 }
-
Index: testsuite/libgomp.dg/omp_reduction.c
===================================================================
RCS file: /cvs/gcc/gcc/libgomp/testsuite/libgomp.dg/Attic/omp_reduction.c,v
retrieving revision 1.1.2.2
diff -d -u -p -r1.1.2.2 omp_reduction.c
--- testsuite/libgomp.dg/omp_reduction.c	7 Jul 2005 22:56:08 -0000	1.1.2.2
+++ testsuite/libgomp.dg/omp_reduction.c	1 Aug 2005 21:46:30 -0000
@@ -31,4 +31,5 @@ sum = 0.0;
 
 printf("   Sum = %f\n",sum);
 
+  return 0;
 }
Index: testsuite/libgomp.dg/omp_workshare1.c
===================================================================
RCS file: /cvs/gcc/gcc/libgomp/testsuite/libgomp.dg/Attic/omp_workshare1.c,v
retrieving revision 1.1.2.2
diff -d -u -p -r1.1.2.2 omp_workshare1.c
--- testsuite/libgomp.dg/omp_workshare1.c	7 Jul 2005 22:56:08 -0000	1.1.2.2
+++ testsuite/libgomp.dg/omp_workshare1.c	1 Aug 2005 21:46:30 -0000
@@ -43,6 +43,5 @@ chunk = CHUNKSIZE;
 
   }  /* end of parallel section */
 
+  return 0;
 }
-
-
Index: testsuite/libgomp.dg/omp_workshare2.c
===================================================================
RCS file: /cvs/gcc/gcc/libgomp/testsuite/libgomp.dg/Attic/omp_workshare2.c,v
retrieving revision 1.1.2.2
diff -d -u -p -r1.1.2.2 omp_workshare2.c
--- testsuite/libgomp.dg/omp_workshare2.c	7 Jul 2005 22:56:08 -0000	1.1.2.2
+++ testsuite/libgomp.dg/omp_workshare2.c	1 Aug 2005 21:46:30 -0000
@@ -60,4 +60,5 @@ for (i=0; i<N; i++)
 
   }  /* end of parallel section */
 
+  return 0;
 }
Index: testsuite/libgomp.dg/omp_workshare3.c
===================================================================
RCS file: /cvs/gcc/gcc/libgomp/testsuite/libgomp.dg/Attic/omp_workshare3.c,v
retrieving revision 1.1.2.2
diff -d -u -p -r1.1.2.2 omp_workshare3.c
--- testsuite/libgomp.dg/omp_workshare3.c	7 Jul 2005 22:56:08 -0000	1.1.2.2
+++ testsuite/libgomp.dg/omp_workshare3.c	1 Aug 2005 21:46:30 -0000
@@ -37,5 +37,5 @@ chunk = CHUNKSIZE;
     }
   }  /* end of parallel for construct */
 
+  return 0;
 }
-
Index: testsuite/libgomp.dg/omp_workshare4.c
===================================================================
RCS file: /cvs/gcc/gcc/libgomp/testsuite/libgomp.dg/Attic/omp_workshare4.c,v
retrieving revision 1.1.2.2
diff -d -u -p -r1.1.2.2 omp_workshare4.c
--- testsuite/libgomp.dg/omp_workshare4.c	7 Jul 2005 22:56:08 -0000	1.1.2.2
+++ testsuite/libgomp.dg/omp_workshare4.c	1 Aug 2005 21:46:30 -0000
@@ -44,6 +44,5 @@ first_time = 'y';
     printf("tid= %d i= %d c[i]= %f\n", tid, i, c[i]);
     }
 
+  return 0;
 }
-
-



More information about the Gcc-patches mailing list