Skip to content

Commit 611074a

Browse files
committed
remove debug code
1 parent d13ef2b commit 611074a

File tree

2 files changed

+16
-5
lines changed

2 files changed

+16
-5
lines changed

flang/lib/Lower/Bridge.cpp

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1819,6 +1819,7 @@ class FirConverter : public Fortran::lower::AbstractConverter {
18191819
auto loc = toLocation();
18201820
std::visit(
18211821
Fortran::common::visitors{
1822+
// [1] Plain old assignment.
18221823
[&](const Fortran::evaluate::Assignment::Intrinsic &) {
18231824
const auto *sym = Fortran::evaluate::GetLastSymbol(assign.lhs);
18241825

@@ -1905,15 +1906,19 @@ class FirConverter : public Fortran::lower::AbstractConverter {
19051906
}
19061907
llvm_unreachable("unknown category");
19071908
},
1909+
1910+
// [2] User defined assignment. If the context is a scalar
1911+
// expression then call the procedure.
19081912
[&](const Fortran::evaluate::ProcedureRef &procRef) {
1909-
// User defined assignment: call the procedure.
19101913
if (explicitIterationSpace())
19111914
TODO(loc, "user defined assignment within FORALL");
19121915
Fortran::semantics::SomeExpr expr{procRef};
19131916
createFIRExpr(toLocation(), &expr, stmtCtx);
19141917
},
1918+
1919+
// [3] Pointer assignment with possibly empty bounds-spec. R1035: a
1920+
// bounds-spec is a lower bound value.
19151921
[&](const Fortran::evaluate::Assignment::BoundsSpec &lbExprs) {
1916-
// Pointer assignment with possibly empty bounds-spec
19171922
auto lhsType = assign.lhs.GetType();
19181923
auto rhsType = assign.rhs.GetType();
19191924
// Polymorphic lhs/rhs may need more care. See F2018 10.2.2.3.
@@ -1931,9 +1936,11 @@ class FirConverter : public Fortran::lower::AbstractConverter {
19311936
Fortran::lower::associateMutableBox(*this, loc, lhs, assign.rhs,
19321937
lbounds, stmtCtx);
19331938
},
1939+
1940+
// [4] Pointer assignment with bounds-remapping. R1036: a
1941+
// bounds-remapping is a pair, lower bound and upper bound.
19341942
[&](const Fortran::evaluate::Assignment::BoundsRemapping
19351943
&boundExprs) {
1936-
// Pointer assignment with bounds-remapping
19371944
if (explicitIterationSpace())
19381945
TODO(loc, "pointer assignment within FORALL");
19391946
auto lhs = genExprMutableBox(loc, assign.lhs);
@@ -1961,10 +1968,16 @@ class FirConverter : public Fortran::lower::AbstractConverter {
19611968
? Fortran::lower::createSomeArrayBox(
19621969
*this, assign.rhs, localSymbols, stmtCtx)
19631970
: genExprAddr(assign.rhs, stmtCtx);
1971+
<<<<<<< Updated upstream
19641972
fir::factory::associateMutableBoxWithRemap(*builder, loc, lhs,
19651973
rhs, lbounds, ubounds);
19661974
},
19671975
},
1976+
=======
1977+
Fortran::lower::associateMutableBoxWithRemap(
1978+
*builder, loc, lhs, rhs, lbounds, ubounds);
1979+
}},
1980+
>>>>>>> Stashed changes
19681981
assign.u);
19691982
}
19701983

flang/lib/Lower/ConvertExpr.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4635,8 +4635,6 @@ class ArrayExprLowering {
46354635
}
46364636
}
46374637
auto one = builder.createIntegerConstant(loc, idxTy, 1);
4638-
llvm::errs() << "DBG: " << isScalar << ' ' << implicitArguments << ' '
4639-
<< x.GetFirstSymbol() << '\n';
46404638
auto pc = [=](IterSpace iters) {
46414639
IterationSpace newIters = iters;
46424640
if (isScalar) {

0 commit comments

Comments
 (0)