[all-commits] [llvm/llvm-project] 514de3: [flang] Place MIN/MAX A1/A2 first in semantic anal...

jeanPerier via All-commits all-commits at lists.llvm.org
Mon Oct 23 01:42:32 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 514de38330abc2d17d8f15e333e5991c5a9d2b43
      https://github.com/llvm/llvm-project/commit/514de38330abc2d17d8f15e333e5991c5a9d2b43
  Author: jeanPerier <jperier at nvidia.com>
  Date:   2023-10-23 (Mon, 23 Oct 2023)

  Changed paths:
    M flang/include/flang/Evaluate/intrinsics.h
    M flang/lib/Evaluate/intrinsics.cpp
    A flang/test/Lower/Intrinsics/min.f90
    M flang/test/Semantics/call23.f90

  Log Message:
  -----------
  [flang] Place MIN/MAX A1/A2 first in semantic analysis (#69722)

Intrinsic analysis in semantics reorder the actual arguments so that
they match the dummy order. This was not done for MIN/MAX because they
are special: these are the only intrinsics with a variadic number of
arguments.

This caused bugs in lowering that only check the optionality of actual
arguments from the third position (since A1 and A2 are mandatory).

Update semantics to place A1/A2 first. This also allow removing some
checks that were specific to MIN/MAX. There is no point in
sorting/placing the rest of the arguments which would be tedious and
tricky because of the variadic aspect.




More information about the All-commits mailing list