https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65409

            Bug ID: 65409
           Summary: ICE in store_field
           Product: gcc
           Version: 4.9.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: bugs at qult dot net

Created attachment 35022
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=35022&action=edit
ICE-triggering source.

I get an ICE with the attached source, from version 4.8 on to the head of the
Git repository.

Output of Git's cc1plus:

 Foo::Foo() Foo::Foo() Foo::Foo() Bar<T>::Bar(U) Bar<T>::Bar(U) [with U = Foo;
T = Foo] Bar<T>::Bar(U) [with U = Foo; T = Foo] Bar<T>::Bar(U) [with U = Foo; T
= Foo] void __static_initialization_and_destruction_0(int, int) void
_GLOBAL__sub_I_a()
Analyzing compilation unit
Performing interprocedural optimizations
 <*free_lang_data> <visibility> <build_ssa_passes> <chkp_passes>
<opt_local_passes> <free-inline-summary> <whole-program> <inline>Assembling
functions:
 Foo::Foo() Bar<T>::Bar(U) [with U = Foo; T = Foo]
<stdin>: In constructor ‘Bar<T>::Bar(U) [with U = Foo; T = Foo]’:
<stdin>:14:27: internal compiler error: in store_field, at expr.c:6660
0x9cf46f store_field
    ../../gcc/expr.c:6659
0x9d4d10 expand_assignment(tree_node*, tree_node*, bool)
    ../../gcc/expr.c:5000
0x8d5dee expand_call_stmt
    ../../gcc/cfgexpand.c:2388
0x8d5dee expand_gimple_stmt_1
    ../../gcc/cfgexpand.c:3334
0x8d5dee expand_gimple_stmt
    ../../gcc/cfgexpand.c:3488
0x8dc118 expand_gimple_basic_block
    ../../gcc/cfgexpand.c:5500
0x8dd9f7 execute
    ../../gcc/cfgexpand.c:6118

When uncommenting the commented-out fourth attribute of Foo, the ICE goes away.

Reply via email to