https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101070
Bug ID: 101070
Summary: ICE: Error reporting routines re-entered.
Product: gcc
Version: 12.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: [email protected]
Target Milestone: ---
Affects versions down to at least r5 :
$ cat z1.cc
typedef int A __attribute__((aligned(16)));
void f ()
{
A b[2];
b = 0;
}
$ cat z2.cc
typedef int A __attribute__((aligned(16)));
A b[2];
int p = &b;
$ g++-12-20210613 -c z1.cc
z1.cc: In function 'void f()':
z1.cc:4:8: error: alignment of array elements is greater than element size
4 | A b[2];
| ^
'
Internal compiler error: Error reporting routines re-entered.
0xd444d6 layout_type(tree_node*)
../../gcc/stor-layout.c:2599
0x86a29c build_cplus_array_type(tree_node*, tree_node*, int)
../../gcc/cp/tree.c:1113
0x86d900 build_cplus_array_type(tree_node*, tree_node*, int)
../../gcc/cp/tree.c:1602
0x86d900 strip_typedefs(tree_node*, bool*, unsigned int)
../../gcc/cp/tree.c:1602
0x75ae4b type_to_string
../../gcc/cp/error.c:3336
0x75ba85 cp_printer
../../gcc/cp/error.c:4416
0x172c4be pp_format(pretty_printer*, text_info*)
../../gcc/pretty-print.c:1475
0x172056d diagnostic_report_diagnostic(diagnostic_context*, diagnostic_info*)
../../gcc/diagnostic.c:1275
0x1720ace diagnostic_impl
../../gcc/diagnostic.c:1437
0x17213da error_at(unsigned int, char const*, ...)
../../gcc/diagnostic.c:1760
0x8814d2 cp_build_modify_expr(unsigned int, tree_node*, tree_code, tree_node*,
int)
../../gcc/cp/typeck.c:8903
0x881f69 build_x_modify_expr(unsigned int, tree_node*, tree_code, tree_node*,
int)
../../gcc/cp/typeck.c:9033
0x7d4f2a cp_parser_assignment_expression
../../gcc/cp/parser.c:10198
0x7d5b6c cp_parser_expression
../../gcc/cp/parser.c:10327
0x7d8787 cp_parser_expression_statement
../../gcc/cp/parser.c:12071
0x7e5983 cp_parser_statement
../../gcc/cp/parser.c:11867
0x7e6254 cp_parser_statement_seq_opt
../../gcc/cp/parser.c:12219
0x7e630f cp_parser_compound_statement
../../gcc/cp/parser.c:12168
0x8017f8 cp_parser_function_body
../../gcc/cp/parser.c:24236
0x8017f8 cp_parser_ctor_initializer_opt_and_function_body
../../gcc/cp/parser.c:24287