https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111286
Bug ID: 111286
Summary: ICE on functional cast to const array reference
Product: gcc
Version: 13.2.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: leni536 at gmail dot com
Target Milestone: ---
With g++ 13.2.0
with flags: -std=c++20
The following code:
```
struct A {
A() noexcept {}
};
void foo() {
using T = const A (&)[1];
T{};
}
```
Produces the following compiler output:
<source>: In function 'void foo()':
<source>:7:7: internal compiler error: in cp_build_addr_expr_1, at
cp/typeck.cc:7147
7 | T{};
| ^
0x1ce7bde internal_error(char const*, ...)
???:0
0x7290fc fancy_abort(char const*, int, char const*)
???:0
0x74b040 perform_implicit_conversion_flags(tree_node*, tree_node*, int, int)
???:0
0x8e9510 finish_compound_literal(tree_node*, tree_node*, int, fcl_t)
???:0
0x89fd5b c_parse_file()
???:0
0x98c5d9 c_common_parse_file()
???:0
https://godbolt.org/z/MaWTTv4Y7