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

Volker Reichelt <reichelt at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|2016-04-11 00:00:00         |2017-06-07
                 CC|                            |reichelt at gcc dot gnu.org

--- Comment #10 from Volker Reichelt <reichelt at gcc dot gnu.org> ---
Here's an even simpler example that ICEs since GCC 4.9.0:

=========================
float foo();

struct A
{
  static float x;
};

double A::x = foo();

void bar()
{
  A::x = 0;
}
=========================

bug.cc:8:11: error: conflicting declaration 'double A::x'
 double A::x = foo();
           ^
bug.cc:5:16: note: previous declaration as 'float A::x'
   static float x;
                ^
bug.cc:8:11: error: declaration of 'float A::x' outside of class is not
definition [-fpermissive]
 double A::x = foo();
           ^
cc1plus: internal compiler error: in record_reference, at cgraphbuild.c:64
0x96b754 record_reference
        ../../gcc/gcc/cgraphbuild.c:64
0x1048663 walk_tree_1(tree_node**, tree_node* (*)(tree_node**, int*, void*),
void*, hash_set<tree_node*, default_hash_traits<tree_node*> >*, tree_node*
(*)(tree_node**, int*, tree_node* (*)(tree_node**, int*, void*), void*,
hash_set<tree_node*, default_hash_traits<tree_node*> >*))
        ../../gcc/gcc/tree.c:11838
0x1048ef2 walk_tree_1(tree_node**, tree_node* (*)(tree_node**, int*, void*),
void*, hash_set<tree_node*, default_hash_traits<tree_node*> >*, tree_node*
(*)(tree_node**, int*, tree_node* (*)(tree_node**, int*, void*), void*,
hash_set<tree_node*, default_hash_traits<tree_node*> >*))
        ../../gcc/gcc/tree.c:12155
0x96c952 record_references_in_initializer(tree_node*, bool)
        ../../gcc/gcc/cgraphbuild.c:401
0x1088e07 varpool_node::analyze()
        ../../gcc/gcc/varpool.c:532
0x972916 analyze_functions
        ../../gcc/gcc/cgraphunit.c:1180
0x973cc2 symbol_table::finalize_compilation_unit()
        ../../gcc/gcc/cgraphunit.c:2611
Please submit a full bug report, [etc.]

Reply via email to