[Bug c++/83713] New: [6/7/8 Regression] ICE in do_narrow at gcc/convert.c:474
marxin at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Sat Jan 6 12:02:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83713
Bug ID: 83713
Summary: [6/7/8 Regression] ICE in do_narrow at
gcc/convert.c:474
Product: gcc
Version: 7.0
Status: UNCONFIRMED
Keywords: ice-on-valid-code
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: marxin at gcc dot gnu.org
CC: rguenth at gcc dot gnu.org
Target Milestone: ---
Starting from r246756 we ICE on:
$ cat Buffer.ii
class a
{
char b;
void c ();
};
void
a::c ()
{
&b + ((long long) &b & 0);
}
$ g++ Buffer.ii -O2 -m32 -c
Buffer.ii: In member function ‘void a::c()’:
Buffer.ii:9:27: internal compiler error: tree check: expected boolean_type or
enumeral_type or integer_type, have pointer_type in do_narrow, at convert.c:474
&b + ((long long) &b & 0);
^
0x5f56dc tree_check_failed(tree_node const*, char const*, int, char const*,
...)
../../gcc/tree.c:9347
0x9aa268 any_integral_type_check(tree_node*, char const*, int, char const*)
../../gcc/tree.h:3374
0x5e2f50 do_narrow
../../gcc/convert.c:474
0x9a892f convert_to_integer_1
../../gcc/convert.c:887
0x690b59 ocp_convert(tree_node*, tree_node*, int, int, int)
../../gcc/cp/cvt.c:814
0x8968bc pointer_int_sum(unsigned int, tree_code, tree_node*, tree_node*, bool)
../../gcc/c-family/c-common.c:3147
0x86b192 cp_pointer_int_sum
../../gcc/cp/typeck.c:5445
0x86b192 cp_build_binary_op(unsigned int, tree_code, tree_node*, tree_node*,
int)
../../gcc/cp/typeck.c:4421
0x636aee build_new_op_1
../../gcc/cp/call.c:6002
0x63757e build_new_op(unsigned int, tree_code, int, tree_node*, tree_node*,
tree_node*, tree_node**, int)
../../gcc/cp/call.c:6046
0x85a822 build_x_binary_op(unsigned int, tree_code, tree_node*, tree_code,
tree_node*, tree_code, tree_node**, int)
../../gcc/cp/typeck.c:4024
0x7616ce cp_parser_binary_expression
../../gcc/cp/parser.c:9284
0x762ee4 cp_parser_assignment_expression
../../gcc/cp/parser.c:9417
0x7636c8 cp_parser_expression
../../gcc/cp/parser.c:9586
0x765698 cp_parser_expression_statement
../../gcc/cp/parser.c:11042
0x76b86f cp_parser_statement
../../gcc/cp/parser.c:10858
0x76d0c0 cp_parser_statement_seq_opt
../../gcc/cp/parser.c:11185
0x76d197 cp_parser_compound_statement
../../gcc/cp/parser.c:11139
0x785d20 cp_parser_function_body
../../gcc/cp/parser.c:21679
0x785d20 cp_parser_ctor_initializer_opt_and_function_body
../../gcc/cp/parser.c:21716
More information about the Gcc-bugs
mailing list