This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Patch, Fortran] -fcoarray=lib: Fix vector subscript handling


PING

On 18 December 2014, 00:14, Tobias Burnus wrote:
As testing by Alessandro revealed, vector subscripts weren't properly handled.

This patch fixes the compiler side (or at least those issues I found). In particular, for expressions ("get") it wrongly passed a NULL pointer, additionally, I used the wrong "ar". For it and for assignments/push ("send", "sendget"), I also used the wrong rank value as one also passes DIMEN_ELEMENT as DIMEN_RANGE.

Build and regtested on x86-64-gnu-linux.
OK for the trunk?

* * *

I still have to add vector subscript support to libcaf_single. I didn't include an -fdump-tree-original test case, but I can add one if there regarded as useful.

Attached is â besides the patch for trans-intrinsic.c â a debuging patch for libcaf_single. I tested it with:
integer :: A(2,3)[*]
A(2,:) = A(1,[1,3,2])[1]
end

integer :: A(2,3)[*]
A(1,[1,3,2])[1] = A(2,:)
end

integer :: A(2,3)[*]
integer :: B(2,3)[*]
A(1,[1,3,2])[1] = B(1,[1,3,2])[1]
end

The output looks like (for the first one):

DEBUG: CAF_GET: 0x7fffb72f71d0
DEBUG: have vector for rank 2 [1]
DEBUG: dim=0: nvec = 0
DEBUG: (1:1:1)
DEBUG: dim=1: nvec = 3
DEBUG: 0: 1
DEBUG: 1: 3
DEBUG: 2: 2

Tobias


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]