public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/65819] New: overzealous checking in gfc_check_dependency for identical=true
@ 2015-04-20 21:15 tkoenig at gcc dot gnu.org
2015-04-20 21:16 ` [Bug fortran/65819] " tkoenig at gcc dot gnu.org
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: tkoenig at gcc dot gnu.org @ 2015-04-20 21:15 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65819
Bug ID: 65819
Summary: overzealous checking in gfc_check_dependency for
identical=true
Product: gcc
Version: 6.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: tkoenig at gcc dot gnu.org
Just ran across this while trying to cook up a test case for matrix inlining.
In the patch proposed for PR 37131, I have
if (gfc_check_dependency (expr1, matrix_a, true)
|| gfc_check_dependency (expr1, matrix_b, true))
return 0;
In the test case, I want to do
f(3,1:eight:2,:) = matmul(f(1,1:3,2:3), f(2,2:3,:))
where clearly the lhs does not depend on the rhs. However, specifying true to
gfc_dep_dependency leads to
if (identical)
return 1;
before any checking is done. I'm not sure if there is a real-world test
case yet, but there will be one soon, so I'll keep this PR as a reminder.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug fortran/65819] overzealous checking in gfc_check_dependency for identical=true
2015-04-20 21:15 [Bug fortran/65819] New: overzealous checking in gfc_check_dependency for identical=true tkoenig at gcc dot gnu.org
@ 2015-04-20 21:16 ` tkoenig at gcc dot gnu.org
2015-09-08 13:14 ` dominiq at lps dot ens.fr
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: tkoenig at gcc dot gnu.org @ 2015-04-20 21:16 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65819
Thomas Koenig <tkoenig at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |missed-optimization
Blocks| |37131
Severity|normal |enhancement
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug fortran/65819] overzealous checking in gfc_check_dependency for identical=true
2015-04-20 21:15 [Bug fortran/65819] New: overzealous checking in gfc_check_dependency for identical=true tkoenig at gcc dot gnu.org
2015-04-20 21:16 ` [Bug fortran/65819] " tkoenig at gcc dot gnu.org
@ 2015-09-08 13:14 ` dominiq at lps dot ens.fr
2015-09-08 20:02 ` tkoenig at gcc dot gnu.org
2021-10-23 22:11 ` sandra at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: dominiq at lps dot ens.fr @ 2015-09-08 13:14 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65819
Dominique d'Humieres <dominiq at lps dot ens.fr> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |WAITING
Last reconfirmed| |2015-09-08
Ever confirmed|0 |1
--- Comment #1 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
Test case?
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug fortran/65819] overzealous checking in gfc_check_dependency for identical=true
2015-04-20 21:15 [Bug fortran/65819] New: overzealous checking in gfc_check_dependency for identical=true tkoenig at gcc dot gnu.org
2015-04-20 21:16 ` [Bug fortran/65819] " tkoenig at gcc dot gnu.org
2015-09-08 13:14 ` dominiq at lps dot ens.fr
@ 2015-09-08 20:02 ` tkoenig at gcc dot gnu.org
2021-10-23 22:11 ` sandra at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: tkoenig at gcc dot gnu.org @ 2015-09-08 20:02 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65819
Thomas Koenig <tkoenig at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|WAITING |NEW
--- Comment #2 from Thomas Koenig <tkoenig at gcc dot gnu.org> ---
The LHS and the arrays on the RHS cannot possibly overlap,
because of the difference in the first index.
ig25@linux-fd1f:~/Krempel/Dep-f> cat foo.f90
program main
implicit none
real, dimension(3,3,3) :: f
integer :: three
call random_number(f)
three = 3
f(1, 1:three, :) = matmul(f(2,1:3,2:3), f(3,2:3,:))
print *,f
end program main
ig25@linux-fd1f:~/Krempel/Dep-f> gfortran -O -Warray-temporaries foo.f90
foo.f90:7:21:
f(1, 1:three, :) = matmul(f(2,1:3,2:3), f(3,2:3,:))
1
Warning: Creating array temporary at (1) [-Warray-temporaries]
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug fortran/65819] overzealous checking in gfc_check_dependency for identical=true
2015-04-20 21:15 [Bug fortran/65819] New: overzealous checking in gfc_check_dependency for identical=true tkoenig at gcc dot gnu.org
` (2 preceding siblings ...)
2015-09-08 20:02 ` tkoenig at gcc dot gnu.org
@ 2021-10-23 22:11 ` sandra at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: sandra at gcc dot gnu.org @ 2021-10-23 22:11 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65819
sandra at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
CC| |sandra at gcc dot gnu.org
Status|NEW |RESOLVED
--- Comment #8 from sandra at gcc dot gnu.org ---
This issue seems to have been fixed by the above patch.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2021-10-23 22:11 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-20 21:15 [Bug fortran/65819] New: overzealous checking in gfc_check_dependency for identical=true tkoenig at gcc dot gnu.org
2015-04-20 21:16 ` [Bug fortran/65819] " tkoenig at gcc dot gnu.org
2015-09-08 13:14 ` dominiq at lps dot ens.fr
2015-09-08 20:02 ` tkoenig at gcc dot gnu.org
2021-10-23 22:11 ` sandra 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).