This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/58837] New: [4.7/4.8/4.9 Regression] [c++11] ICE using invalid condition in static_assert
- From: "reichelt at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 22 Oct 2013 03:56:25 +0000
- Subject: [Bug c++/58837] New: [4.7/4.8/4.9 Regression] [c++11] ICE using invalid condition in static_assert
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58837
Bug ID: 58837
Summary: [4.7/4.8/4.9 Regression] [c++11] ICE using invalid
condition in static_assert
Product: gcc
Version: 4.9.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: reichelt at gcc dot gnu.org
The following invalid code snippet (compiled with "-std=c++11" or "-std=c++0x"
for older compilers) triggers an ICE sine GCC 4.6.0:
==============================
struct A {};
static_assert(A::~A, "");
==============================
bug.cc:3:25: internal compiler error: tree check: expected class 'expression',
have 'constant' (ptrmem_cst) in tree_operand_check, at tree.h:3107
static_assert(A::~A, "");
^
0xd16726 tree_class_check_failed(tree_node const*, tree_code_class, char
const*, int, char const*)
../../gcc/gcc/tree.c:9352
0x502208 expr_check
../../gcc/gcc/tree.h:2843
0x502208 tree_operand_check
../../gcc/gcc/tree.h:3107
0x7778d6 tree_operand_check
../../gcc/gcc/tree.h:2797
0x7778d6 c_common_truthvalue_conversion(unsigned int, tree_node*)
../../gcc/gcc/c-family/c-common.c:4627
0x695f17 ocp_convert(tree_node*, tree_node*, int, int, int)
../../gcc/gcc/cp/cvt.c:785
0x6e435f finish_static_assert(tree_node*, tree_node*, unsigned int, bool)
../../gcc/gcc/cp/semantics.c:6744
0x651d7b cp_parser_static_assert
../../gcc/gcc/cp/parser.c:11671
0x648151 cp_parser_block_declaration
../../gcc/gcc/cp/parser.c:10931
0x66f17e cp_parser_declaration
../../gcc/gcc/cp/parser.c:10832
0x66de9a cp_parser_declaration_seq_opt
../../gcc/gcc/cp/parser.c:10718
0x66f7b6 cp_parser_translation_unit
../../gcc/gcc/cp/parser.c:3990
0x66f7b6 c_parse_file()
../../gcc/gcc/cp/parser.c:30970
0x78c623 c_common_parse_file()
../../gcc/gcc/c-family/c-opts.c:1046
Please submit a full bug report, [etc.]