[Bug fortran/30409] [fortran] missed optimization with pure function arguments

2023-10-23 Thread kargl at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=30409 --- Comment #12 from kargl at gcc dot gnu.org --- (In reply to anlauf from comment #11) > (In reply to kargl from comment #10) > > (In reply to anlauf from comment #8) > > > which is equivalent to > > > >tmp = 1 / y > >do i = 1, n > >

[Bug fortran/30409] [fortran] missed optimization with pure function arguments

2023-10-23 Thread anlauf at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=30409 --- Comment #11 from anlauf at gcc dot gnu.org --- (In reply to kargl from comment #10) > (In reply to anlauf from comment #8) > I'm not sure what you are worried about here. If one has > >do i = 1, n > ... = expression1(..., 1/y) >

[Bug fortran/30409] [fortran] missed optimization with pure function arguments

2023-10-23 Thread kargl at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=30409 --- Comment #10 from kargl at gcc dot gnu.org --- (In reply to anlauf from comment #8) > The suggested optimization needs to take into account that the evaluation > of the temporary expression might trap, or that allocatable variables are > not

[Bug fortran/30409] [fortran] missed optimization with pure function arguments

2023-10-22 Thread tkoenig at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=30409 Thomas Koenig changed: What|Removed |Added Depends on||21046 --- Comment #9 from Thomas Koenig

[Bug fortran/30409] [fortran] missed optimization with pure function arguments

2023-10-22 Thread anlauf at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=30409 --- Comment #8 from anlauf at gcc dot gnu.org --- The suggested optimization needs to take into account that the evaluation of the temporary expression might trap, or that allocatable variables are not allocated, etc. The trap etc. would not

[Bug fortran/30409] [fortran] missed optimization with pure function arguments

2023-10-22 Thread kargl at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=30409 --- Comment #7 from kargl at gcc dot gnu.org --- The attached testcase use xmin and xmax uninitialized. After setting xmin = 0 and xmax = 1 and adding z(1) to the print statements to prevent the inner loop from being optimized away, I see the

[Bug fortran/30409] [fortran] missed optimization with pure function arguments

2015-11-01 Thread tkoenig at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=30409 --- Comment #6 from Thomas Koenig --- *** Bug 45676 has been marked as a duplicate of this bug. ***

[Bug fortran/30409] [fortran] missed optimization with pure function arguments

2010-10-02 Thread tkoenig at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30409 --- Comment #5 from Thomas Koenig tkoenig at gcc dot gnu.org 2010-10-02 08:10:51 UTC --- Related to PR 45777.

[Bug fortran/30409] [fortran] missed optimization with pure function arguments

2007-01-09 Thread rguenth at gcc dot gnu dot org
--- Comment #3 from rguenth at gcc dot gnu dot org 2007-01-09 11:11 --- In the middle-end this somewhat is related to PR26387. Of course this is a place where frontend optimization is probably easier to do. Confirmed. -- rguenth at gcc dot gnu dot org changed: What

[Bug fortran/30409] [fortran] missed optimization with pure function arguments

2007-01-09 Thread kargl at gcc dot gnu dot org
--- Comment #4 from kargl at gcc dot gnu dot org 2007-01-09 16:08 --- Note, above the first FORALL statement one needs to add the following 2 lines of code xmin = 0. xmax = 1. As a side note, both Pathscale and Intel in the c.l.f thread have acknowledged that their compilers also

[Bug fortran/30409] [fortran] missed optimization with pure function arguments

2007-01-08 Thread kargl at gcc dot gnu dot org
--- Comment #1 from kargl at gcc dot gnu dot org 2007-01-08 21:32 --- Created an attachment (id=12871) -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=12871action=view) missed optimization -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30409

[Bug fortran/30409] [fortran] missed optimization with pure function arguments

2007-01-08 Thread kargl at gcc dot gnu dot org
--- Comment #2 from kargl at gcc dot gnu dot org 2007-01-08 21:36 --- Sorry about the long URL, but the code comes from this comp.lang.fortran thread. http://groups-beta.google.com/group/comp.lang.fortran/browse_thread/thread/9f9bf1c116dc4b69/712366ef4318e84d#712366ef4318e84d --