aboutsummaryrefslogtreecommitdiff
path: root/libgomp
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2021-04-14 10:48:56 +0200
committerJakub Jelinek <jakub@redhat.com>2021-04-14 10:48:56 +0200
commit287be7f7a587cb08eb88ecee39ff5556a22976d2 (patch)
tree7432f75829b6fc9882f6b188636b0561b4730a53 /libgomp
parente1666ebd9ad31dbd8b9b933c883bdd882cfd1522 (diff)
downloadgcc-287be7f7a587cb08eb88ecee39ff5556a22976d2.zip
gcc-287be7f7a587cb08eb88ecee39ff5556a22976d2.tar.gz
gcc-287be7f7a587cb08eb88ecee39ff5556a22976d2.tar.bz2
testsuite: Fix up libgomp.fortran/alloc-1.F90 testcase [PR100071]
As can be seen under valgrind, the testcase didn't bind in the last part the fortran pointers properly to the c pointers. 2021-04-14 Jakub Jelinek <jakub@redhat.com> PR testsuite/100071 * testsuite/libgomp.fortran/alloc-1.F90: Call c_f_pointer after last cp = omp_alloc with cp, p arguments instead of cq, q and call c_f_pointer after last cq = omp_alloc with cq, q.
Diffstat (limited to 'libgomp')
-rw-r--r--libgomp/testsuite/libgomp.fortran/alloc-1.F903
1 files changed, 2 insertions, 1 deletions
diff --git a/libgomp/testsuite/libgomp.fortran/alloc-1.F90 b/libgomp/testsuite/libgomp.fortran/alloc-1.F90
index 8ecb4c4..178ce77 100644
--- a/libgomp/testsuite/libgomp.fortran/alloc-1.F90
+++ b/libgomp/testsuite/libgomp.fortran/alloc-1.F90
@@ -155,12 +155,13 @@
cp = omp_alloc (ONEoFIVE, &
& omp_null_allocator)
if (mod (transfer (cp, intptr), 32_c_intptr_t) /= 0) stop 17
- call c_f_pointer (cq, q, [ONEoFIVE &
+ call c_f_pointer (cp, p, [ONEoFIVE &
& / c_sizeof (i)])
p(1) = 5
p(ONEoFIVE / c_sizeof (i)) = 6
cq = omp_alloc (768_c_size_t, omp_null_allocator)
if (mod (transfer (cq, intptr), 128_c_intptr_t) /= 0) stop 18
+ call c_f_pointer (cq, q, [768 / c_sizeof (i)])
q(1) = 7
q(768 / c_sizeof (i)) = 8
if (c_associated (omp_alloc (768_c_size_t, omp_null_allocator))) &