public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/44744] Missing -fcheck=bounds diagnostic for function assignment with tmp array
[not found] <bug-44744-4@http.gcc.gnu.org/bugzilla/>
@ 2024-05-18 15:45 ` burnus at gcc dot gnu.org
2024-05-18 16:01 ` burnus at gcc dot gnu.org
1 sibling, 0 replies; 3+ messages in thread
From: burnus at gcc dot gnu.org @ 2024-05-18 15:45 UTC (permalink / raw)
To: gcc-bugs
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug fortran/44744] Missing -fcheck=bounds diagnostic for function assignment with tmp array
[not found] <bug-44744-4@http.gcc.gnu.org/bugzilla/>
2024-05-18 15:45 ` [Bug fortran/44744] Missing -fcheck=bounds diagnostic for function assignment with tmp array burnus at gcc dot gnu.org
@ 2024-05-18 16:01 ` burnus at gcc dot gnu.org
1 sibling, 0 replies; 3+ messages in thread
From: burnus at gcc dot gnu.org @ 2024-05-18 16:01 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=44744
--- Comment #5 from Tobias Burnus <burnus at gcc dot gnu.org> ---
(In reply to Tobias Burnus from comment #4)
> Another variant from lsdalton – or rather the
BTW: I have not verified that the cause is the same (temporary variable), but
it seems to be likely.
When replacing the 'A(i,:,:)' on the LHS with 'B(:,:)', gfortran does diagnose
the too large RHS.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug fortran/44744] Missing -fcheck=bounds diagnostic for function assignment with tmp array
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 ` burnus at gcc dot gnu dot org
0 siblings, 0 replies; 3+ messages in thread
From: burnus at gcc dot gnu dot org @ 2010-07-14 17:42 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from burnus at gcc dot gnu dot org 2010-07-14 17:42 -------
After PR 44773 has been fixed, we are back to things which failed before. Test
case which has no diagnostic (same as the one in comment 0 but with TARGET
attribute to force the creation of an array temporary)
integer, target :: a(-4:1), b(0:4)
b = 5
i = 0
a(i:1) = f(b)
contains
function f(x)
integer :: x(:),f(size(x))
f = x
end function
end
--
burnus at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Keywords| |diagnostic
Last reconfirmed|0000-00-00 00:00:00 |2010-07-14 17:42:11
date| |
Summary|[4.6 Regression] Missed |Missing -fcheck=bounds
|runtime error after revision|diagnostic for function
|161550 |assignment with tmp array
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44744
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-05-18 16:01 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <bug-44744-4@http.gcc.gnu.org/bugzilla/>
2024-05-18 15:45 ` [Bug fortran/44744] Missing -fcheck=bounds diagnostic for function assignment with tmp array burnus at gcc dot gnu.org
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
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).