public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/95317] New: [7 regression] ICE on valid C++14 code, in tsubst_copy, at cp/pt.c:15649
@ 2020-05-25 16:21 fxcoudert at gcc dot gnu.org
2020-05-26 7:18 ` [Bug c++/95317] [8/9/10/11 Regression] " rguenth at gcc dot gnu.org
` (12 more replies)
0 siblings, 13 replies; 14+ messages in thread
From: fxcoudert at gcc dot gnu.org @ 2020-05-25 16:21 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95317
Bug ID: 95317
Summary: [7 regression] ICE on valid C++14 code, in
tsubst_copy, at cp/pt.c:15649
Product: gcc
Version: 9.3.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: fxcoudert at gcc dot gnu.org
Target Milestone: ---
ICE on valid C++14 code:
$ cat b.C
#include <iostream>
template <int I>
struct num
{
enum { value = I };
};
#define VALUEOFNUM(x) std::remove_reference_t<decltype(x)>::value
template <typename TYPE>
void foo()
{
auto test = [&](auto i)
{
enum { VALUE = VALUEOFNUM(i) };
std::cout << VALUE;
};
test(num<0>());
test(num<1>());
}
int main()
{
foo<void>();
}
$ g++-9 b.C
b.C: In instantiation of 'void foo() [with TYPE = void]':
b.C:27:15: required from here
b.C:18:22: internal compiler error: in tsubst_copy, at cp/pt.c:15649
18 | std::cout << VALUE;
| ^~~~~
libbacktrace could not find executable to open
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://github.com/Homebrew/homebrew-core/issues> for instructions.
Works fine with GCC up to version 6, but regresses at 7 and later.
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug c++/95317] [8/9/10/11 Regression] ICE on valid C++14 code, in tsubst_copy, at cp/pt.c:15649
2020-05-25 16:21 [Bug c++/95317] New: [7 regression] ICE on valid C++14 code, in tsubst_copy, at cp/pt.c:15649 fxcoudert at gcc dot gnu.org
@ 2020-05-26 7:18 ` rguenth at gcc dot gnu.org
2020-05-26 7:26 ` marxin at gcc dot gnu.org
` (11 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: rguenth at gcc dot gnu.org @ 2020-05-26 7:18 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95317
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |ice-on-valid-code
Target Milestone|--- |8.5
Known to work| |6.5.0
Summary|[7 regression] ICE on valid |[8/9/10/11 Regression] ICE
|C++14 code, in tsubst_copy, |on valid C++14 code, in
|at cp/pt.c:15649 |tsubst_copy, at
| |cp/pt.c:15649
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug c++/95317] [8/9/10/11 Regression] ICE on valid C++14 code, in tsubst_copy, at cp/pt.c:15649
2020-05-25 16:21 [Bug c++/95317] New: [7 regression] ICE on valid C++14 code, in tsubst_copy, at cp/pt.c:15649 fxcoudert at gcc dot gnu.org
2020-05-26 7:18 ` [Bug c++/95317] [8/9/10/11 Regression] " rguenth at gcc dot gnu.org
@ 2020-05-26 7:26 ` marxin at gcc dot gnu.org
2020-05-26 7:43 ` marxin at gcc dot gnu.org
` (10 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: marxin at gcc dot gnu.org @ 2020-05-26 7:26 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95317
Martin Liška <marxin at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jason at gcc dot gnu.org,
| |marxin at gcc dot gnu.org
Status|UNCONFIRMED |NEW
Last reconfirmed| |2020-05-26
Ever confirmed|0 |1
--- Comment #1 from Martin Liška <marxin at gcc dot gnu.org> ---
Confirmed, started with r8-2720-gf44a8dd56f5bfbd0.
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug c++/95317] [8/9/10/11 Regression] ICE on valid C++14 code, in tsubst_copy, at cp/pt.c:15649
2020-05-25 16:21 [Bug c++/95317] New: [7 regression] ICE on valid C++14 code, in tsubst_copy, at cp/pt.c:15649 fxcoudert at gcc dot gnu.org
2020-05-26 7:18 ` [Bug c++/95317] [8/9/10/11 Regression] " rguenth at gcc dot gnu.org
2020-05-26 7:26 ` marxin at gcc dot gnu.org
@ 2020-05-26 7:43 ` marxin at gcc dot gnu.org
2021-01-14 8:53 ` rguenth at gcc dot gnu.org
` (9 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: marxin at gcc dot gnu.org @ 2020-05-26 7:43 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95317
--- Comment #2 from Martin Liška <marxin at gcc dot gnu.org> ---
Reduced test-case:
cat pr95317.ii
template <typename> void fn1() {
[](auto) {
enum { VALUE };
VALUE;
};
}
main() { fn1<void>; }
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug c++/95317] [8/9/10/11 Regression] ICE on valid C++14 code, in tsubst_copy, at cp/pt.c:15649
2020-05-25 16:21 [Bug c++/95317] New: [7 regression] ICE on valid C++14 code, in tsubst_copy, at cp/pt.c:15649 fxcoudert at gcc dot gnu.org
` (2 preceding siblings ...)
2020-05-26 7:43 ` marxin at gcc dot gnu.org
@ 2021-01-14 8:53 ` rguenth at gcc dot gnu.org
2021-04-05 19:39 ` cvs-commit at gcc dot gnu.org
` (8 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-01-14 8:53 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95317
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P2
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug c++/95317] [8/9/10/11 Regression] ICE on valid C++14 code, in tsubst_copy, at cp/pt.c:15649
2020-05-25 16:21 [Bug c++/95317] New: [7 regression] ICE on valid C++14 code, in tsubst_copy, at cp/pt.c:15649 fxcoudert at gcc dot gnu.org
` (3 preceding siblings ...)
2021-01-14 8:53 ` rguenth at gcc dot gnu.org
@ 2021-04-05 19:39 ` cvs-commit at gcc dot gnu.org
2021-04-05 19:40 ` [Bug c++/95317] [8/9/10 " jason at gcc dot gnu.org
` (7 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-04-05 19:39 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95317
--- Comment #3 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:9f4c41147a41d08a74990eafe69a1064a3c13435
commit r11-7993-g9f4c41147a41d08a74990eafe69a1064a3c13435
Author: Jason Merrill <jason@redhat.com>
Date: Mon Apr 5 14:26:03 2021 -0400
c++: enum in generic lambda in template [PR95317]
Here we weren't instantiating the enumerators because the arglist still had
the template parameter for the generic lambda, so looking one up failed.
We
need to instantiate if the non-lambda enclosing scope is non-dependent.
gcc/cp/ChangeLog:
PR c++/95317
* pt.c (lookup_template_class_1): Do tsubst_enum when
tsubsting a generic lambda.
gcc/testsuite/ChangeLog:
PR c++/95317
* g++.dg/cpp1y/lambda-generic-enum1.C: New test.
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug c++/95317] [8/9/10 Regression] ICE on valid C++14 code, in tsubst_copy, at cp/pt.c:15649
2020-05-25 16:21 [Bug c++/95317] New: [7 regression] ICE on valid C++14 code, in tsubst_copy, at cp/pt.c:15649 fxcoudert at gcc dot gnu.org
` (4 preceding siblings ...)
2021-04-05 19:39 ` cvs-commit at gcc dot gnu.org
@ 2021-04-05 19:40 ` jason at gcc dot gnu.org
2021-04-26 16:29 ` mpolacek at gcc dot gnu.org
` (6 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: jason at gcc dot gnu.org @ 2021-04-05 19:40 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95317
Jason Merrill <jason at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Known to work| |11.0
Summary|[8/9/10/11 Regression] ICE |[8/9/10 Regression] ICE on
|on valid C++14 code, in |valid C++14 code, in
|tsubst_copy, at |tsubst_copy, at
|cp/pt.c:15649 |cp/pt.c:15649
Status|NEW |ASSIGNED
Assignee|unassigned at gcc dot gnu.org |jason at gcc dot gnu.org
--- Comment #4 from Jason Merrill <jason at gcc dot gnu.org> ---
Fixed for 11 so far.
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug c++/95317] [8/9/10 Regression] ICE on valid C++14 code, in tsubst_copy, at cp/pt.c:15649
2020-05-25 16:21 [Bug c++/95317] New: [7 regression] ICE on valid C++14 code, in tsubst_copy, at cp/pt.c:15649 fxcoudert at gcc dot gnu.org
` (5 preceding siblings ...)
2021-04-05 19:40 ` [Bug c++/95317] [8/9/10 " jason at gcc dot gnu.org
@ 2021-04-26 16:29 ` mpolacek at gcc dot gnu.org
2021-05-14 9:53 ` [Bug c++/95317] [9/10 " jakub at gcc dot gnu.org
` (5 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2021-04-26 16:29 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95317
Marek Polacek <mpolacek at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |zchendd at connect dot ust.hk
--- Comment #5 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
*** Bug 100271 has been marked as a duplicate of this bug. ***
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug c++/95317] [9/10 Regression] ICE on valid C++14 code, in tsubst_copy, at cp/pt.c:15649
2020-05-25 16:21 [Bug c++/95317] New: [7 regression] ICE on valid C++14 code, in tsubst_copy, at cp/pt.c:15649 fxcoudert at gcc dot gnu.org
` (6 preceding siblings ...)
2021-04-26 16:29 ` mpolacek at gcc dot gnu.org
@ 2021-05-14 9:53 ` jakub at gcc dot gnu.org
2021-06-01 8:17 ` rguenth at gcc dot gnu.org
` (4 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: jakub at gcc dot gnu.org @ 2021-05-14 9:53 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95317
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|8.5 |9.4
--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
GCC 8 branch is being closed.
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug c++/95317] [9/10 Regression] ICE on valid C++14 code, in tsubst_copy, at cp/pt.c:15649
2020-05-25 16:21 [Bug c++/95317] New: [7 regression] ICE on valid C++14 code, in tsubst_copy, at cp/pt.c:15649 fxcoudert at gcc dot gnu.org
` (7 preceding siblings ...)
2021-05-14 9:53 ` [Bug c++/95317] [9/10 " jakub at gcc dot gnu.org
@ 2021-06-01 8:17 ` rguenth at gcc dot gnu.org
2021-10-01 10:35 ` pinskia at gcc dot gnu.org
` (3 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-06-01 8:17 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95317
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|9.4 |9.5
--- Comment #7 from Richard Biener <rguenth at gcc dot gnu.org> ---
GCC 9.4 is being released, retargeting bugs to GCC 9.5.
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug c++/95317] [9/10 Regression] ICE on valid C++14 code, in tsubst_copy, at cp/pt.c:15649
2020-05-25 16:21 [Bug c++/95317] New: [7 regression] ICE on valid C++14 code, in tsubst_copy, at cp/pt.c:15649 fxcoudert at gcc dot gnu.org
` (8 preceding siblings ...)
2021-06-01 8:17 ` rguenth at gcc dot gnu.org
@ 2021-10-01 10:35 ` pinskia at gcc dot gnu.org
2022-05-27 9:42 ` [Bug c++/95317] [10 " rguenth at gcc dot gnu.org
` (2 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-10-01 10:35 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95317
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |tim at ngus dot net
--- Comment #8 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
*** Bug 101343 has been marked as a duplicate of this bug. ***
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug c++/95317] [10 Regression] ICE on valid C++14 code, in tsubst_copy, at cp/pt.c:15649
2020-05-25 16:21 [Bug c++/95317] New: [7 regression] ICE on valid C++14 code, in tsubst_copy, at cp/pt.c:15649 fxcoudert at gcc dot gnu.org
` (9 preceding siblings ...)
2021-10-01 10:35 ` pinskia at gcc dot gnu.org
@ 2022-05-27 9:42 ` rguenth at gcc dot gnu.org
2022-06-28 10:40 ` jakub at gcc dot gnu.org
2023-07-07 8:53 ` rguenth at gcc dot gnu.org
12 siblings, 0 replies; 14+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-05-27 9:42 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95317
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|9.5 |10.4
--- Comment #9 from Richard Biener <rguenth at gcc dot gnu.org> ---
GCC 9 branch is being closed
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug c++/95317] [10 Regression] ICE on valid C++14 code, in tsubst_copy, at cp/pt.c:15649
2020-05-25 16:21 [Bug c++/95317] New: [7 regression] ICE on valid C++14 code, in tsubst_copy, at cp/pt.c:15649 fxcoudert at gcc dot gnu.org
` (10 preceding siblings ...)
2022-05-27 9:42 ` [Bug c++/95317] [10 " rguenth at gcc dot gnu.org
@ 2022-06-28 10:40 ` jakub at gcc dot gnu.org
2023-07-07 8:53 ` rguenth at gcc dot gnu.org
12 siblings, 0 replies; 14+ messages in thread
From: jakub at gcc dot gnu.org @ 2022-06-28 10:40 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95317
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|10.4 |10.5
--- Comment #10 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
GCC 10.4 is being released, retargeting bugs to GCC 10.5.
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug c++/95317] [10 Regression] ICE on valid C++14 code, in tsubst_copy, at cp/pt.c:15649
2020-05-25 16:21 [Bug c++/95317] New: [7 regression] ICE on valid C++14 code, in tsubst_copy, at cp/pt.c:15649 fxcoudert at gcc dot gnu.org
` (11 preceding siblings ...)
2022-06-28 10:40 ` jakub at gcc dot gnu.org
@ 2023-07-07 8:53 ` rguenth at gcc dot gnu.org
12 siblings, 0 replies; 14+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-07-07 8:53 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95317
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|10.5 |11.0
Resolution|--- |FIXED
Status|ASSIGNED |RESOLVED
Known to fail| |10.5.0
--- Comment #11 from Richard Biener <rguenth at gcc dot gnu.org> ---
Fixed for GCC 11.
^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2023-07-07 8:53 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-25 16:21 [Bug c++/95317] New: [7 regression] ICE on valid C++14 code, in tsubst_copy, at cp/pt.c:15649 fxcoudert at gcc dot gnu.org
2020-05-26 7:18 ` [Bug c++/95317] [8/9/10/11 Regression] " rguenth at gcc dot gnu.org
2020-05-26 7:26 ` marxin at gcc dot gnu.org
2020-05-26 7:43 ` marxin at gcc dot gnu.org
2021-01-14 8:53 ` rguenth at gcc dot gnu.org
2021-04-05 19:39 ` cvs-commit at gcc dot gnu.org
2021-04-05 19:40 ` [Bug c++/95317] [8/9/10 " jason at gcc dot gnu.org
2021-04-26 16:29 ` mpolacek at gcc dot gnu.org
2021-05-14 9:53 ` [Bug c++/95317] [9/10 " jakub at gcc dot gnu.org
2021-06-01 8:17 ` rguenth at gcc dot gnu.org
2021-10-01 10:35 ` pinskia at gcc dot gnu.org
2022-05-27 9:42 ` [Bug c++/95317] [10 " rguenth at gcc dot gnu.org
2022-06-28 10:40 ` jakub at gcc dot gnu.org
2023-07-07 8:53 ` rguenth 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).