Open
Description
All information necessary to reproduce the problem.
It is reproducible in
- version: clang 18 and above
- architecture: x86_64, armv8-a, arv7-a
- optimization flag : O1 and above
- standard : c++11 and above
The reduced test-case that triggers the bug.
#include <iostream>
#include <unordered_set>
int main() {
std::unordered_set<int> isPresent;
isPresent.insert(0);
// std::cout << "before loop, size of isPresent: " << isPresent.size() << std::endl;
while (!isPresent.empty()) {
// std::cout << "infinite loop " << std::endl;
};
// std::cout << "after loop " << std::endl;
return 0;
}
The location where you obtained LLVM (if not from our Git repository).
- it is from compiler explorer.