* [Bug middle-end/95552] VLA ICE
2020-06-05 13:36 [Bug middle-end/95552] New: VLA ICE dje at gcc dot gnu.org
@ 2020-06-05 13:36 ` dje at gcc dot gnu.org
2020-06-05 13:37 ` dje at gcc dot gnu.org
` (8 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: dje at gcc dot gnu.org @ 2020-06-05 13:36 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95552
David Edelsohn <dje at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |ice-on-valid-code
--- Comment #1 from David Edelsohn <dje at gcc dot gnu.org> ---
Confirmed.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug middle-end/95552] VLA ICE
2020-06-05 13:36 [Bug middle-end/95552] New: VLA ICE dje at gcc dot gnu.org
2020-06-05 13:36 ` [Bug middle-end/95552] " dje at gcc dot gnu.org
@ 2020-06-05 13:37 ` dje at gcc dot gnu.org
2020-06-05 13:38 ` [Bug middle-end/95552] [11 Regression] " rguenth at gcc dot gnu.org
` (7 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: dje at gcc dot gnu.org @ 2020-06-05 13:37 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95552
David Edelsohn <dje at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2020-06-05
Ever confirmed|0 |1
--- Comment #2 from David Edelsohn <dje at gcc dot gnu.org> ---
Confirmed.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug middle-end/95552] [11 Regression] VLA ICE
2020-06-05 13:36 [Bug middle-end/95552] New: VLA ICE dje at gcc dot gnu.org
2020-06-05 13:36 ` [Bug middle-end/95552] " dje at gcc dot gnu.org
2020-06-05 13:37 ` dje at gcc dot gnu.org
@ 2020-06-05 13:38 ` rguenth at gcc dot gnu.org
2020-06-05 15:43 ` dje at gcc dot gnu.org
` (6 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: rguenth at gcc dot gnu.org @ 2020-06-05 13:38 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95552
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |11.0
Summary|VLA ICE |[11 Regression] VLA ICE
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug middle-end/95552] [11 Regression] VLA ICE
2020-06-05 13:36 [Bug middle-end/95552] New: VLA ICE dje at gcc dot gnu.org
` (2 preceding siblings ...)
2020-06-05 13:38 ` [Bug middle-end/95552] [11 Regression] " rguenth at gcc dot gnu.org
@ 2020-06-05 15:43 ` dje at gcc dot gnu.org
2020-06-05 15:56 ` dje at gcc dot gnu.org
` (5 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: dje at gcc dot gnu.org @ 2020-06-05 15:43 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95552
--- Comment #3 from David Edelsohn <dje at gcc dot gnu.org> ---
Started between r11-878 and r11-896
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug middle-end/95552] [11 Regression] VLA ICE
2020-06-05 13:36 [Bug middle-end/95552] New: VLA ICE dje at gcc dot gnu.org
` (3 preceding siblings ...)
2020-06-05 15:43 ` dje at gcc dot gnu.org
@ 2020-06-05 15:56 ` dje at gcc dot gnu.org
2020-06-05 16:04 ` jason at gcc dot gnu.org
` (4 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: dje at gcc dot gnu.org @ 2020-06-05 15:56 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95552
David Edelsohn <dje at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jason at gcc dot gnu.org
--- Comment #4 from David Edelsohn <dje at gcc dot gnu.org> ---
Jason, this seems to be a regression introduced by your patch for C++ VLA PR
95232.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug middle-end/95552] [11 Regression] VLA ICE
2020-06-05 13:36 [Bug middle-end/95552] New: VLA ICE dje at gcc dot gnu.org
` (4 preceding siblings ...)
2020-06-05 15:56 ` dje at gcc dot gnu.org
@ 2020-06-05 16:04 ` jason at gcc dot gnu.org
2020-06-05 20:49 ` jason at gcc dot gnu.org
` (3 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: jason at gcc dot gnu.org @ 2020-06-05 16:04 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95552
Jason Merrill <jason at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Version|10.0 |11.0
Status|NEW |ASSIGNED
Assignee|unassigned at gcc dot gnu.org |jason at gcc dot gnu.org
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug middle-end/95552] [11 Regression] VLA ICE
2020-06-05 13:36 [Bug middle-end/95552] New: VLA ICE dje at gcc dot gnu.org
` (5 preceding siblings ...)
2020-06-05 16:04 ` jason at gcc dot gnu.org
@ 2020-06-05 20:49 ` jason at gcc dot gnu.org
2020-06-09 16:05 ` cvs-commit at gcc dot gnu.org
` (2 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: jason at gcc dot gnu.org @ 2020-06-05 20:49 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95552
--- Comment #5 from Jason Merrill <jason at gcc dot gnu.org> ---
This simplified testcase has been broken a lot longer (back to GCC 8, at
least); my patch just extended the breakage to templates that already affected
non-templates. The issue is that cloning the constructor doesn't handle the
VLA typedef properly, so the version in the clone ends up still referring to
the cloned function, which blows up.
struct ViewDom
{
ViewDom(int i) { char (*a)[i]; }
};
void element( )
{
ViewDom a(2);
}
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug middle-end/95552] [11 Regression] VLA ICE
2020-06-05 13:36 [Bug middle-end/95552] New: VLA ICE dje at gcc dot gnu.org
` (6 preceding siblings ...)
2020-06-05 20:49 ` jason at gcc dot gnu.org
@ 2020-06-09 16:05 ` cvs-commit at gcc dot gnu.org
2020-06-09 19:32 ` cvs-commit at gcc dot gnu.org
2020-06-09 20:12 ` jason at gcc dot gnu.org
9 siblings, 0 replies; 11+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-06-09 16:05 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95552
--- Comment #6 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:ef41587df9839d1dfc77dbc48a0830e42b36626e
commit r11-1122-gef41587df9839d1dfc77dbc48a0830e42b36626e
Author: Jason Merrill <jason@redhat.com>
Date: Sat Jun 6 00:07:21 2020 -0400
c++: Tweak predeclare_vla.
We only need to predeclare a VLA type if it's wrapped in a pointer type;
otherwise gimplify_type_sizes will handle it.
gcc/cp/ChangeLog:
PR c++/95552
* cp-gimplify.c (predeclare_vla): Only predeclare a VLA if it's
wrapped in a pointer type.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug middle-end/95552] [11 Regression] VLA ICE
2020-06-05 13:36 [Bug middle-end/95552] New: VLA ICE dje at gcc dot gnu.org
` (7 preceding siblings ...)
2020-06-09 16:05 ` cvs-commit at gcc dot gnu.org
@ 2020-06-09 19:32 ` cvs-commit at gcc dot gnu.org
2020-06-09 20:12 ` jason at gcc dot gnu.org
9 siblings, 0 replies; 11+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-06-09 19:32 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95552
--- Comment #7 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:77103685ff4b50b3c4d7ee76688bdf452acc82c7
commit r11-1127-g77103685ff4b50b3c4d7ee76688bdf452acc82c7
Author: Jason Merrill <jason@redhat.com>
Date: Fri Jun 5 16:36:27 2020 -0400
tree-inline: Fix VLA handling [PR95552]
The problem in this testcase comes from cloning the constructor into
complete and base variants. When we clone the body the first time,
walk_tree_1 calls copy_tree_body_r on the type of the artificial TYPE_DECL
we made for the VLA type without calling it on the decl itself, so we
overwrite the type of the TYPE_DECL without copying the decl first.
This has been broken since we started inserting a TYPE_DECL for anonymous
VLAs in r7-457.
This patch fixes walk_tree_1 to call the function on the TYPE_DECL, as we
do
for other decls of a DECL_EXPR.
gcc/ChangeLog:
PR c++/95552
* tree.c (walk_tree_1): Call func on the TYPE_DECL of a DECL_EXPR.
gcc/testsuite/ChangeLog:
PR c++/95552
* g++.dg/ext/vla23.C: New test.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug middle-end/95552] [11 Regression] VLA ICE
2020-06-05 13:36 [Bug middle-end/95552] New: VLA ICE dje at gcc dot gnu.org
` (8 preceding siblings ...)
2020-06-09 19:32 ` cvs-commit at gcc dot gnu.org
@ 2020-06-09 20:12 ` jason at gcc dot gnu.org
9 siblings, 0 replies; 11+ messages in thread
From: jason at gcc dot gnu.org @ 2020-06-09 20:12 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95552
Jason Merrill <jason at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|ASSIGNED |RESOLVED
--- Comment #8 from Jason Merrill <jason at gcc dot gnu.org> ---
Fixed.
^ permalink raw reply [flat|nested] 11+ messages in thread