* [Bug c++/97899] internal compiler error: in split_nonconstant_init_1, at cp/typeck2.c:626
2020-11-18 23:51 [Bug c++/97899] New: internal compiler error: in split_nonconstant_init_1, at cp/typeck2.c:626 florin.iucha at amd dot com
@ 2020-11-18 23:53 ` florin.iucha at amd dot com
2020-11-19 0:12 ` [Bug c++/97899] [11 Regression] " mpolacek at gcc dot gnu.org
` (12 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: florin.iucha at amd dot com @ 2020-11-18 23:53 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97899
--- Comment #1 from Florin Iucha <florin.iucha at amd dot com> ---
Created attachment 49590
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=49590&action=edit
pre-processed source file
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug c++/97899] [11 Regression] internal compiler error: in split_nonconstant_init_1, at cp/typeck2.c:626
2020-11-18 23:51 [Bug c++/97899] New: internal compiler error: in split_nonconstant_init_1, at cp/typeck2.c:626 florin.iucha at amd dot com
2020-11-18 23:53 ` [Bug c++/97899] " florin.iucha at amd dot com
@ 2020-11-19 0:12 ` mpolacek at gcc dot gnu.org
2020-11-19 0:13 ` florin.iucha at amd dot com
` (11 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2020-11-19 0:12 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97899
Marek Polacek <mpolacek at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed| |2020-11-19
Keywords| |ice-on-valid-code
Ever confirmed|0 |1
Status|UNCONFIRMED |NEW
Target Milestone|--- |11.0
Summary|internal compiler error: in |[11 Regression] internal
|split_nonconstant_init_1, |compiler error: in
|at cp/typeck2.c:626 |split_nonconstant_init_1,
| |at cp/typeck2.c:626
CC| |mpolacek at gcc dot gnu.org
--- Comment #2 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Confirmed, thanks for reporting this.
Reducing...
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug c++/97899] [11 Regression] internal compiler error: in split_nonconstant_init_1, at cp/typeck2.c:626
2020-11-18 23:51 [Bug c++/97899] New: internal compiler error: in split_nonconstant_init_1, at cp/typeck2.c:626 florin.iucha at amd dot com
2020-11-18 23:53 ` [Bug c++/97899] " florin.iucha at amd dot com
2020-11-19 0:12 ` [Bug c++/97899] [11 Regression] " mpolacek at gcc dot gnu.org
@ 2020-11-19 0:13 ` florin.iucha at amd dot com
2020-11-19 0:21 ` mpolacek at gcc dot gnu.org
` (10 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: florin.iucha at amd dot com @ 2020-11-19 0:13 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97899
--- Comment #3 from Florin Iucha <florin.iucha at amd dot com> ---
gcc version 11.0.0 20201108 (previous snapshot) is compiling fine.
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug c++/97899] [11 Regression] internal compiler error: in split_nonconstant_init_1, at cp/typeck2.c:626
2020-11-18 23:51 [Bug c++/97899] New: internal compiler error: in split_nonconstant_init_1, at cp/typeck2.c:626 florin.iucha at amd dot com
` (2 preceding siblings ...)
2020-11-19 0:13 ` florin.iucha at amd dot com
@ 2020-11-19 0:21 ` mpolacek at gcc dot gnu.org
2020-11-19 0:23 ` florin.iucha at amd dot com
` (9 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2020-11-19 0:21 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97899
--- Comment #4 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Started with r11-4959.
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug c++/97899] [11 Regression] internal compiler error: in split_nonconstant_init_1, at cp/typeck2.c:626
2020-11-18 23:51 [Bug c++/97899] New: internal compiler error: in split_nonconstant_init_1, at cp/typeck2.c:626 florin.iucha at amd dot com
` (3 preceding siblings ...)
2020-11-19 0:21 ` mpolacek at gcc dot gnu.org
@ 2020-11-19 0:23 ` florin.iucha at amd dot com
2020-11-19 0:32 ` mpolacek at gcc dot gnu.org
` (8 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: florin.iucha at amd dot com @ 2020-11-19 0:23 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97899
--- Comment #5 from Florin Iucha <florin.iucha at amd dot com> ---
Curious, were you able to reduce it further, or just bisected it?
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug c++/97899] [11 Regression] internal compiler error: in split_nonconstant_init_1, at cp/typeck2.c:626
2020-11-18 23:51 [Bug c++/97899] New: internal compiler error: in split_nonconstant_init_1, at cp/typeck2.c:626 florin.iucha at amd dot com
` (4 preceding siblings ...)
2020-11-19 0:23 ` florin.iucha at amd dot com
@ 2020-11-19 0:32 ` mpolacek at gcc dot gnu.org
2020-11-19 0:32 ` florin.iucha at amd dot com
` (7 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2020-11-19 0:32 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97899
--- Comment #6 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Reduced:
// PR c++/97899
template <typename T>
T fn(T a)
{
return a;
}
template <typename>
struct C {
void bar() {
int d = 42;
const int i = int{fn(d)};
}
};
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug c++/97899] [11 Regression] internal compiler error: in split_nonconstant_init_1, at cp/typeck2.c:626
2020-11-18 23:51 [Bug c++/97899] New: internal compiler error: in split_nonconstant_init_1, at cp/typeck2.c:626 florin.iucha at amd dot com
` (5 preceding siblings ...)
2020-11-19 0:32 ` mpolacek at gcc dot gnu.org
@ 2020-11-19 0:32 ` florin.iucha at amd dot com
2020-11-19 1:19 ` mpolacek at gcc dot gnu.org
` (6 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: florin.iucha at amd dot com @ 2020-11-19 0:32 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97899
--- Comment #7 from Florin Iucha <florin.iucha at amd dot com> ---
Cool, thank you!
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug c++/97899] [11 Regression] internal compiler error: in split_nonconstant_init_1, at cp/typeck2.c:626
2020-11-18 23:51 [Bug c++/97899] New: internal compiler error: in split_nonconstant_init_1, at cp/typeck2.c:626 florin.iucha at amd dot com
` (6 preceding siblings ...)
2020-11-19 0:32 ` florin.iucha at amd dot com
@ 2020-11-19 1:19 ` mpolacek at gcc dot gnu.org
2020-11-19 8:58 ` rguenth at gcc dot gnu.org
` (5 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2020-11-19 1:19 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97899
--- Comment #8 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Reduced even more:
// PR c++/97899
template <typename T = int>
int fn()
{
return 1;
}
template <typename T>
void bar() {
const int i = int{fn()};
}
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug c++/97899] [11 Regression] internal compiler error: in split_nonconstant_init_1, at cp/typeck2.c:626
2020-11-18 23:51 [Bug c++/97899] New: internal compiler error: in split_nonconstant_init_1, at cp/typeck2.c:626 florin.iucha at amd dot com
` (7 preceding siblings ...)
2020-11-19 1:19 ` mpolacek at gcc dot gnu.org
@ 2020-11-19 8:58 ` rguenth at gcc dot gnu.org
2020-11-19 10:00 ` marxin at gcc dot gnu.org
` (4 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: rguenth at gcc dot gnu.org @ 2020-11-19 8:58 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97899
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P1
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug c++/97899] [11 Regression] internal compiler error: in split_nonconstant_init_1, at cp/typeck2.c:626
2020-11-18 23:51 [Bug c++/97899] New: internal compiler error: in split_nonconstant_init_1, at cp/typeck2.c:626 florin.iucha at amd dot com
` (8 preceding siblings ...)
2020-11-19 8:58 ` rguenth at gcc dot gnu.org
@ 2020-11-19 10:00 ` marxin at gcc dot gnu.org
2020-11-20 21:52 ` jason at gcc dot gnu.org
` (3 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: marxin at gcc dot gnu.org @ 2020-11-19 10:00 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97899
--- Comment #9 from Martin Liška <marxin at gcc dot gnu.org> ---
@Marek: Please do not forget to CC the author of a culprit revision ;)
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug c++/97899] [11 Regression] internal compiler error: in split_nonconstant_init_1, at cp/typeck2.c:626
2020-11-18 23:51 [Bug c++/97899] New: internal compiler error: in split_nonconstant_init_1, at cp/typeck2.c:626 florin.iucha at amd dot com
` (9 preceding siblings ...)
2020-11-19 10:00 ` marxin at gcc dot gnu.org
@ 2020-11-20 21:52 ` jason at gcc dot gnu.org
2020-11-24 19:58 ` cvs-commit at gcc dot gnu.org
` (2 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: jason at gcc dot gnu.org @ 2020-11-20 21:52 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97899
Jason Merrill <jason at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
CC| |jason at gcc dot gnu.org
Assignee|unassigned at gcc dot gnu.org |jason at gcc dot gnu.org
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug c++/97899] [11 Regression] internal compiler error: in split_nonconstant_init_1, at cp/typeck2.c:626
2020-11-18 23:51 [Bug c++/97899] New: internal compiler error: in split_nonconstant_init_1, at cp/typeck2.c:626 florin.iucha at amd dot com
` (10 preceding siblings ...)
2020-11-20 21:52 ` jason at gcc dot gnu.org
@ 2020-11-24 19:58 ` cvs-commit at gcc dot gnu.org
2020-11-24 19:58 ` jason at gcc dot gnu.org
2022-06-27 18:56 ` cvs-commit at gcc dot gnu.org
13 siblings, 0 replies; 15+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-11-24 19:58 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97899
--- Comment #10 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:92a30040c8d3ea4899979ec41a7e8e6a625c438d
commit r11-5323-g92a30040c8d3ea4899979ec41a7e8e6a625c438d
Author: Jason Merrill <jason@redhat.com>
Date: Fri Nov 20 16:50:20 2020 -0500
c++: ICE with int{} in template. [PR97899]
split_nonconstant_init_1 was confused by a CONSTRUCTOR with non-aggregate
type, which (with COMPOUND_LITERAL_P set) we use in a template to represent
a braced functional cast. It seems to me that there's no good reason to do
split_nonconstant_init at all in a template.
gcc/cp/ChangeLog:
PR c++/97899
* typeck2.c (store_init_value): Don't split_nonconstant_init in a
template.
gcc/testsuite/ChangeLog:
PR c++/97899
* g++.dg/cpp0x/initlist-template3.C: New test.
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug c++/97899] [11 Regression] internal compiler error: in split_nonconstant_init_1, at cp/typeck2.c:626
2020-11-18 23:51 [Bug c++/97899] New: internal compiler error: in split_nonconstant_init_1, at cp/typeck2.c:626 florin.iucha at amd dot com
` (11 preceding siblings ...)
2020-11-24 19:58 ` cvs-commit at gcc dot gnu.org
@ 2020-11-24 19:58 ` jason at gcc dot gnu.org
2022-06-27 18:56 ` cvs-commit at gcc dot gnu.org
13 siblings, 0 replies; 15+ messages in thread
From: jason at gcc dot gnu.org @ 2020-11-24 19:58 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97899
Jason Merrill <jason at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|ASSIGNED |RESOLVED
--- Comment #11 from Jason Merrill <jason at gcc dot gnu.org> ---
Fixed.
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug c++/97899] [11 Regression] internal compiler error: in split_nonconstant_init_1, at cp/typeck2.c:626
2020-11-18 23:51 [Bug c++/97899] New: internal compiler error: in split_nonconstant_init_1, at cp/typeck2.c:626 florin.iucha at amd dot com
` (12 preceding siblings ...)
2020-11-24 19:58 ` jason at gcc dot gnu.org
@ 2022-06-27 18:56 ` cvs-commit at gcc dot gnu.org
13 siblings, 0 replies; 15+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-06-27 18:56 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97899
--- Comment #12 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The trunk branch has been updated by Marek Polacek <mpolacek@gcc.gnu.org>:
https://gcc.gnu.org/g:508231d54405ac9f120cf30c28cd6eb10ceded30
commit r13-1303-g508231d54405ac9f120cf30c28cd6eb10ceded30
Author: Marek Polacek <polacek@redhat.com>
Date: Mon Jun 27 14:52:58 2022 -0400
c++: Add fixed test [PR89197]
Fixed since bug 97899 was fixed.
PR c++/89197
gcc/testsuite/ChangeLog:
* g++.dg/cpp0x/initlist130.C: New test.
^ permalink raw reply [flat|nested] 15+ messages in thread