Re: [gomp-4.1] fix incorrect memory size in goacc_new_thread

2015-08-27 Thread Aldy Hernandez

On 08/25/2015 10:44 AM, Aldy Hernandez wrote:

This is either blatantly wrong or subtly correct, in which case it needs
a comment.  My guess is the former.

OK for branch?


Hi Thomas.

Jakub has pre-approved this patch.  I would like to commit it to trunk. 
 Do you object?  Would you like to test it further?


Thanks.

commit badfb67c72f72e468c1e100711fa5e925a831ed6
Author: Aldy Hernandez al...@redhat.com
Date:   Tue Aug 25 10:32:48 2015 -0700

* oacc-init.c (goacc_new_thread): Use correct size of goacc_thread
when allocating memory.

diff --git a/libgomp/oacc-init.c b/libgomp/oacc-init.c
index c91731e..e6d2c03 100644
--- a/libgomp/oacc-init.c
+++ b/libgomp/oacc-init.c
@@ -312,7 +312,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;


[gomp-4.1] fix incorrect memory size in goacc_new_thread

2015-08-25 Thread Aldy Hernandez
This is either blatantly wrong or subtly correct, in which case it needs 
a comment.  My guess is the former.


OK for branch?
commit 330391636113ed9a9067e6eb639755fb0f4723dc
Author: Aldy Hernandez al...@redhat.com
Date:   Tue Aug 25 10:41:28 2015 -0700

* oacc-init.c (goacc_new_thread): Use correct size of goacc_thread
when allocating memory.

diff --git a/libgomp/oacc-init.c b/libgomp/oacc-init.c
index c91731e..e6d2c03 100644
--- a/libgomp/oacc-init.c
+++ b/libgomp/oacc-init.c
@@ -312,7 +312,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;