[flang] Fix folding of CMPLX
The code for folding calls to the intrinsic function CMPLX was incorrectly dependent on the number of arguments to distinguish its two cases (conversion from one kind of complex to another, and composition of a complex value from real & imaginary parts). This was wrong since the optional KIND= argument has already been taken into account by intrinsic processing; instead, the type of the first argument should decide the issue. Differential Revision: https://reviews.llvm.org/D103568
Loading
Please register or sign in to comment