This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/60215] New: [4.9 Regression] ICE with invalid bit-field size


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 '<unresolved
overloaded function 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.]


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]