[Bug c/98715] New: ICE in make_decl_rtl, at varasm.c

2021-01-17 Thread alserkli at inbox dot ru via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98715

Bug ID: 98715
   Summary: ICE in make_decl_rtl, at varasm.c
   Product: gcc
   Version: 11.0
   URL: https://godbolt.org/z/z763xG
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
  Assignee: unassigned at gcc dot gnu.org
  Reporter: alserkli at inbox dot ru
  Target Milestone: ---

:

void f(int n) {
int a[n][n] = {{}};
}

gives on trunk (also gcc 4.9.0, but not 4.8.5):

during RTL pass: expand
: In function 'void f(int)':
:2:22: internal compiler error: in make_decl_rtl, at varasm.c:1427
2 | int a[n][n] = {{}};
  |  ^
0x1cd4199 internal_error(char const*, ...)
???:0
0x6b4a01 fancy_abort(char const*, int, char const*)
???:0
0x13d7265 make_decl_rtl(tree_node*)
???:0
0xc42451 expand_expr_real_1(tree_node*, rtx_def*, machine_mode,
expand_modifier, rtx_def**, bool)
???:0
0xc41a1e expand_expr_real_1(tree_node*, rtx_def*, machine_mode,
expand_modifier, rtx_def**, bool)
???:0
0xc4f0d1 store_expr(tree_node*, rtx_def*, int, bool, bool)
???:0

[Bug middle-end/98715] ICE in make_decl_rtl with double variable length array (VLA)

2021-01-17 Thread alserkli at inbox dot ru via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98715

--- Comment #2 from Alexander Klimov  ---
Clang does not think that the code is valid:

error: variable-sized object may not be initialized