[all-commits] [llvm/llvm-project] bef3e8: [flang][runtime] Fix another IsContiguous edge cas...

jeanPerier via All-commits all-commits at lists.llvm.org
Mon Oct 16 23:49:56 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: bef3e8ea6d241a7e249410e85cff36cddfa98720
      https://github.com/llvm/llvm-project/commit/bef3e8ea6d241a7e249410e85cff36cddfa98720
  Author: jeanPerier <jperier at nvidia.com>
  Date:   2023-10-17 (Tue, 17 Oct 2023)

  Changed paths:
    M flang/include/flang/Runtime/descriptor.h
    M flang/runtime/ISO_Fortran_binding.cpp
    M flang/unittests/Evaluate/ISO-Fortran-binding.cpp

  Log Message:
  -----------
  [flang][runtime] Fix another IsContiguous edge case (#69199)

A recent PR addressed zero and one element edge cases but did not cover
another case where the descriptors of arrays with more than two elements
may have byte strides that are not perfect multiples, like when creating
a descriptor for A(:, 1:1:2).

In general, the byte stride in a dimension is only meaningful if that
dimension has more than one element. Update IsContiguous and
CFI_is_contiguous to reflect that.




More information about the All-commits mailing list