-
Notifications
You must be signed in to change notification settings - Fork 12.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
clang crash #53983
Comments
@llvm/issue-subscribers-c-20 |
Much reduced test case: struct typeBase
{
constexpr typeBase() : Lvalue() {}
int Lvalue;
};
struct type : private typeBase
{
bool value;
type(bool v = 0) { value = v; }
consteval type(int i) { value = i; }
const bool operator*() const { return value; }
};
auto operator > (const type&a, const type&b) { return *a > *b; }
int main() {
type T;
if (T > type(100)) { }
} And the assertion that fails is:
Removing the |
I think this may be related to or a duplicate of #51764. |
@llvm/issue-subscribers-clang-codegen |
The reduced test case no longer crashes on trunk, but the original test case does still crash when emitting codegen. |
Reduce struct Base {
constexpr Base() : a(), b() {}
char a : 1;
char b;
};
struct Foo : private Base {
constexpr Foo(bool b) {
if (b) throw "test";
}
};
struct Bar : private Base {
consteval Bar(bool) {}
};
struct MyStruct {
Foo foo = true;
Bar bar = false;
};
MyStruct structTest; https://godbolt.org/z/rxdP6YqMe Does not crash if any of the following is true:
|
This no longer crashes on trunk. |
Crashing in clang-trunk https://godbolt.org/z/EndP9c7qE
The text was updated successfully, but these errors were encountered: