[all-commits] [llvm/llvm-project] d83c97: [flang] Prevent bad expression rewrite 0*ARR -> 0 ...

Peter Klausler via All-commits all-commits at lists.llvm.org
Mon Jan 29 14:26:05 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: d83c97714756e828c9c7091aa8294e022c93a454
      https://github.com/llvm/llvm-project/commit/d83c97714756e828c9c7091aa8294e022c93a454
  Author: Peter Klausler <35819229+klausler at users.noreply.github.com>
  Date:   2024-01-29 (Mon, 29 Jan 2024)

  Changed paths:
    M flang/lib/Evaluate/fold-implementation.h
    A flang/test/Semantics/generic08.f90

  Log Message:
  -----------
  [flang] Prevent bad expression rewrite 0*ARR -> 0 (#79853)

Don't rewrite 0*X to 0 if X is not scalar. Up until now this hasn't
shown up as a bug because a scalar 0 works in nearly all expressions
where an array would be expected. But not in all cases -- this bad
rewrite can cause generic procedure resolution to fail when it causes an
actual argument to have an unsupported rank.




More information about the All-commits mailing list