]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
openmp: Fix up build if HAVE_SYNC_BUILTINS is not defined.
authorTobias Burnus <tobias@codesourcery.com>
Wed, 15 Jul 2020 07:58:18 +0000 (09:58 +0200)
committerTobias Burnus <tobias@codesourcery.com>
Wed, 15 Jul 2020 07:58:18 +0000 (09:58 +0200)
2020-06-02  Jakub Jelinek  <jakub@redhat.com>

* allocator.c (omp_free): Fix up build if HAVE_SYNC_BUILTINS is not
defined.

(cherry picked from commit 23438370f768802fefd732529177fcea074c493b)

libgomp/ChangeLog.omp
libgomp/allocator.c

index 13c3f22ef5008571db53266a3bd8f4d1200060be..98d8e8c4b71b5428572d6dbcf87b204ca903d780 100644 (file)
@@ -1,3 +1,11 @@
+2020-07-15  Tobias Burnus  <tobias@codesourcery.com>
+
+       Backport from mainline
+       2020-06-02  Jakub Jelinek  <jakub@redhat.com>
+
+       * allocator.c (omp_free): Fix up build if HAVE_SYNC_BUILTINS is not
+       defined.
+
 2020-07-15  Tobias Burnus  <tobias@codesourcery.com>
 
        Backport from mainline
index 66308ab666968b906427b9242fb44a6fec55e390..4e293992d226145d58e9e75c52875f6f566d6579 100644 (file)
@@ -348,7 +348,7 @@ omp_free (void *ptr, omp_allocator_handle_t allocator)
                              MEMMODEL_RELAXED);
 #else
          gomp_mutex_lock (&allocator_data->lock);
-         allocator_data->used_pool_size -= data->new_size;
+         allocator_data->used_pool_size -= data->size;
          gomp_mutex_unlock (&allocator_data->lock);
 #endif
        }