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

             Bug #: 51573
           Summary: [4.7 Regression] ICE (segfault) in
                    lto_varpool_encoder_encode_initializer_p
    Classification: Unclassified
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: lto
        AssignedTo: unassig...@gcc.gnu.org
        ReportedBy: mar...@trippelsdorf.de


ICE happened during a Firefox build.

 % cat test.ii
extern "C" struct JSObject;

template < class T > class HeapPtr
{
};

struct PendingProxyOperation {
    JSObject *object;
};
struct ThreadData {
    PendingProxyOperation *pendingProxyOperation;
};
struct JSThread {
    ThreadData data;
};
struct JSContext {
    JSThread *thread_;
};
class TypeConstraint
{
    virtual void newObjectState () {
    }
};
class TypeSet
{
    TypeConstraint *constraintList;
};
struct Property {
    TypeSet types;
};
struct Cell {
    Property **propertySet;
};
struct JSObject:Cell {
};
bool
IndexToId ()
{
    return 0;
    bool IndexToIdSlow (JSContext);
}

 % c++ -flto test.ii
test.ii: In function ‘IndexToId()’:
test.ii:41:1: internal compiler error: Segmentation fault
Please submit a full bug report

Program received signal SIGSEGV, Segmentation fault.
[Switching to process 16149]
0x0000000000b89c40 in
lto_varpool_encoder_encode_initializer_p(lto_varpool_encoder_d*, varpool_node*)
()
(gdb) bt
#0  0x0000000000b89c40 in
lto_varpool_encoder_encode_initializer_p(lto_varpool_encoder_d*, varpool_node*)
()
#1  0x0000000000957790 in lto_output_tree(output_block*, tree_node*, bool) ()
#2  0x0000000000a1beab in streamer_write_tree_body(output_block*, tree_node*,
bool) ()
#3  0x0000000000957506 in lto_output_tree(output_block*, tree_node*, bool) ()
...

Reply via email to