summaryrefslogtreecommitdiff
path: root/libgomp/target.c
diff options
context:
space:
mode:
authoriverbin <iverbin@138bc75d-0d04-0410-961f-82ee72b054a4>2015-10-14 18:37:10 +0000
committeriverbin <iverbin@138bc75d-0d04-0410-961f-82ee72b054a4>2015-10-14 18:37:10 +0000
commit3bdac2395598b9fe27ccd52d6f94f931a380f9a6 (patch)
treeae378ac514a9215bab428b679f402b2b44b49fb7 /libgomp/target.c
parent7998c0b5453215cc1119a75fdee569306c0181d0 (diff)
downloadgcc-3bdac2395598b9fe27ccd52d6f94f931a380f9a6.tar.gz
libgomp/
* target.c (gomp_map_vars): Initialize tgt->tgt_start and tgt->tgt_end to 0 when mapnum is 0. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228825 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgomp/target.c')
-rw-r--r--libgomp/target.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/libgomp/target.c b/libgomp/target.c
index de6a2c9c9c5..b7674100326 100644
--- a/libgomp/target.c
+++ b/libgomp/target.c
@@ -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;