Skip to content
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

front end crash when using variadic concepts requirement with "or" statement (trunk/11) #48000

Closed
rgreenblatt mannequin opened this issue Jan 4, 2021 · 10 comments
Closed
Assignees
Labels
bugzilla Issues migrated from bugzilla c++20

Comments

@rgreenblatt
Copy link
Mannequin

rgreenblatt mannequin commented Jan 4, 2021

Bugzilla Link 48656
Resolution FIXED
Resolved on Oct 11, 2021 20:29
Version trunk
OS Linux
Blocks #51489
Attachments crashes
CC @mizvekov,@zygoloid,@tstellar
Fixed by commit(s) e64e692 b9be17a

Extended Description

This crash occurs on trunk and on 11 with clang++ -std=c++20 FILENAME.
I think I have a pretty minimal reproduction.

template <unsigned> struct A { static constexpr bool a = true; };

template <typename T>
concept BoolOrRequirement = requires {
  requires requires {
    // any requirement (outside of a few trivial ones)
    T::b;
  } || T::a;
};

template <BoolOrRequirement...>
struct B {};

int main() {
  // need at least 2 elements for crash, more elements seems to increase
  // consistancy of crash
  B<A<0>, A<1>, A<2>, A<3>, A<4>> value;
}

Here is a godbolt link: https://godbolt.org/z/vz7Wss.
I have also attached the source file.

@rgreenblatt
Copy link
Mannequin Author

rgreenblatt mannequin commented Jan 4, 2021

assigned to @mizvekov

@mizvekov
Copy link
Contributor

mizvekov commented Aug 3, 2021

*** Bug llvm/llvm-bugzilla-archive#48780 has been marked as a duplicate of this bug. ***

@mizvekov
Copy link
Contributor

mizvekov commented Aug 3, 2021

Fixed in main by e64e692

@tstellar
Copy link
Collaborator

tstellar commented Aug 6, 2021

The fix does not apply cleanly, could someone backport this and push a branch to their local github fork?

@mizvekov
Copy link
Contributor

mizvekov commented Aug 6, 2021

It should apply cleanly after 219790c which is the other one from me.

@mizvekov
Copy link
Contributor

To make this clear, if you apply the commit from #46518 first, this one should go cleanly.

Otherwise if you want independent commits, I could rebase it.
The second one depends on the first just because of a small change to the tests added on the first one, but this was really a minor screw up on my part having added the change on the wrong patch in the original commit...

@tstellar
Copy link
Collaborator

Merged:

@tstellar
Copy link
Collaborator

Merged: b9be17a

@mizvekov
Copy link
Contributor

mentioned in issue llvm/llvm-bugzilla-archive#48780

@tstellar
Copy link
Collaborator

mentioned in issue #51489

@llvmbot llvmbot transferred this issue from llvm/llvm-bugzilla-archive Dec 11, 2021
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugzilla Issues migrated from bugzilla c++20
Projects
None yet
Development

No branches or pull requests

2 participants