[Bug fortran/43072] unneeded temporary (s=s+f(a))

2019-01-15 Thread tkoenig at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=43072

--- Comment #10 from Thomas Koenig  ---
Author: tkoenig
Date: Tue Jan 15 22:18:55 2019
New Revision: 267953

URL: https://gcc.gnu.org/viewcvs?rev=267953=gcc=rev
Log:
2019-01-15  Thomas Koenig  

PR fortran/43072
* resolve.c (resolve_array_ref): Add equal_length argument; set it
if the length of the substring equals that of the orignal
variable.
(resolve_ref): Remove the substring if it is equal in length to
the original variable, unless it is an EXPR_SUBSTRING).

2019-01-15  Thomas Koenig  

PR fortran/43072
* gfortran.dg/actual_array_substr_3.f90: New test.


Added:
trunk/gcc/testsuite/gfortran.dg/actual_array_substr_3.f90
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/resolve.c
trunk/gcc/testsuite/ChangeLog

[Bug fortran/43072] unneeded temporary (s=s+f(a))

2010-05-18 Thread pault at gcc dot gnu dot org


--- Comment #9 from pault at gcc dot gnu dot org  2010-05-19 04:28 ---
Fixed.  Thanks, Joost!

Paul


-- 

pault at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|WAITING |RESOLVED
 Resolution||FIXED


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43072



[Bug fortran/43072] unneeded temporary (s=s+f(a))

2010-05-09 Thread dfranke at gcc dot gnu dot org


--- Comment #8 from dfranke at gcc dot gnu dot org  2010-05-09 20:19 ---
(In reply to comment #6)
 Same as 41113 - I'll decide what to do tonight - see you on #gfortran?

PR41113 is closed as fixed - can this be closed as well?


-- 

dfranke at gcc dot gnu dot org changed:

   What|Removed |Added

 CC||dfranke at gcc dot gnu dot
   ||org
 Status|NEW |WAITING


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43072



[Bug fortran/43072] unneeded temporary (s=s+f(a))

2010-02-21 Thread paul dot richard dot thomas at gmail dot com


--- Comment #6 from paul dot richard dot thomas at gmail dot com  
2010-02-21 10:43 ---
Subject: Re:  unneeded temporary (s=s+f(a))

Same as 41113 - I'll decide what to do tonight - see you on #gfortran?

Paul

On Sat, Feb 20, 2010 at 10:48 PM, burnus at gcc dot gnu dot org
gcc-bugzi...@gcc.gnu.org wrote:


 --- Comment #5 from burnus at gcc dot gnu dot org  2010-02-20 21:48 
 ---
 Can this PR be closed? I think it is fixed now.


 --


 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43072

 --- You are receiving this mail because: ---
 You are on the CC list for the bug, or are watching someone who is.



-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43072



[Bug fortran/43072] unneeded temporary (s=s+f(a))

2010-02-21 Thread pault at gcc dot gnu dot org


--- Comment #7 from pault at gcc dot gnu dot org  2010-02-22 05:44 ---
Subject: Bug 43072

Author: pault
Date: Mon Feb 22 05:43:57 2010
New Revision: 156949

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=156949
Log:
2010-02-22  Paul Thomas  pa...@gcc.gnu.org

PR fortran/43072
* dependency.c (gfc_full_array_ref_p): Check for contiguous by
checking the rest of the dimensions for elements.

2010-02-22  Paul Thomas  pa...@gcc.gnu.org

PR fortran/43072
* gfortran.dg/internal_pack_6.f90: Number of 'packs' now zero.
* gfortran.dg/internal_pack_9.f90: New test.

Added:
trunk/gcc/testsuite/gfortran.dg/internal_pack_9.f90
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/dependency.c
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/gfortran.dg/internal_pack_6.f90


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43072



[Bug fortran/43072] unneeded temporary (s=s+f(a))

2010-02-20 Thread pault at gcc dot gnu dot org


--- Comment #4 from pault at gcc dot gnu dot org  2010-02-20 12:47 ---
Subject: Bug 43072

Author: pault
Date: Sat Feb 20 12:46:43 2010
New Revision: 156926

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=156926
Log:
2010-02-20  Paul Thomas  pa...@gcc.gnu.org

PR fortran/36932
PR fortran/36933
PR fortran/43072
PR fortran/43111
* dependency.c (gfc_check_argument_var_dependency): Use enum
value instead of arithmetic vaue for 'elemental'.
(check_data_pointer_types): New function.
(gfc_check_dependency): Call check_data_pointer_types.
* trans-array.h : Change fourth argument of
gfc_conv_array_parameter to boolean.
* trans-array.c (gfc_conv_array_parameter): A contiguous array
can be a dummy but it must not be assumed shape or deferred.
Change fourth argument to boolean. Array constructor exprs will
always be contiguous and do not need packing and unpacking.
* trans-expr.c (gfc_conv_procedure_call): Clean up some white
space and change fourth argument of gfc_conv_array_parameter
to boolean.
(gfc_trans_arrayfunc_assign): Change fourth argument of
gfc_conv_array_parameter to boolean.
* trans-io.c (gfc_convert_array_to_string): The same.
* trans-intrinsic.c (gfc_conv_intrinsic_loc): The same.

2010-02-20  Paul Thomas  pa...@gcc.gnu.org

PR fortran/36932
PR fortran/36933
* gfortran.dg/dependency_26.f90: New test.

PR fortran/43072
* gfortran.dg/internal_pack_7.f90: New test.

PR fortran/43111
* gfortran.dg/internal_pack_8.f90: New test.


Added:
trunk/gcc/testsuite/gfortran.dg/dependency_26.f90
trunk/gcc/testsuite/gfortran.dg/internal_pack_7.f90
trunk/gcc/testsuite/gfortran.dg/internal_pack_8.f90
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/dependency.c
trunk/gcc/fortran/trans-array.c
trunk/gcc/fortran/trans-array.h
trunk/gcc/fortran/trans-expr.c
trunk/gcc/fortran/trans-intrinsic.c
trunk/gcc/fortran/trans-io.c
trunk/gcc/testsuite/ChangeLog


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43072



[Bug fortran/43072] unneeded temporary (s=s+f(a))

2010-02-20 Thread burnus at gcc dot gnu dot org


--- Comment #5 from burnus at gcc dot gnu dot org  2010-02-20 21:48 ---
Can this PR be closed? I think it is fixed now.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43072



[Bug fortran/43072] unneeded temporary (s=s+f(a))

2010-02-16 Thread pault at gcc dot gnu dot org


--- Comment #3 from pault at gcc dot gnu dot org  2010-02-16 15:46 ---
(In reply to comment #2)

I have just patched a tree with the fix for PR36932 on an i686 at work.  None
of these temporaries appear!

Something is different between 32 and 64 bits..

Paul


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43072



[Bug fortran/43072] unneeded temporary (s=s+f(a))

2010-02-14 Thread pault at gcc dot gnu dot org


--- Comment #1 from pault at gcc dot gnu dot org  2010-02-15 07:51 ---
Yes, indeed.

In fact, S2((/(real (i),i=1,2)/)) produces calls to pack and unpack in both S0
and S1.

I'll take a look at it.

Thanks

Paul


-- 

pault at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
 Ever Confirmed|0   |1
   Last reconfirmed|-00-00 00:00:00 |2010-02-15 07:51:01
   date||


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43072



[Bug fortran/43072] unneeded temporary (s=s+f(a))

2010-02-14 Thread jv244 at cam dot ac dot uk


--- Comment #2 from jv244 at cam dot ac dot uk  2010-02-15 07:58 ---
(In reply to comment #1)
 Yes, indeed.
 
 In fact, S2((/(real (i),i=1,2)/)) produces calls to pack and unpack in both S0
 and S1.
 
 I'll take a look at it.

You did beat me again, I wanted to file the following testcase, which I believe
is actually independent, but is similar to what you mentioned above:

MODULE M1
CONTAINS
  ! OK
  SUBROUTINE S0
 REAL, PARAMETER :: c(2)=(/1.0,2.0/)
 CALL S2(c)
  END SUBROUTINE S0

  ! NOT OK
  SUBROUTINE S1
 CALL S2((/1.0,2.0/))
  END SUBROUTINE S1

  SUBROUTINE S2(c)
 REAL, INTENT(IN) :: c(2)
  END SUBROUTINE S2

END MODULE M1

this 'S1' style appears also to be a rather common source of packs in CP2K


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43072