[all-commits] [llvm/llvm-project] 2f0b4f: [flang][extension] support concatenation with abse...

jeanPerier via All-commits all-commits at lists.llvm.org
Thu Oct 17 04:25:32 PDT 2024


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

  Changed paths:
    M flang/lib/Optimizer/CodeGen/CodeGen.cpp
    M flang/test/Fir/optional.fir

  Log Message:
  -----------
  [flang][extension] support concatenation with absent optional (#112678)

Fix #112593 by adding support in lowering to concatenation with an
absent optional _assumed length_ dummy argument because:
1. Most compilers seem to support it (most likely by accident).
2. This actually makes the compiler codegen simpler. Codegen was going
out of its way to poke the LLVM optimizer bear by producing an undef
argument for the length.

I insist on the fact that no compiler support this with _explicit
length_ optional arguments and the executable will segfault and I would
discourage users from using that "feature" because runtime checks for
bad optional dereference will kick when used (For instance, "nagfor
-C=present" will produce an executable that abort with an error message
. Flang does not have such runtime check option so far).

Hence, I am not updating the Extensions.md document because this is not
something I think we should advertise.



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