Skip to content

Commit

Permalink
Merge pull request #15504 from bradcray/fix-fortran-interop-tuples
Browse files Browse the repository at this point in the history
Fix Fortran interop tests which had not been updated to 0-based tupling

[trivial, not reviewed]

Apparently the one (?) test configuration that runs these hasn't
completed since March 25th?
  • Loading branch information
bradcray authored and jhoole committed Apr 13, 2020
1 parent d7d22b0 commit 6fbb269
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions modules/internal/ISO_Fortran_binding.chpl
Original file line number Diff line number Diff line change
Expand Up @@ -194,9 +194,9 @@ module ISO_Fortran_binding {
}

var dims: rank*range;
for param i in 1..rank {
assert(FA.dim[i-1].lower_bound == 0);
dims[i] = 1..#FA.dim[i-1].extent;
for param i in 0..<rank {
assert(FA.dim[i].lower_bound == 0);
dims[i] = 1..#FA.dim[i].extent;
}
var D = {(...dims)};
var A = D.buildArrayWith(eltType,
Expand Down
4 changes: 2 additions & 2 deletions test/interop/fortran/multidimArray/chapelProcs.chpl
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ export proc chpl_library_init_ftn() {
proc CFI_cdesc_t.this(idx:int...?rank) ref {
assert(this.rank == rank);
var subscripts: [0..#rank] CFI_index_t;
for param i in 1..rank {
subscripts[i-1] = idx[i]: CFI_index_t;
for param i in 0..<rank {
subscripts[i] = idx[i]: CFI_index_t;
}
var x = CFI_address(this, c_ptrTo(subscripts)): c_ptr(real);
return x.deref();
Expand Down

0 comments on commit 6fbb269

Please sign in to comment.