This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[gomp4] Small libgomp testsuite tweaks


Hi!

I've noticed that udr-8.C failed on i686-linux, apparently because i
was uninitialized.  udr-3.c had the same bug, but didn't FAIL because
of that on either x86_64-linux nor i686-linux, and udr-2.c had just
unused variable.

2013-10-08  Jakub Jelinek  <jakub@redhat.com>

	* testsuite/libgomp.c/udr-2.c (main): Remove unused variable i.
	* testsuite/libgomp.c/udr-3.c (main): Initialize i to 0.
	* testsuite/libgomp.c++/udr-8.C (main): Likewise.

--- libgomp/testsuite/libgomp.c/udr-2.c.jj	2013-09-19 09:12:43.000000000 +0200
+++ libgomp/testsuite/libgomp.c/udr-2.c	2013-10-08 17:28:54.687344973 +0200
@@ -11,7 +11,7 @@ struct S { int s; };
 int
 main ()
 {
-  int i, u = 0, q = 0;
+  int u = 0, q = 0;
   struct S s, t;
   s.s = 0; t.s = 0;
   #pragma omp parallel reduction(+:s, q) reduction(foo:t, u)
--- libgomp/testsuite/libgomp.c/udr-3.c.jj	2013-09-19 09:12:43.000000000 +0200
+++ libgomp/testsuite/libgomp.c/udr-3.c	2013-10-08 17:29:24.958191565 +0200
@@ -17,7 +17,7 @@ int
 main ()
 {
   struct S s;
-  int i;
+  int i = 0;
   s.s = 0;
   #pragma omp parallel reduction (+:s, i)
   {
--- libgomp/testsuite/libgomp.c++/udr-8.C.jj	2013-09-18 12:43:23.000000000 +0200
+++ libgomp/testsuite/libgomp.c++/udr-8.C	2013-10-08 17:29:51.235059721 +0200
@@ -25,7 +25,7 @@ int
 main ()
 {
   S s, t;
-  int i;
+  int i = 0;
   #pragma omp parallel reduction (+:s, i) reduction (*:t)
   {
     if (s.s != 0 || t.s != 0)

	Jakub


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]