public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/101841] New: Wrong realloc-lhs warning with matmul and -O2
@ 2021-08-10 8:11 jellby at yahoo dot com
2021-08-10 19:27 ` [Bug fortran/101841] " anlauf at gcc dot gnu.org
0 siblings, 1 reply; 2+ messages in thread
From: jellby at yahoo dot com @ 2021-08-10 8:11 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101841
Bug ID: 101841
Summary: Wrong realloc-lhs warning with matmul and -O2
Product: gcc
Version: 10.3.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: jellby at yahoo dot com
Target Milestone: ---
I get a warning with this:
program test
real, allocatable :: F(:,:), A(:,:), B(:,:)
allocate(F(10,10), A(10,10), B(10,10))
F(:,:) = 1.0
A(:,:) = 0.5
B(:,:) = 2.0
F(:,:) = F-matmul(a,b)
end program test
$ gfortran test.f90 -Wrealloc-lhs -O2
No warning with "F(:,:) = matmul(a,b)"
Maybe the warning means that a temporary array is created (although I guess it
wouldn't be needed)? But as far as I can see there should be no reallocation
here.
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug fortran/101841] Wrong realloc-lhs warning with matmul and -O2
2021-08-10 8:11 [Bug fortran/101841] New: Wrong realloc-lhs warning with matmul and -O2 jellby at yahoo dot com
@ 2021-08-10 19:27 ` anlauf at gcc dot gnu.org
0 siblings, 0 replies; 2+ messages in thread
From: anlauf at gcc dot gnu.org @ 2021-08-10 19:27 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101841
anlauf at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever confirmed|0 |1
Priority|P3 |P4
Last reconfirmed| |2021-08-10
--- Comment #1 from anlauf at gcc dot gnu.org ---
Confirmed.
The warning disappears when frontend-optimization is disabled
(i.e. use -fno-frontend-optimize).
The warning also disappears if you disable the generation of inline
code for matmul by specifying -finline-matmul-limit=0 .
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-08-10 19:27 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-10 8:11 [Bug fortran/101841] New: Wrong realloc-lhs warning with matmul and -O2 jellby at yahoo dot com
2021-08-10 19:27 ` [Bug fortran/101841] " anlauf at gcc dot gnu.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).