[llvm] [flang-rt] Fix TypeCategory for quad-precision COMPLEX (PR #168090)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 19 07:31:41 PST 2025
jeanPerier wrote:
> > You could add a test like this using a `fir.box<cpmlx.complex<f128>>` type instead of the derived type. The resulting descriptor structure should contain the type code value.
>
> My question was more in the lines of where in the directory structure is more adequate. Although the fix is in flang-rt, this is technically lowering. Maybe `flang/test/Lower`?
Ah sorry, so you want to test SELECT TYPE lowering?
If so, I think you should make a small FIR test using fir.select_type with complex<f128> and check that you get the code you expect.
See https://github.com/llvm/llvm-project/blob/main/flang/test/Lower/select-type-2.fir as an example (except these kinds of test should live in flang/test/Fir).
You can generate your input from Fortran with bbc -emit-fir, but try to keep the input very small, focused on the testing the resulting code.
https://github.com/llvm/llvm-project/pull/168090
More information about the llvm-commits
mailing list