From 015c776064d1ea93a71730ba4c3bad43675656ea Mon Sep 17 00:00:00 2001 From: Aldy Hernandez Date: Thu, 27 Oct 2016 17:36:36 +0000 Subject: [PATCH] oacc-init.c (goacc_new_thread): Use sizeof of the appropriate size when allocating new thread. * oacc-init.c (goacc_new_thread): Use sizeof of the appropriate size when allocating new thread. From-SVN: r241627 --- libgomp/ChangeLog | 5 +++++ libgomp/oacc-init.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/libgomp/ChangeLog b/libgomp/ChangeLog index e7749b2be4e..50865d1ca79 100644 --- a/libgomp/ChangeLog +++ b/libgomp/ChangeLog @@ -1,3 +1,8 @@ +2016-10-27 Aldy Hernandez + + * oacc-init.c (goacc_new_thread): Use sizeof of the appropriate + size when allocating new thread. + 2016-09-14 Marek Polacek * testsuite/libgomp.c++/atomic-3.C: Use -Wno-deprecated. diff --git a/libgomp/oacc-init.c b/libgomp/oacc-init.c index f2325adfb46..83920b52b19 100644 --- a/libgomp/oacc-init.c +++ b/libgomp/oacc-init.c @@ -325,7 +325,7 @@ acc_shutdown_1 (acc_device_t d) static struct goacc_thread * goacc_new_thread (void) { - struct goacc_thread *thr = gomp_malloc (sizeof (struct gomp_thread)); + struct goacc_thread *thr = gomp_malloc (sizeof (struct goacc_thread)); #if defined HAVE_TLS || defined USE_EMUTLS goacc_tls_data = thr;