2014-12-18 0:14 GMT+01:00 Tobias Burnus <bur...@net-b.de>: > 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?
Ok. Thanks, Janus > * * * > > 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