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++/47206] New: [4.6 Regression] [C++0x] ICE: SIGSEGV in cp_tree_equal (tree.c:2150) with -fno-elide-constructors


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47206

           Summary: [4.6 Regression] [C++0x] ICE: SIGSEGV in cp_tree_equal
                    (tree.c:2150) with -fno-elide-constructors
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: zsojka@seznam.cz


Created attachment 22922
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=22922
reduced testcase

Compiler output:
$ gcc -std=c++0x -fno-elide-constructors pr47206.C
==13145== Invalid read of size 4
==13145==    at 0x64E833: cp_tree_equal (tree.c:2150)
==13145==    by 0x62B1C5: constexpr_call_equal (semantics.c:5696)
==13145==    by 0x11F2DD4: htab_find_slot_with_hash (hashtab.c:668)
==13145==    by 0x63C884: cxx_eval_constant_expression (semantics.c:5980)
==13145==    by 0x63DADA: cxx_eval_outermost_constant_expr (semantics.c:6995)
==13145==    by 0x63FD18: maybe_constant_value (semantics.c:7066)
==13145==    by 0x6151CD: expand_aggr_init_1 (init.c:1455)
==13145==    by 0x61A401: build_aggr_init (init.c:1358)
==13145==    by 0x53615E: cp_finish_decl (decl.c:5250)
==13145==    by 0x5E3FD5: cp_parser_init_declarator (parser.c:14722)
==13145==    by 0x5E987A: cp_parser_simple_declaration (parser.c:9689)
==13145==    by 0x5E9BE6: cp_parser_block_declaration (parser.c:9587)
==13145==    by 0x5EA6B0: cp_parser_declaration_statement (parser.c:9239)
==13145==    by 0x5CDAE4: cp_parser_statement (parser.c:8155)
==13145==    by 0x5CED45: cp_parser_statement_seq_opt (parser.c:8414)
==13145==    by 0x5CEE7B: cp_parser_compound_statement (parser.c:8368)
==13145==    by 0x5E28DB: cp_parser_ctor_initializer_opt_and_function_body
(parser.c:16371)
==13145==    by 0x5E3051: cp_parser_function_definition_after_declarator
(parser.c:19814)
==13145==    by 0x5D1413: cp_parser_type_specifier (parser.c:20396)
==13145==    by 0x5D24E7: cp_parser_decl_specifier_seq (parser.c:9969)
==13145==    by 0x5E97BA: cp_parser_simple_declaration (parser.c:9626)
==13145==    by 0x5E9BE6: cp_parser_block_declaration (parser.c:9587)
==13145==    by 0x5ED8F1: cp_parser_declaration (parser.c:9492)
==13145==    by 0x5EC419: cp_parser_declaration_seq_opt (parser.c:9378)
==13145==    by 0x5EDF68: c_parse_file (parser.c:3461)
==13145==    by 0x6C2194: c_common_parse_file (c-opts.c:1071)
==13145==    by 0xA24597: toplev_main (toplev.c:579)
==13145==    by 0x6369BBC: (below main) (in /lib64/libc-2.11.2.so)
==13145==  Address 0x4 is not stack'd, malloc'd or (recently) free'd
==13145== 
pr47206.C: In member function 'void S::f2()':
pr47206.C:9:15:   in constexpr expansion of 's.S::S((*(const S*)this))'
pr47206.C:9:15: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.


Tested revisions:
r168552 - crash
r165699 - OK
4.5 r168062 - OK


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