Skip to content

Commit 4005808

Browse files
authored
Merge pull request #1034 from schweitzpgi/ch-p8a
Fix for overly assertive assertion.
2 parents 66328d5 + 9c2688f commit 4005808

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

flang/lib/Lower/IterationSpace.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,10 @@ void Fortran::lower::ExplicitIterSpace::bindLoad(
244244
[&](const auto *p) {
245245
using T = std::remove_cv_t<std::remove_pointer_t<decltype(p)>>;
246246
void *vp = static_cast<void *>(const_cast<T *>(p));
247-
assert(!loadBindings.count(vp) && "duplicate key");
247+
if constexpr (!std::is_same_v<T, Fortran::semantics::Symbol>) {
248+
// Se::Symbol* are inalienably shared; never assert on them.
249+
assert(!loadBindings.count(vp) && "duplicate key");
250+
}
248251
loadBindings.try_emplace(vp, load);
249252
},
250253
base);

0 commit comments

Comments
 (0)