[Bug fortran/94578] Incorrect assignment of RESHAPE() result to a Fortran pointer

2020-04-27 Thread tkoenig at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94578 Thomas Koenig changed: What|Removed |Added See Also||https://gcc.gnu.org/bugzill

[Bug fortran/94578] Incorrect assignment of RESHAPE() result to a Fortran pointer

2020-04-27 Thread howisjw at hotmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94578 --- Comment #11 from Jan-Willem Blokland --- If you make use of an temporary variable, it sounds like you will do an additional memory copy. Therefore, I am wondering what the performance impact will be. Naively, I would think the span solution

[Bug fortran/94578] Incorrect assignment of RESHAPE() result to a Fortran pointer

2020-04-25 Thread cvs-commit at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94578 --- Comment #10 from CVS Commits --- The master branch has been updated by Thomas Kथà¤nig : https://gcc.gnu.org/g:cf3f7b309ffdd888fdd85048ac9b4bcdc2713a45 commit r10-7960-gcf3f7b309ffdd888fdd85048ac9b4bcdc2713a45 Author: Thomas König Date:

[Bug fortran/94578] Incorrect assignment of RESHAPE() result to a Fortran pointer

2020-04-17 Thread tkoenig at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94578 --- Comment #9 from Thomas Koenig --- Here's what a solution could look like. I am not really sure that this is the way to go, there may be some corner cases (pointer to an argument which was passed as a transposed argument?) which this might

[Bug fortran/94578] Incorrect assignment of RESHAPE() result to a Fortran pointer

2020-04-17 Thread tkoenig at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94578 --- Comment #8 from Thomas Koenig --- The bug appears to affect intrinsics only, for example this program main implicit none type foo integer :: x, y end type foo integer, dimension(:), pointer :: bp type (foo), dimension(4),

[Bug fortran/94578] Incorrect assignment of RESHAPE() result to a Fortran pointer

2020-04-17 Thread howisjw at hotmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94578 --- Comment #7 from Jan-Willem Blokland --- Thanks for verifying my case. Your test makes me wonder which intrinsics are effected in this and other versions of gfortran. Furthermore, I assume it also happens when you pass the pointer to

[Bug fortran/94578] Incorrect assignment of RESHAPE() result to a Fortran pointer

2020-04-16 Thread tkoenig at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94578 --- Comment #6 from Thomas Koenig --- Also wrong: program main implicit none type foo integer :: x, y end type foo integer :: i integer, dimension (2,2) :: array2d integer, dimension(:), pointer :: array1d type(foo),

[Bug fortran/94578] Incorrect assignment of RESHAPE() result to a Fortran pointer

2020-04-16 Thread tkoenig at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94578 --- Comment #5 from Thomas Koenig --- Somewhat smaller test case: program main implicit none type foo integer :: x, y end type foo integer :: i integer, dimension (2,2) :: array2d integer, dimension(:), pointer :: array1d

[Bug fortran/94578] Incorrect assignment of RESHAPE() result to a Fortran pointer

2020-04-14 Thread tkoenig at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94578 --- Comment #4 from Thomas Koenig --- Looks like span is not handled in reshape (at all). It will be interesting to see how other intrinsics such as maxloc and just about everything else handles this.

[Bug fortran/94578] Incorrect assignment of RESHAPE() result to a Fortran pointer

2020-04-14 Thread tkoenig at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94578 Thomas Koenig changed: What|Removed |Added Status|UNCONFIRMED |NEW Ever confirmed|0

[Bug fortran/94578] Incorrect assignment of RESHAPE() result to a Fortran pointer

2020-04-13 Thread howisjw at hotmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94578 --- Comment #2 from Jan-Willem Blokland --- Created attachment 48259 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=48259=edit Program bug_reshape

[Bug fortran/94578] Incorrect assignment of RESHAPE() result to a Fortran pointer

2020-04-13 Thread howisjw at hotmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94578 --- Comment #1 from Jan-Willem Blokland --- Below are the results of the test program. The results of array1d should have been identical to array2d. --- array2d --- 1 1 0.100E+01 0.100E+01 0.100E+01 0.100E+00