[Bug fortran/40598] Some missed optimizations in array assignment

2019-01-22 Thread juergen.reuter at desy dot de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=40598 Jürgen Reuter changed: What|Removed |Added CC||juergen.reuter at desy dot de --- Commen

[Bug fortran/40598] Some missed optimizations in array assignment

2010-05-08 Thread dfranke at gcc dot gnu dot org
--- Comment #12 from dfranke at gcc dot gnu dot org 2010-05-08 20:58 --- Paul, I'm always unsure with these kind of things; PR31009 and PR31016 may, or may not, be more of the same ... -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40598

[Bug fortran/40598] Some missed optimizations in array assignment

2010-05-08 Thread pault at gcc dot gnu dot org
--- Comment #11 from pault at gcc dot gnu dot org 2010-05-08 12:57 --- (In reply to comment #10) > (In reply to comment #9) > > It even works! > > Paul, any news here? This looks very useful! > See also PR41137. > Daniel, I totally forgot about this one. I had a first tinker since c

[Bug fortran/40598] Some missed optimizations in array assignment

2010-05-07 Thread dfranke at gcc dot gnu dot org
--- Comment #10 from dfranke at gcc dot gnu dot org 2010-05-07 21:02 --- (In reply to comment #9) > It even works! Paul, any news here? This looks very useful! See also PR41137. -- dfranke at gcc dot gnu dot org changed: What|Removed |Added -

[Bug fortran/40598] Some missed optimizations in array assignment

2009-07-01 Thread pault at gcc dot gnu dot org
--- Comment #9 from pault at gcc dot gnu dot org 2009-07-01 11:02 --- Richard, It even works! Thanks again Paul -- pault at gcc dot gnu dot org changed: What|Removed |Added

[Bug fortran/40598] Some missed optimizations in array assignment

2009-07-01 Thread pault at gcc dot gnu dot org
--- Comment #8 from pault at gcc dot gnu dot org 2009-07-01 10:51 --- Richard, > to set the upper bound correctly you have to build a new array type instead > of re-using TREE_TYPE (dest). The types TYPE_DOMAIN will specify the size > of the slice. Thus, > > slice_type = build_arra

[Bug fortran/40598] Some missed optimizations in array assignment

2009-07-01 Thread rguenth at gcc dot gnu dot org
--- Comment #7 from rguenth at gcc dot gnu dot org 2009-07-01 09:43 --- tmp = build4 (ARRAY_RANGE_REF, TREE_TYPE (dest), dest, build_int_cst (gfc_array_index_type, 3), NULL_TREE, NULL_TREE); to set the upper bound correctly you have to build a new

[Bug fortran/40598] Some missed optimizations in array assignment

2009-07-01 Thread pault at gcc dot gnu dot org
--- Comment #6 from pault at gcc dot gnu dot org 2009-07-01 08:23 --- I might as well confirm it:-) Paul -- pault at gcc dot gnu dot org changed: What|Removed |Added

[Bug fortran/40598] Some missed optimizations in array assignment

2009-07-01 Thread burnus at gcc dot gnu dot org
--- Comment #5 from burnus at gcc dot gnu dot org 2009-07-01 07:51 --- (In reply to comment #4) Here, I do not get any segfault/problem with valgrind (for gfortran and a.out). > tmp = build4 (ARRAY_RANGE_REF, TREE_TYPE (dest), dest, > build_int_cst (gfc_array_index

[Bug fortran/40598] Some missed optimizations in array assignment

2009-06-30 Thread pault at gcc dot gnu dot org
--- Comment #4 from pault at gcc dot gnu dot org 2009-06-30 12:57 --- Modifying trans-expr (gfc_trans_zero_assign) to: tmp = build4 (ARRAY_RANGE_REF, TREE_TYPE (dest), dest, build_int_cst (gfc_array_index_type, 3), NULL_TREE, NULL_TREE); /* If

[Bug fortran/40598] Some missed optimizations in array assignment

2009-06-30 Thread pault at gcc dot gnu dot org
--- Comment #3 from pault at gcc dot gnu dot org 2009-06-30 09:54 --- (In reply to comment #1) > I guess for zeroing you want memset, not memcpy. Note that in most of the ***blush*** - yes, you are right, of course! > cases you should be able to use direct assignments from {} (to zero

[Bug fortran/40598] Some missed optimizations in array assignment

2009-06-30 Thread burnus at gcc dot gnu dot org
--- Comment #2 from burnus at gcc dot gnu dot org 2009-06-30 09:46 --- array(:,1) = 0 would then become ARRAY_RANGE_REF = { } and array(:,1) = [1,2,3] would then become ARRAY_RANGE_REF = { 1,2,3 } If I recall correctly, using memcopy/memset causes alias analysis problems as

[Bug fortran/40598] Some missed optimizations in array assignment

2009-06-30 Thread rguenth at gcc dot gnu dot org
--- Comment #1 from rguenth at gcc dot gnu dot org 2009-06-30 09:39 --- I guess for zeroing you want memset, not memcpy. Note that in most of the cases you should be able to use direct assignments from {} (to zero) or the source. For selecting continuous ranges of an array you can use