SELECT TYPE lower and conversion was not handling
character type guard. This add support for it.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
flang/lib/Lower/Bridge.cpp | ||
---|---|---|
2295 | Shouldn't the length come from the selector fir.class instead of being unknow at runtime ? (fir::factory::CharacterExprHelper.readLengthFromBox might be able to do this). |
flang/lib/Lower/Bridge.cpp | ||
---|---|---|
2295 | We can use the BoxEleSizeOp but not fir::factory::CharacterExprHelper.readLengthFromBox since it requires a fir.char type. The support for intrinsic type is already in. |
flang/lib/Lower/Bridge.cpp | ||
---|---|---|
2295 |
Makes sense. Do not forget to divide by the character kind.
Sorry, my question was about intrinsic arrays, I forgot the important word.... It seems the code does not care about the shape at that point for intrinsic types. |
flang/lib/Lower/Bridge.cpp | ||
---|---|---|
2295 |
Right. Kind might not be retrievable since the the selector is always unlimited polymorphic for intrinsic type guards. So we might need to keep unknownLen unless there is another way to retrive the kind?
Oh ok. Yeah it might need some update for arrays. |
flang/lib/Lower/Bridge.cpp | ||
---|---|---|
2295 | You should be able to get the kind from the type guard of the TYPE_IS (attr.getType()) that should be a fir.char<kind, len> here right ? |
flang/lib/Lower/Bridge.cpp | ||
---|---|---|
2295 | Yeah my bad. I'm not thinking correctly today :) |
flang/lib/Lower/Bridge.cpp | ||
---|---|---|
2295 | I'll do array in a separate patch. |
Looks good
flang/lib/Lower/Bridge.cpp | ||
---|---|---|
2295 |
Sound good to me |
Shouldn't the length come from the selector fir.class instead of being unknow at runtime ? (fir::factory::CharacterExprHelper.readLengthFromBox might be able to do this).
This code also seems to only deal with scalars, SELECT TYPE support for intrinsic types is still TODO right ?