[all-commits] [llvm/llvm-project] a6432b: [flang] Fix folding of SHAPE(SPREAD(source, dim, nco...

Peter Klausler via All-commits all-commits at lists.llvm.org
Wed May 28 14:01:31 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: a6432b971af1f38c604c9b835c5c52baf5c9b1f7
      https://github.com/llvm/llvm-project/commit/a6432b971af1f38c604c9b835c5c52baf5c9b1f7
  Author: Peter Klausler <pklausler at nvidia.com>
  Date:   2025-05-28 (Wed, 28 May 2025)

  Changed paths:
    M flang/lib/Evaluate/shape.cpp
    M flang/test/Evaluate/fold-spread.f90

  Log Message:
  -----------
  [flang] Fix folding of SHAPE(SPREAD(source,dim,ncopies=-1)) (#141146)

The number of copies on the new dimension must be clamped via MAX(0,
ncopies) so that it is no less than zero.

Fixes https://github.com/llvm/llvm-project/issues/141119.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list