[Bug c++/79655] New: [5/6/7 Regression] ICE on invalid c++ code in cxx_eval_store_expression in cp/constexpr.c:3464
marxin at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Feb 21 08:36:00 GMT 2017
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79655
Bug ID: 79655
Summary: [5/6/7 Regression] ICE on invalid c++ code in
cxx_eval_store_expression in cp/constexpr.c:3464
Product: gcc
Version: unknown
Status: UNCONFIRMED
Keywords: ice-on-invalid-code
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: marxin at gcc dot gnu.org
Target Milestone: ---
Created attachment 40793
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=40793&action=edit
test-case
An invalid code adopted from clang:
$ g++
/home/marxin/BIG/Programming/llvm-project/clang/test/SemaCXX/constant-expression-cxx1y.cpp
-std=c++14
...
/home/marxin/BIG/Programming/llvm-project/clang/test/SemaCXX/constant-expression-cxx1y.cpp:200:36:
internal compiler error: in cxx_eval_store_expression, at cp/constexpr.c:3464
static_assert(do_stuff(-1, 0) == 1, ""); // expected-error {{constant
expression}} expected-note {{in call}}
^
0xb156c4 cxx_eval_store_expression
../../gcc/cp/constexpr.c:3464
0xb17e4b cxx_eval_constant_expression
../../gcc/cp/constexpr.c:4049
0xb18b65 cxx_eval_constant_expression
../../gcc/cp/constexpr.c:4341
0xb180b1 cxx_eval_constant_expression
../../gcc/cp/constexpr.c:4088
0xb180b1 cxx_eval_constant_expression
../../gcc/cp/constexpr.c:4088
0xb167f9 cxx_eval_statement_list
../../gcc/cp/constexpr.c:3738
0xb1959b cxx_eval_constant_expression
../../gcc/cp/constexpr.c:4432
0xb1961a cxx_eval_constant_expression
../../gcc/cp/constexpr.c:4438
0xb0d9c9 cxx_eval_call_expression
../../gcc/cp/constexpr.c:1643
0xb17646 cxx_eval_constant_expression
../../gcc/cp/constexpr.c:3971
0xb1a013 cxx_eval_outermost_constant_expr
../../gcc/cp/constexpr.c:4613
0xb1abb7 maybe_constant_value(tree_node*, tree_node*)
../../gcc/cp/constexpr.c:4828
0xaf13c9 cp_fully_fold(tree_node*)
../../gcc/cp/cp-gimplify.c:1963
0x9ffa99 cp_build_binary_op(unsigned int, tree_code, tree_node*, tree_node*,
int)
../../gcc/cp/typeck.c:5243
0x823061 build_new_op_1
../../gcc/cp/call.c:5982
0x823156 build_new_op(unsigned int, tree_code, int, tree_node*, tree_node*,
tree_node*, tree_node**, int)
../../gcc/cp/call.c:6027
0x9fb075 build_x_binary_op(unsigned int, tree_code, tree_node*, tree_code,
tree_node*, tree_code, tree_node**, int)
../../gcc/cp/typeck.c:3930
0x994d9c cp_parser_binary_expression
../../gcc/cp/parser.c:9060
0x9951ee cp_parser_assignment_expression
../../gcc/cp/parser.c:9190
0x995949 cp_parser_constant_expression
../../gcc/cp/parser.c:9460
Started with r217663.
More information about the Gcc-bugs
mailing list