public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/102123] New: Internal Compiler Error occurs during template deduction in use with templates as template parameters
@ 2021-08-30 3:00 friedkeenan at protonmail dot com
2021-08-30 3:06 ` [Bug c++/102123] " pinskia at gcc dot gnu.org
` (7 more replies)
0 siblings, 8 replies; 9+ messages in thread
From: friedkeenan at protonmail dot com @ 2021-08-30 3:00 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102123
Bug ID: 102123
Summary: Internal Compiler Error occurs during template
deduction in use with templates as template parameters
Product: gcc
Version: 12.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: friedkeenan at protonmail dot com
Target Milestone: ---
Minimal example: https://godbolt.org/z/P86MY1ccz
Compiles fine with clang. Compiles with gcc if you specify `Test<int>`, though
the deduction guide should make them equivalent. Possibly related to Bug 93425
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/102123] Internal Compiler Error occurs during template deduction in use with templates as template parameters
2021-08-30 3:00 [Bug c++/102123] New: Internal Compiler Error occurs during template deduction in use with templates as template parameters friedkeenan at protonmail dot com
@ 2021-08-30 3:06 ` pinskia at gcc dot gnu.org
2021-08-30 21:30 ` pinskia at gcc dot gnu.org
` (6 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-08-30 3:06 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102123
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
template<template<typename...> typename Template, typename... Args>
struct _dummy_forwarder {
using type = Template<Args...>;
};
template<template<typename...> typename Template, typename... Args>
using dummy_forwarder = typename _dummy_forwarder<Template, Args...>::type;
template<typename T>
struct Test {
template<typename U> using _dummy = U;
using Element = dummy_forwarder<_dummy, T>;
Element _elem;
constexpr Test(const Element elem) : _elem(elem) { }
};
template<typename T>
Test(T) -> Test<T>;
consteval void test() {
const auto t = Test(1);
}
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/102123] Internal Compiler Error occurs during template deduction in use with templates as template parameters
2021-08-30 3:00 [Bug c++/102123] New: Internal Compiler Error occurs during template deduction in use with templates as template parameters friedkeenan at protonmail dot com
2021-08-30 3:06 ` [Bug c++/102123] " pinskia at gcc dot gnu.org
@ 2021-08-30 21:30 ` pinskia at gcc dot gnu.org
2022-02-01 17:01 ` [Bug c++/102123] [11/12 Regression] " ppalka at gcc dot gnu.org
` (5 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-08-30 21:30 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102123
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed| |2021-08-30
Status|UNCONFIRMED |NEW
Ever confirmed|0 |1
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Confirmed.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/102123] [11/12 Regression] Internal Compiler Error occurs during template deduction in use with templates as template parameters
2021-08-30 3:00 [Bug c++/102123] New: Internal Compiler Error occurs during template deduction in use with templates as template parameters friedkeenan at protonmail dot com
2021-08-30 3:06 ` [Bug c++/102123] " pinskia at gcc dot gnu.org
2021-08-30 21:30 ` pinskia at gcc dot gnu.org
@ 2022-02-01 17:01 ` ppalka at gcc dot gnu.org
2022-03-23 8:40 ` rguenth at gcc dot gnu.org
` (4 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: ppalka at gcc dot gnu.org @ 2022-02-01 17:01 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102123
Patrick Palka <ppalka at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |11.3
See Also| |https://gcc.gnu.org/bugzill
| |a/show_bug.cgi?id=103968
Known to fail| |11.2.0, 12.0
CC| |jason at gcc dot gnu.org,
| |ppalka at gcc dot gnu.org
Known to work| |10.3.0
Summary|Internal Compiler Error |[11/12 Regression] Internal
|occurs during template |Compiler Error occurs
|deduction in use with |during template deduction
|templates as template |in use with templates as
|parameters |template parameters
--- Comment #3 from Patrick Palka <ppalka at gcc dot gnu.org> ---
Started with r11-2748.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/102123] [11/12 Regression] Internal Compiler Error occurs during template deduction in use with templates as template parameters
2021-08-30 3:00 [Bug c++/102123] New: Internal Compiler Error occurs during template deduction in use with templates as template parameters friedkeenan at protonmail dot com
` (2 preceding siblings ...)
2022-02-01 17:01 ` [Bug c++/102123] [11/12 Regression] " ppalka at gcc dot gnu.org
@ 2022-03-23 8:40 ` rguenth at gcc dot gnu.org
2022-03-27 3:40 ` jason at gcc dot gnu.org
` (3 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-03-23 8:40 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102123
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P2
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/102123] [11/12 Regression] Internal Compiler Error occurs during template deduction in use with templates as template parameters
2021-08-30 3:00 [Bug c++/102123] New: Internal Compiler Error occurs during template deduction in use with templates as template parameters friedkeenan at protonmail dot com
` (3 preceding siblings ...)
2022-03-23 8:40 ` rguenth at gcc dot gnu.org
@ 2022-03-27 3:40 ` jason at gcc dot gnu.org
2022-03-28 13:37 ` cvs-commit at gcc dot gnu.org
` (2 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: jason at gcc dot gnu.org @ 2022-03-27 3:40 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102123
Jason Merrill <jason at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
Assignee|unassigned at gcc dot gnu.org |jason at gcc dot gnu.org
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/102123] [11/12 Regression] Internal Compiler Error occurs during template deduction in use with templates as template parameters
2021-08-30 3:00 [Bug c++/102123] New: Internal Compiler Error occurs during template deduction in use with templates as template parameters friedkeenan at protonmail dot com
` (4 preceding siblings ...)
2022-03-27 3:40 ` jason at gcc dot gnu.org
@ 2022-03-28 13:37 ` cvs-commit at gcc dot gnu.org
2022-03-28 19:12 ` [Bug c++/102123] [11 " cvs-commit at gcc dot gnu.org
2022-03-28 19:19 ` jason at gcc dot gnu.org
7 siblings, 0 replies; 9+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-03-28 13:37 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102123
--- Comment #4 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:b854ce130ebbfdf2f882ef08538746030513b44b
commit r12-7853-gb854ce130ebbfdf2f882ef08538746030513b44b
Author: Jason Merrill <jason@redhat.com>
Date: Sat Mar 26 23:54:22 2022 -0400
c++: CTAD and member alias template [PR102123]
When building a deduction guide from the Test constructor, we need to
rewrite the use of _dummy into a dependent reference, i.e.
Test<T>::template
_dummy. We were using SCOPE_REF for both type and non-type templates; we
need to use UNBOUND_CLASS_TEMPLATE for type templates.
PR c++/102123
gcc/cp/ChangeLog:
* pt.cc (tsubst_copy): Use make_unbound_class_template for
rewriting
a type template reference.
gcc/testsuite/ChangeLog:
* g++.dg/cpp1z/class-deduction110.C: New test.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/102123] [11 Regression] Internal Compiler Error occurs during template deduction in use with templates as template parameters
2021-08-30 3:00 [Bug c++/102123] New: Internal Compiler Error occurs during template deduction in use with templates as template parameters friedkeenan at protonmail dot com
` (5 preceding siblings ...)
2022-03-28 13:37 ` cvs-commit at gcc dot gnu.org
@ 2022-03-28 19:12 ` cvs-commit at gcc dot gnu.org
2022-03-28 19:19 ` jason at gcc dot gnu.org
7 siblings, 0 replies; 9+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-03-28 19:12 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102123
--- Comment #5 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-11 branch has been updated by Jason Merrill
<jason@gcc.gnu.org>:
https://gcc.gnu.org/g:e952290874d6b99946dc02e125c0fb0e9b13a1e3
commit r11-9703-ge952290874d6b99946dc02e125c0fb0e9b13a1e3
Author: Jason Merrill <jason@redhat.com>
Date: Sat Mar 26 23:54:22 2022 -0400
c++: CTAD and member alias template [PR102123]
When building a deduction guide from the Test constructor, we need to
rewrite the use of _dummy into a dependent reference, i.e.
Test<T>::template
_dummy. We were using SCOPE_REF for both type and non-type templates; we
need to use UNBOUND_CLASS_TEMPLATE for type templates.
PR c++/102123
gcc/cp/ChangeLog:
* pt.c (tsubst_copy): Use make_unbound_class_template for rewriting
a type template reference.
gcc/testsuite/ChangeLog:
* g++.dg/cpp1z/class-deduction110.C: New test.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/102123] [11 Regression] Internal Compiler Error occurs during template deduction in use with templates as template parameters
2021-08-30 3:00 [Bug c++/102123] New: Internal Compiler Error occurs during template deduction in use with templates as template parameters friedkeenan at protonmail dot com
` (6 preceding siblings ...)
2022-03-28 19:12 ` [Bug c++/102123] [11 " cvs-commit at gcc dot gnu.org
@ 2022-03-28 19:19 ` jason at gcc dot gnu.org
7 siblings, 0 replies; 9+ messages in thread
From: jason at gcc dot gnu.org @ 2022-03-28 19:19 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102123
Jason Merrill <jason at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|ASSIGNED |RESOLVED
--- Comment #6 from Jason Merrill <jason at gcc dot gnu.org> ---
Fixed.
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2022-03-28 19:19 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-30 3:00 [Bug c++/102123] New: Internal Compiler Error occurs during template deduction in use with templates as template parameters friedkeenan at protonmail dot com
2021-08-30 3:06 ` [Bug c++/102123] " pinskia at gcc dot gnu.org
2021-08-30 21:30 ` pinskia at gcc dot gnu.org
2022-02-01 17:01 ` [Bug c++/102123] [11/12 Regression] " ppalka at gcc dot gnu.org
2022-03-23 8:40 ` rguenth at gcc dot gnu.org
2022-03-27 3:40 ` jason at gcc dot gnu.org
2022-03-28 13:37 ` cvs-commit at gcc dot gnu.org
2022-03-28 19:12 ` [Bug c++/102123] [11 " cvs-commit at gcc dot gnu.org
2022-03-28 19:19 ` jason 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).