oacc-init.c (goacc_new_thread): Use sizeof of the appropriate size when allocating...
authorAldy Hernandez <aldyh@redhat.com>
Thu, 27 Oct 2016 17:36:36 +0000 (17:36 +0000)
committerAldy Hernandez <aldyh@gcc.gnu.org>
Thu, 27 Oct 2016 17:36:36 +0000 (17:36 +0000)
* oacc-init.c (goacc_new_thread): Use sizeof of the appropriate
size when allocating new thread.

From-SVN: r241627

libgomp/ChangeLog
libgomp/oacc-init.c

index e7749b2be4e2fdc2bc93ef711ab4f2d6e553f490..50865d1ca796d271b1538ebd13c745da65d744e8 100644 (file)
@@ -1,3 +1,8 @@
+2016-10-27  Aldy Hernandez  <aldyh@redhat.com>
+
+       * oacc-init.c (goacc_new_thread): Use sizeof of the appropriate
+       size when allocating new thread.
+
 2016-09-14  Marek Polacek  <polacek@redhat.com>
 
        * testsuite/libgomp.c++/atomic-3.C: Use -Wno-deprecated.
index f2325adfb46663570da6da57253fd5557943dfdb..83920b52b19fad07bc17e76d81554ebaf5202879 100644 (file)
@@ -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;