public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/110824] New: Gcc crashing on a lambda capture
@ 2023-07-26 19:58 denis.yaroshevskij at gmail dot com
2023-07-26 20:22 ` [Bug c++/110824] " pinskia at gcc dot gnu.org
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: denis.yaroshevskij at gmail dot com @ 2023-07-26 19:58 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110824
Bug ID: 110824
Summary: Gcc crashing on a lambda capture
Product: gcc
Version: 11.3.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: denis.yaroshevskij at gmail dot com
Target Milestone: ---
Created attachment 55646
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=55646&action=edit
ninja.log and .ii file
Attaching ninja log and a .ii file
Let me know if you need anyting else.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/110824] Gcc crashing on a lambda capture
2023-07-26 19:58 [Bug c++/110824] New: Gcc crashing on a lambda capture denis.yaroshevskij at gmail dot com
@ 2023-07-26 20:22 ` pinskia at gcc dot gnu.org
2023-07-27 9:03 ` denis.yaroshevskij at gmail dot com
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-07-26 20:22 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110824
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Reducing to see if it is reproducible on the trunk ...
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/110824] Gcc crashing on a lambda capture
2023-07-26 19:58 [Bug c++/110824] New: Gcc crashing on a lambda capture denis.yaroshevskij at gmail dot com
2023-07-26 20:22 ` [Bug c++/110824] " pinskia at gcc dot gnu.org
@ 2023-07-27 9:03 ` denis.yaroshevskij at gmail dot com
2023-07-27 10:28 ` pinskia at gcc dot gnu.org
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: denis.yaroshevskij at gmail dot com @ 2023-07-27 9:03 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110824
--- Comment #2 from Denis Yaroshevskiy <denis.yaroshevskij at gmail dot com> ---
FYI, this is my workaround:
```
template<typename Selector> struct just_shuffle_test_selector
{
Selector sel;
template<typename... Args>
auto operator()(Args... args) const
requires(std::invocable<Selector, Args...>)
{
auto r = sel(args...);
if constexpr( !eve::detail::matched_shuffle<decltype(r)> )
{
return kumi::tuple {r, eve::index<-1>};
}
else return kumi::tuple {r, eve::index<0>};
}
};
template<typename Selector>
just_shuffle_test_selector(Selector) -> just_shuffle_test_selector<Selector>;
template<typename WrappedShuffleV2> struct just_shuffle_test_
{
WrappedShuffleV2 sh2;
template<typename... Args>
auto operator()(Args... args) const
requires(std::invocable<WrappedShuffleV2, Args...>)
{
return get<0>(sh2(args...));
}
};
template<typename WrappedShuffleV2>
just_shuffle_test_(WrappedShuffleV2) -> just_shuffle_test_<WrappedShuffleV2>;
template<typename Selector>
constexpr auto
just_shuffle_test(Selector selector)
{
return
just_shuffle_test_{eve::detail::make_shuffle_v2(just_shuffle_test_selector{selector})};
}
```
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/110824] Gcc crashing on a lambda capture
2023-07-26 19:58 [Bug c++/110824] New: Gcc crashing on a lambda capture denis.yaroshevskij at gmail dot com
2023-07-26 20:22 ` [Bug c++/110824] " pinskia at gcc dot gnu.org
2023-07-27 9:03 ` denis.yaroshevskij at gmail dot com
@ 2023-07-27 10:28 ` pinskia at gcc dot gnu.org
2023-07-27 10:32 ` denis.yaroshevskij at gmail dot com
2023-07-27 21:33 ` pinskia at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-07-27 10:28 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110824
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution|--- |DUPLICATE
--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Reduced testcase:
```
namespace t {
struct tt {};
template <int a> int get(tt b) { return 1; }
}
void g() {
auto wrapped = [](int) { return t::tt{}; };
[&wrapped](auto t) -> decltype(get<0>(wrapped(t))) { return 1; }(1);
}
```
Which makes this a dup of bug 110524.
*** This bug has been marked as a duplicate of bug 110524 ***
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/110824] Gcc crashing on a lambda capture
2023-07-26 19:58 [Bug c++/110824] New: Gcc crashing on a lambda capture denis.yaroshevskij at gmail dot com
` (2 preceding siblings ...)
2023-07-27 10:28 ` pinskia at gcc dot gnu.org
@ 2023-07-27 10:32 ` denis.yaroshevskij at gmail dot com
2023-07-27 21:33 ` pinskia at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: denis.yaroshevskij at gmail dot com @ 2023-07-27 10:32 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110824
--- Comment #4 from Denis Yaroshevskiy <denis.yaroshevskij at gmail dot com> ---
Appreciate it.
I'm still going to support gcc11 for the forseable future. Is there some easy
way you see I can confirm that this is this issue?
So that I don't create more duplicates?
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/110824] Gcc crashing on a lambda capture
2023-07-26 19:58 [Bug c++/110824] New: Gcc crashing on a lambda capture denis.yaroshevskij at gmail dot com
` (3 preceding siblings ...)
2023-07-27 10:32 ` denis.yaroshevskij at gmail dot com
@ 2023-07-27 21:33 ` pinskia at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-07-27 21:33 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110824
--- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Denis Yaroshevskiy from comment #4)
> Appreciate it.
>
> I'm still going to support gcc11 for the forseable future. Is there some
> easy way you see I can confirm that this is this issue?
> So that I don't create more duplicates?
In this case, the pattern is simple is there a trailing return type and does it
use decltype with a template function and is that template function defined
(and in that scope or outer scope) then this will be a dup of that issue. (it
is only valid C++20 rather than being valid C++17 too).
Hope that helps.
Also note C++20 support in GCC is still being fixed in many areas too so using
GCC 11 which came out less than 4 months after C++20 was ratification and
published is definitely going to be an issue.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2023-07-27 21:33 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-26 19:58 [Bug c++/110824] New: Gcc crashing on a lambda capture denis.yaroshevskij at gmail dot com
2023-07-26 20:22 ` [Bug c++/110824] " pinskia at gcc dot gnu.org
2023-07-27 9:03 ` denis.yaroshevskij at gmail dot com
2023-07-27 10:28 ` pinskia at gcc dot gnu.org
2023-07-27 10:32 ` denis.yaroshevskij at gmail dot com
2023-07-27 21:33 ` pinskia at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).