[og7,openacc,libgomp,testsuite] Fix asserts in firstprivate-int.{c,C}

Message ID 30abc7a4-b013-d9af-6e11-d6e23f9af78e@mentor.com
State New
Headers show
Series
  • [og7,openacc,libgomp,testsuite] Fix asserts in firstprivate-int.{c,C}
Related show

Commit Message

Tom de Vries April 18, 2018, 8:58 a.m.
[ was: Re: [gomp4] enable GOMP_MAP_FIRSTPRIVATE_INT in OpenACC ]

On 01/27/2017 04:45 PM, Cesar Philippidis wrote:

> diff --git a/libgomp/testsuite/libgomp.oacc-c++/firstprivate-int.C b/libgomp/testsuite/libgomp.oacc-c++/firstprivate-int.C


> +  assert(i8o = i8i);

> +  assert(i16o = i16i);

> +  assert(i32o = i32i);

> +  assert(i64o = i64i);

> +

> +  assert(u8o = u8i);

> +  assert(u16o = u16i);

> +  assert(u32o = u32i);

> +  assert(u64o = u64i);

> +

> +  assert(r32o = r32i);

> +  assert(r64o = r64i);

> +

> +  assert(cio = cii);

> +  assert(cfo = cfi);

> +  assert(cdo = cdi);


> diff --git a/libgomp/testsuite/libgomp.oacc-c-c++-common/firstprivate-int.c b/libgomp/testsuite/libgomp.oacc-c-c++-common/firstprivate-int.c


> +  assert(i8o = i8i);

> +  assert(i16o = i16i);

> +  assert(i32o = i32i);

> +  assert(i64o = i64i);

> +

> +  assert(u8o = u8i);

> +  assert(u16o = u16i);

> +  assert(u32o = u32i);

> +  assert(u64o = u64i);

> +

> +  assert(r32o = r32i);

> +  assert(r64o = r64i);

> +

> +  assert(cio = cii);

> +  assert(cfo = cfi);

> +  assert(cdo = cdi);


These assert have assigns in them.

Fixed in attached patch, committed.

Thanks,
- Tom

Patch

[openacc, libgomp, testsuite] Fix asserts in firstprivate-int.{c,C}

2018-04-18  Tom de Vries  <tom@codesourcery.com>

	* testsuite/libgomp.oacc-c++/firstprivate-int.C (main): Fix asserts.
	* testsuite/libgomp.oacc-c-c++-common/firstprivate-int.c (main): Same.

---
 .../testsuite/libgomp.oacc-c++/firstprivate-int.C  | 26 +++++++++++-----------
 .../libgomp.oacc-c-c++-common/firstprivate-int.c   | 26 +++++++++++-----------
 2 files changed, 26 insertions(+), 26 deletions(-)

diff --git a/libgomp/testsuite/libgomp.oacc-c++/firstprivate-int.C b/libgomp/testsuite/libgomp.oacc-c++/firstprivate-int.C
index 94667b5..c7d90d9 100644
--- a/libgomp/testsuite/libgomp.oacc-c++/firstprivate-int.C
+++ b/libgomp/testsuite/libgomp.oacc-c++/firstprivate-int.C
@@ -62,22 +62,22 @@  main ()
 	    u16o, u32i, u32o, u64i, u64o, r32i, r32o, r64i, r64o, cii, cio,
 	    cfi, cfo, cdi, cdo);
 
-  assert(i8o = i8i);
-  assert(i16o = i16i);
-  assert(i32o = i32i);
-  assert(i64o = i64i);
+  assert (i8o == i8i);
+  assert (i16o == i16i);
+  assert (i32o == i32i);
+  assert (i64o == i64i);
 
-  assert(u8o = u8i);
-  assert(u16o = u16i);
-  assert(u32o = u32i);
-  assert(u64o = u64i);
+  assert (u8o == u8i);
+  assert (u16o == u16i);
+  assert (u32o == u32i);
+  assert (u64o == u64i);
 
-  assert(r32o = r32i);
-  assert(r64o = r64i);
+  assert (r32o == r32i);
+  assert (r64o == r64i);
 
-  assert(cio = cii);
-  assert(cfo = cfi);
-  assert(cdo = cdi);
+  assert (cio == cii);
+  assert (cfo == cfi);
+  assert (cdo == cdi);
 
   return 0;
 }
diff --git a/libgomp/testsuite/libgomp.oacc-c-c++-common/firstprivate-int.c b/libgomp/testsuite/libgomp.oacc-c-c++-common/firstprivate-int.c
index d9da9a0..8abb610 100644
--- a/libgomp/testsuite/libgomp.oacc-c-c++-common/firstprivate-int.c
+++ b/libgomp/testsuite/libgomp.oacc-c-c++-common/firstprivate-int.c
@@ -46,22 +46,22 @@  main ()
     cdo = cdi;
   }
 
-  assert(i8o = i8i);
-  assert(i16o = i16i);
-  assert(i32o = i32i);
-  assert(i64o = i64i);
+  assert (i8o == i8i);
+  assert (i16o == i16i);
+  assert (i32o == i32i);
+  assert (i64o == i64i);
 
-  assert(u8o = u8i);
-  assert(u16o = u16i);
-  assert(u32o = u32i);
-  assert(u64o = u64i);
+  assert (u8o == u8i);
+  assert (u16o == u16i);
+  assert (u32o == u32i);
+  assert (u64o == u64i);
 
-  assert(r32o = r32i);
-  assert(r64o = r64i);
+  assert (r32o == r32i);
+  assert (r64o == r64i);
 
-  assert(cio = cii);
-  assert(cfo = cfi);
-  assert(cdo = cdi);
+  assert (cio == cii);
+  assert (cfo == cfi);
+  assert (cdo == cdi);
 
   return 0;
 }