[Bug fortran/116196] Missing temporary with WHERE and aliasing TARGET array references

2024-08-21 Thread mikael at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116196 --- Comment #3 from Mikael Morin --- Created attachment 58971 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=58971&action=edit Draft patch This fixes the testcase. But the testcase is by far insufficient to thoroughly check the correctnes

[Bug fortran/116196] Missing temporary with WHERE and aliasing TARGET array references

2024-08-21 Thread mikael at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116196 --- Comment #2 from Mikael Morin --- More complete testcase: ! { dg-do run } ! { dg-additional-options "-fdump-tree-original" } ! ! PR fortran/116196 MODULE m IMPLICIT NONE INTEGER, TARGET :: arr(5) END MODULE m PROGRAM main USE m IMP

[Bug fortran/116196] Missing temporary with WHERE and aliasing TARGET array references

2024-08-02 Thread mikael at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116196 --- Comment #1 from Mikael Morin --- Draft patch: diff --git a/gcc/fortran/dependency.cc b/gcc/fortran/dependency.cc index 15edf1af9df..348fd562ef6 100644 --- a/gcc/fortran/dependency.cc +++ b/gcc/fortran/dependency.cc @@ -1253,11 +1253,8 @@ ch