@@ -677,27 +677,18 @@ class FirConverter : public Fortran::lower::AbstractConverter {
677677 if (auto seqTy = symType.dyn_cast <fir::SequenceType>()) {
678678 fir::ExtendedValue read = fir::factory::genMutableBoxRead (
679679 *builder, loc, box, /* mayBePolymorphic=*/ false );
680- if (auto read_arr_box = read.getBoxOf <fir::ArrayBoxValue>()) {
681- fir::factory::genInlinedAllocation (
682- *builder, loc, *new_box, read_arr_box->getLBounds (),
683- read_arr_box->getExtents (),
684- /* lenParams=*/ std::nullopt , name,
685- /* mustBeHeap=*/ true );
686- } else if (auto read_char_arr_box =
687- read.getBoxOf <fir::CharArrayBoxValue>()) {
688- fir::factory::genInlinedAllocation (
689- *builder, loc, *new_box, read_char_arr_box->getLBounds (),
690- read_char_arr_box->getExtents (),
691- read_char_arr_box->getLen (), name,
692- /* mustBeHeap=*/ true );
693- } else {
694- TODO (loc, " Unhandled allocatable box type" );
695- }
680+ auto read_box = read.getBoxOf <fir::ArrayBoxValue>();
681+ fir::factory::genInlinedAllocation (
682+ *builder, loc, *new_box, read_box->getLBounds (),
683+ read_box->getExtents (),
684+ /* lenParams=*/ std::nullopt , name,
685+ /* mustBeHeap=*/ true );
696686 } else {
697687 fir::factory::genInlinedAllocation (
698- *builder, loc, *new_box, box.getMutableProperties ().lbounds ,
699- box.getMutableProperties ().extents ,
700- box.nonDeferredLenParams (), name,
688+ *builder, loc, *new_box,
689+ new_box->getMutableProperties ().lbounds ,
690+ new_box->getMutableProperties ().extents ,
691+ /* lenParams=*/ std::nullopt , name,
701692 /* mustBeHeap=*/ true );
702693 }
703694 });
0 commit comments