Skip to content

Commit ba116ff

Browse files
Revert "[Flang][OpenMP] Fix to support privatisation of alloc strings (#71204)"
This reverts commit 192bee0. Reverting to fix the CI. https://lab.llvm.org/buildbot/#/builders/21/builds/84995
1 parent 192bee0 commit ba116ff

File tree

2 files changed

+10
-80
lines changed

2 files changed

+10
-80
lines changed

flang/lib/Lower/Bridge.cpp

Lines changed: 10 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -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
});

flang/test/Lower/OpenMP/parallel-private-clause-str.f90

Lines changed: 0 additions & 61 deletions
This file was deleted.

0 commit comments

Comments
 (0)