[flang-commits] [flang] [flang][runtime] Fix another IsContiguous edge case (PR #69199)

Pete Steinfeld via flang-commits flang-commits at lists.llvm.org
Mon Oct 16 07:56:11 PDT 2023


================
@@ -125,16 +125,15 @@ RT_API_ATTRS int CFI_establish(CFI_cdesc_t *descriptor, void *base_addr,
 }
 
 RT_API_ATTRS int CFI_is_contiguous(const CFI_cdesc_t *descriptor) {
+  // See Descriptor::IsContiguous for the rational.
   bool stridesAreContiguous{true};
   CFI_index_t bytes = descriptor->elem_len;
   for (int j{0}; j < descriptor->rank; ++j) {
-    stridesAreContiguous &= bytes == descriptor->dim[j].sm;
+    stridesAreContiguous &=
----------------
psteinfeld wrote:

Here again, I got warnings.  Again, to make them go away, I needed to put parentheses around the `bytes ==` and the `dim[j].extent ==` subexpressions.

https://github.com/llvm/llvm-project/pull/69199


More information about the flang-commits mailing list