From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5665 invoked by alias); 22 Oct 2013 03:56:31 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 5620 invoked by uid 48); 22 Oct 2013 03:56:27 -0000 From: "reichelt at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/58837] New: [4.7/4.8/4.9 Regression] [c++11] ICE using invalid condition in static_assert Date: Tue, 22 Oct 2013 03:56:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 4.9.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: reichelt at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2013-10/txt/msg01569.txt.bz2 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.]