[all-commits] [llvm/llvm-project] ec6b2c: [flang] Fold character array constructor with unkn...

Peter Klausler via All-commits all-commits at lists.llvm.org
Mon Jan 27 08:57:20 PST 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: ec6b2c63d93d8f8edeafcc7330d0b2349463d73d
      https://github.com/llvm/llvm-project/commit/ec6b2c63d93d8f8edeafcc7330d0b2349463d73d
  Author: Peter Klausler <pklausler at nvidia.com>
  Date:   2025-01-27 (Mon, 27 Jan 2025)

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

  Log Message:
  -----------
  [flang] Fold character array constructor with unknown length (#123983)

When a character array constructor does not have an explicit type with a
constant length, the compiler can still fold it if all of its elements
are constants. These array constructors will have been wrapped up in the
internal %SET_LENGTH operation, which will determine the final length of
the folded value, so use the maximum length of the constant elements as
the length of the folded array constructor.

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



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