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/44744] Missing -fcheck=bounds diagnostic for function assignment with tmp array Date: Sat, 18 May 2024 15:45:37 +0000 [thread overview] Message-ID: <bug-44744-4-rw4SeuSXkU@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-44744-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=44744 Tobias Burnus <burnus at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |burnus at gcc dot gnu.org --- Comment #4 from Tobias Burnus <burnus at gcc dot gnu.org> --- Another variant from lsdalton – or rather the https://github.com/openrsp/openrsp/archive/v1.0.0.tar.gz it downloads during the build. FLANG diagnoses the LSDalton issue as: error(/home/jehammond/DALTON/lsdalton/build/_deps/openrsp_sources-src/src/ao_dens/rsp_property_caching.f90:2164): Assign: mismatching element counts in array assignment (to 6, from 3) * * * GCC fails to do so. Testcase: – the problem is that the RHS is 3 and the LHS is 6: implicit none real,allocatable :: A(:,:,:) integer :: n, n2, i n = 6 n2 = 3 allocate(A(3,n,3)) do i = 1, 3 print *, shape(a), '|', shape(f(n2)) a(i,:,:) = f(n2) end do deallocate(A) contains function f(n) integer :: n real :: f(n,3) f = 99.0 end end
next parent reply other threads:[~2024-05-18 15:45 UTC|newest] Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top [not found] <bug-44744-4@http.gcc.gnu.org/bugzilla/> 2024-05-18 15:45 ` burnus at gcc dot gnu.org [this message] 2024-05-18 16:01 ` burnus at gcc dot gnu.org 2010-07-01 13:51 [Bug fortran/44744] New: [4.6 Regression] Missed runtime error after revision 161550 dominiq at lps dot ens dot fr 2010-07-14 17:42 ` [Bug fortran/44744] Missing -fcheck=bounds diagnostic for function assignment with tmp array burnus at gcc dot gnu dot 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-44744-4-rw4SeuSXkU@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).