target.c (gomp_map_vars): Initialize tgt->tgt_start and tgt->tgt_end to 0 when mapnum...
authorIlya Verbin <ilya.verbin@intel.com>
Wed, 14 Oct 2015 18:37:10 +0000 (18:37 +0000)
committerIlya Verbin <iverbin@gcc.gnu.org>
Wed, 14 Oct 2015 18:37:10 +0000 (18:37 +0000)
libgomp/
* target.c (gomp_map_vars): Initialize tgt->tgt_start and tgt->tgt_end
to 0 when mapnum is 0.

Co-Authored-By: Aleksander Ivanushenko <aleksander.ivanushenko@intel.com>
From-SVN: r228825

libgomp/ChangeLog
libgomp/target.c

index 5480c526ade9dd79b7fd6aaa2e34be892c998336..de3ca406ed3e4fa706032d20e71eb81b8893b4a5 100644 (file)
@@ -1,3 +1,9 @@
+2015-10-14  Ilya Verbin  <ilya.verbin@intel.com>
+           Aleksander Ivanushenko  <aleksander.ivanushenko@intel.com>
+
+       * target.c (gomp_map_vars): Initialize tgt->tgt_start and tgt->tgt_end
+       to 0 when mapnum is 0.
+
 2015-10-14  Sebastian Huber  <sebastian.huber@embedded-brains.de>
 
        * fortran.c (omp_get_place_proc_ids_, omp_get_partition_place_nums_):
index de6a2c9c9c5d7a60529e3e9037079eee1075d08b..b767410032699b7aa791fc67f0e14f9157c3520d 100644 (file)
@@ -324,7 +324,11 @@ gomp_map_vars (struct gomp_device_descr *devicep, size_t mapnum,
   tgt->device_descr = devicep;
 
   if (mapnum == 0)
-    return tgt;
+    {
+      tgt->tgt_start = 0;
+      tgt->tgt_end = 0;
+      return tgt;
+    }
 
   tgt_align = sizeof (void *);
   tgt_size = 0;