public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/93295] ICE in alias_ctad_tweaks
[not found] <bug-93295-4@http.gcc.gnu.org/bugzilla/>
@ 2020-05-21 0:17 ` arthur.j.odwyer at gmail dot com
2020-07-29 14:38 ` oficsu at gmail dot com
` (6 subsequent siblings)
7 siblings, 0 replies; 8+ messages in thread
From: arthur.j.odwyer at gmail dot com @ 2020-05-21 0:17 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93295
Arthur O'Dwyer <arthur.j.odwyer at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |arthur.j.odwyer at gmail dot com
--- Comment #6 from Arthur O'Dwyer <arthur.j.odwyer at gmail dot com> ---
Another test case from Peter O'Rourke on cpplang Slack:
https://godbolt.org/z/YEw4v9
template<int> struct A {};
template<int> A() -> A<1>;
template<int> using B = A<2>;
B bar;
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/93295] ICE in alias_ctad_tweaks
[not found] <bug-93295-4@http.gcc.gnu.org/bugzilla/>
2020-05-21 0:17 ` [Bug c++/93295] ICE in alias_ctad_tweaks arthur.j.odwyer at gmail dot com
@ 2020-07-29 14:38 ` oficsu at gmail dot com
2020-10-13 13:24 ` sfranzen85 at hotmail dot com
` (5 subsequent siblings)
7 siblings, 0 replies; 8+ messages in thread
From: oficsu at gmail dot com @ 2020-07-29 14:38 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93295
ofee oficsu <oficsu at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |oficsu at gmail dot com
--- Comment #7 from ofee oficsu <oficsu at gmail dot com> ---
I think there is another example of the same bug. This can be pretty common
code in C++20:
#include <tuple>
template<typename... T>
using p = std::pair<T...>;
auto x = p{int{}, int{}};
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/93295] ICE in alias_ctad_tweaks
[not found] <bug-93295-4@http.gcc.gnu.org/bugzilla/>
2020-05-21 0:17 ` [Bug c++/93295] ICE in alias_ctad_tweaks arthur.j.odwyer at gmail dot com
2020-07-29 14:38 ` oficsu at gmail dot com
@ 2020-10-13 13:24 ` sfranzen85 at hotmail dot com
2021-04-10 4:07 ` cvs-commit at gcc dot gnu.org
` (4 subsequent siblings)
7 siblings, 0 replies; 8+ messages in thread
From: sfranzen85 at hotmail dot com @ 2020-10-13 13:24 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93295
Steven Franzen <sfranzen85 at hotmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |sfranzen85 at hotmail dot com
--- Comment #8 from Steven Franzen <sfranzen85 at hotmail dot com> ---
Another example, with gcc trunk: https://godbolt.org/z/ovxr4a.
---
template<typename T, bool B = false>
struct Foo {
Foo(T) {}
};
template<typename T> Foo(T) -> Foo<T>;
template<typename T> using Bar = Foo<T, true>;
Bar b{0};
---
This error only seems to occur when using deduction guides that are different
from the implicitly generated set, e.g. as in this case omitting a parameter.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/93295] ICE in alias_ctad_tweaks
[not found] <bug-93295-4@http.gcc.gnu.org/bugzilla/>
` (2 preceding siblings ...)
2020-10-13 13:24 ` sfranzen85 at hotmail dot com
@ 2021-04-10 4:07 ` cvs-commit at gcc dot gnu.org
2021-04-10 4:13 ` jason at gcc dot gnu.org
` (3 subsequent siblings)
7 siblings, 0 replies; 8+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-04-10 4:07 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93295
--- Comment #9 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jason Merrill <jason@gcc.gnu.org>:
https://gcc.gnu.org/g:1a19d334ce493ec2ce2daeac74beef63fd67e2bc
commit r11-8104-g1a19d334ce493ec2ce2daeac74beef63fd67e2bc
Author: Jason Merrill <jason@redhat.com>
Date: Fri Apr 9 18:02:38 2021 -0400
c++: deduction guide using alias [PR99180]
alias_ctad_tweaks was expecting that all deduction guides for the class
would be suitable for deduction from the alias definition; in this case,
the
deduction guide uses 'true' and the alias B uses 'false', so deduction
fails. But that's OK, we just don't use that deduction guide. I also
noticed that we were giving up on deduction entirely if substitution failed
for some guide; we should only give up on that particular deduction guide.
We ought to give a better diagnostic about this case when deduction fails,
but that can wait.
gcc/cp/ChangeLog:
PR c++/99180
PR c++/93295
PR c++/93867
PR c++/99118
PR c++/96873
* pt.c (alias_ctad_tweaks): Handle failure better.
gcc/testsuite/ChangeLog:
PR c++/99180
PR c++/93295
PR c++/93867
PR c++/95486
* g++.dg/cpp2a/class-deduction-alias5.C: New test.
* g++.dg/cpp2a/class-deduction-alias6.C: New test.
* g++.dg/cpp2a/class-deduction-alias7.C: New test.
* g++.dg/cpp2a/class-deduction-alias8.C: New test.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/93295] ICE in alias_ctad_tweaks
[not found] <bug-93295-4@http.gcc.gnu.org/bugzilla/>
` (3 preceding siblings ...)
2021-04-10 4:07 ` cvs-commit at gcc dot gnu.org
@ 2021-04-10 4:13 ` jason at gcc dot gnu.org
2021-04-10 4:14 ` jason at gcc dot gnu.org
` (2 subsequent siblings)
7 siblings, 0 replies; 8+ messages in thread
From: jason at gcc dot gnu.org @ 2021-04-10 4:13 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93295
Jason Merrill <jason at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |wang_feng at live dot com
--- Comment #10 from Jason Merrill <jason at gcc dot gnu.org> ---
*** Bug 99118 has been marked as a duplicate of this bug. ***
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/93295] ICE in alias_ctad_tweaks
[not found] <bug-93295-4@http.gcc.gnu.org/bugzilla/>
` (4 preceding siblings ...)
2021-04-10 4:13 ` jason at gcc dot gnu.org
@ 2021-04-10 4:14 ` jason at gcc dot gnu.org
2021-04-10 4:17 ` jason at gcc dot gnu.org
2021-05-20 21:35 ` cvs-commit at gcc dot gnu.org
7 siblings, 0 replies; 8+ messages in thread
From: jason at gcc dot gnu.org @ 2021-04-10 4:14 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93295
Jason Merrill <jason at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |mateusz.pusz at gmail dot com
--- Comment #11 from Jason Merrill <jason at gcc dot gnu.org> ---
*** Bug 96873 has been marked as a duplicate of this bug. ***
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/93295] ICE in alias_ctad_tweaks
[not found] <bug-93295-4@http.gcc.gnu.org/bugzilla/>
` (5 preceding siblings ...)
2021-04-10 4:14 ` jason at gcc dot gnu.org
@ 2021-04-10 4:17 ` jason at gcc dot gnu.org
2021-05-20 21:35 ` cvs-commit at gcc dot gnu.org
7 siblings, 0 replies; 8+ messages in thread
From: jason at gcc dot gnu.org @ 2021-04-10 4:17 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93295
Jason Merrill <jason at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
CC| |jason at gcc dot gnu.org
Resolution|--- |DUPLICATE
--- Comment #12 from Jason Merrill <jason at gcc dot gnu.org> ---
Let's call this a duplicate of the one that already has the regression tag.
*** This bug has been marked as a duplicate of bug 99180 ***
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/93295] ICE in alias_ctad_tweaks
[not found] <bug-93295-4@http.gcc.gnu.org/bugzilla/>
` (6 preceding siblings ...)
2021-04-10 4:17 ` jason at gcc dot gnu.org
@ 2021-05-20 21:35 ` cvs-commit at gcc dot gnu.org
7 siblings, 0 replies; 8+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-05-20 21:35 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93295
--- Comment #13 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-10 branch has been updated by Jason Merrill
<jason@gcc.gnu.org>:
https://gcc.gnu.org/g:92e9b2a995f718f1c2ab1cd0840b439c24d3535f
commit r10-9852-g92e9b2a995f718f1c2ab1cd0840b439c24d3535f
Author: Jason Merrill <jason@redhat.com>
Date: Fri Apr 9 18:02:38 2021 -0400
c++: deduction guide using alias [PR99180]
alias_ctad_tweaks was expecting that all deduction guides for the class
would be suitable for deduction from the alias definition; in this case,
the
deduction guide uses 'true' and the alias B uses 'false', so deduction
fails. But that's OK, we just don't use that deduction guide. I also
noticed that we were giving up on deduction entirely if substitution failed
for some guide; we should only give up on that particular deduction guide.
We ought to give a better diagnostic about this case when deduction fails,
but that can wait.
gcc/cp/ChangeLog:
PR c++/99180
PR c++/93295
PR c++/93867
PR c++/99118
PR c++/96873
* pt.c (alias_ctad_tweaks): Handle failure better.
gcc/testsuite/ChangeLog:
PR c++/99180
PR c++/93295
PR c++/93867
PR c++/95486
* g++.dg/cpp2a/class-deduction-alias5.C: New test.
* g++.dg/cpp2a/class-deduction-alias6.C: New test.
* g++.dg/cpp2a/class-deduction-alias7.C: New test.
* g++.dg/cpp2a/class-deduction-alias8.C: New test.
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2021-05-20 21:35 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <bug-93295-4@http.gcc.gnu.org/bugzilla/>
2020-05-21 0:17 ` [Bug c++/93295] ICE in alias_ctad_tweaks arthur.j.odwyer at gmail dot com
2020-07-29 14:38 ` oficsu at gmail dot com
2020-10-13 13:24 ` sfranzen85 at hotmail dot com
2021-04-10 4:07 ` cvs-commit at gcc dot gnu.org
2021-04-10 4:13 ` jason at gcc dot gnu.org
2021-04-10 4:14 ` jason at gcc dot gnu.org
2021-04-10 4:17 ` jason at gcc dot gnu.org
2021-05-20 21:35 ` cvs-commit 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).