From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2153) id 514F8397282D; Wed, 14 Apr 2021 08:50:26 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 514F8397282D MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Jakub Jelinek To: gcc-cvs@gcc.gnu.org Subject: [gcc r11-8167] testsuite: Fix up libgomp.fortran/alloc-1.F90 testcase [PR100071] X-Act-Checkin: gcc X-Git-Author: Jakub Jelinek X-Git-Refname: refs/heads/master X-Git-Oldrev: e1666ebd9ad31dbd8b9b933c883bdd882cfd1522 X-Git-Newrev: 287be7f7a587cb08eb88ecee39ff5556a22976d2 Message-Id: <20210414085026.514F8397282D@sourceware.org> Date: Wed, 14 Apr 2021 08:50:26 +0000 (GMT) X-BeenThere: gcc-cvs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Apr 2021 08:50:26 -0000 https://gcc.gnu.org/g:287be7f7a587cb08eb88ecee39ff5556a22976d2 commit r11-8167-g287be7f7a587cb08eb88ecee39ff5556a22976d2 Author: Jakub Jelinek Date: Wed Apr 14 10:48:56 2021 +0200 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 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. Diff: --- libgomp/testsuite/libgomp.fortran/alloc-1.F90 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libgomp/testsuite/libgomp.fortran/alloc-1.F90 b/libgomp/testsuite/libgomp.fortran/alloc-1.F90 index 8ecb4c41246..178ce771d45 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))) &