flang/test/Lower/Intrinsics/min.f90
0 → 100644
+34
−0
Loading
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.