public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "burnus at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/94070] Assumed-rank arrays – bounds mishandled, SIZE/SHAPE/UBOUND/LBOUND Date: Mon, 01 Mar 2021 08:34:54 +0000 [thread overview] Message-ID: <bug-94070-4-3DDPeAgzq2@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-94070-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94070 --- Comment #6 from Tobias Burnus <burnus at gcc dot gnu.org> --- Some bound issues were fixed with PR99043 – but my bet is that the BIND(C) issues still exist. (→ testcase (C + Fortran) attached to this PR). * * * Additionally: PR 94020 (duplicate of this PR) with attachment 47960 seems to be mostly fixed, however for the following case, the result is wrong. if 'lb' (or second argument to 'foo') is >= 0, size2 == 0 – otherwise, size2 > 0'. Expected: same result as for PRODUCT(SHAPE(ARRAY,KIND)) (→ 16.9.179 SIZE (ARRAY [, DIM, KIND])) That is: lb = 5 → shape = [5 -1] → -5 lb = -12 → shape = [5 - 1] → -5 implicit none integer :: A(5,5) call foo(a,-12) call foo(a,0) call foo(a,5) contains subroutine foo(x,lb) integer :: lb integer :: x(5,lb:*) print *, size2(x) if (size2(x) /= -5) stop 1 end integer function size2(y) integer :: y(..) size2 = size(y) end end
next prev parent reply other threads:[~2021-03-01 8:34 UTC|newest] Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top [not found] <bug-94070-4@http.gcc.gnu.org/bugzilla/> 2020-07-21 15:22 ` dominiq at lps dot ens.fr 2021-03-01 8:34 ` burnus at gcc dot gnu.org [this message] 2021-07-01 22:55 ` sandra at gcc dot gnu.org 2021-08-22 19:53 ` sandra at gcc dot gnu.org 2021-09-06 11:56 ` burnus at gcc dot gnu.org 2021-09-27 12:06 ` cvs-commit at gcc dot gnu.org 2021-10-12 2:57 ` sandra at gcc dot gnu.org 2021-10-21 2:28 ` cvs-commit at gcc dot gnu.org 2021-10-21 18:03 ` sandra at gcc dot gnu.org 2022-01-09 23:25 ` pinskia at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-94070-4-3DDPeAgzq2@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).