From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14877 invoked by alias); 15 Feb 2014 21:01:35 -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 14856 invoked by uid 48); 15 Feb 2014 21:01:32 -0000 From: "reichelt at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/60215] New: [4.9 Regression] ICE with invalid bit-field size Date: Sat, 15 Feb 2014 21:01: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: 2014-02/txt/msg01423.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60215 Bug ID: 60215 Summary: [4.9 Regression] ICE with invalid bit-field size 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") triggers an ICE on trunk: ================== struct A { void foo(); int i : foo; }; ================== bug.cc:4:11: error: width of bit-field 'i' has non-integral type '' int i : foo; ^ bug.cc:4:11: internal compiler error: in cxx_eval_constant_expression, at cp/semantics.c:9679 0x73dfc0 cxx_eval_constant_expression ../../gcc/gcc/cp/semantics.c:9679 0x7410d5 cxx_eval_outermost_constant_expr ../../gcc/gcc/cp/semantics.c:9807 0x6597ac check_bitfield_decl ../../gcc/gcc/cp/class.c:3250 0x6597ac check_field_decls ../../gcc/gcc/cp/class.c:3619 0x67002b check_bases_and_members ../../gcc/gcc/cp/class.c:5511 0x675221 finish_struct_1(tree_node*) ../../gcc/gcc/cp/class.c:6484 0x677574 finish_struct(tree_node*, tree_node*) ../../gcc/gcc/cp/class.c:6801 0x6a97ba cp_parser_class_specifier_1 ../../gcc/gcc/cp/parser.c:19218 0x6a97ba cp_parser_class_specifier ../../gcc/gcc/cp/parser.c:19437 0x6a97ba cp_parser_type_specifier ../../gcc/gcc/cp/parser.c:14302 0x6c2ba0 cp_parser_decl_specifier_seq ../../gcc/gcc/cp/parser.c:11547 0x6c9799 cp_parser_simple_declaration ../../gcc/gcc/cp/parser.c:11137 0x6acc63 cp_parser_block_declaration ../../gcc/gcc/cp/parser.c:11086 0x6d3f12 cp_parser_declaration ../../gcc/gcc/cp/parser.c:10983 0x6d2c08 cp_parser_declaration_seq_opt ../../gcc/gcc/cp/parser.c:10869 0x6d44aa cp_parser_translation_unit ../../gcc/gcc/cp/parser.c:4014 0x6d44aa c_parse_file() ../../gcc/gcc/cp/parser.c:31536 0x7f3813 c_common_parse_file() ../../gcc/gcc/c-family/c-opts.c:1060 Please submit a full bug report, [etc.]