public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug ipa/60727] New: ICE in ipcp_verify_propagated_values, at ipa-cp.c:892
@ 2014-04-01  9:40 rguenth at gcc dot gnu.org
  2014-04-01  9:41 ` [Bug ipa/60727] " rguenth at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: rguenth at gcc dot gnu.org @ 2014-04-01  9:40 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 60727
           Summary: ICE in ipcp_verify_propagated_values, at ipa-cp.c:892
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: ipa
          Assignee: unassigned at gcc dot gnu.org
          Reporter: rguenth at gcc dot gnu.org
                CC: jamborm at gcc dot gnu.org

Created attachment 32511
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=32511&action=edit
testcase

Compiling libqt4 with -flto and r208807 yields

> g++-4.9 JSCell.ii -flto -O2 -fvisibility=hidden -shared -nostdlib
lto1: internal compiler error: in ipcp_verify_propagated_values, at
ipa-cp.c:892
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://bugs.opensuse.org/> for instructions.
lto-wrapper: g++-4.9 returned 1 exit status
/usr/lib64/gcc/x86_64-suse-linux/4.9/../../../../x86_64-suse-linux/bin/ld:
lto-wrapper failed
collect2: error: ld returned 1 exit status


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug ipa/60727] ICE in ipcp_verify_propagated_values, at ipa-cp.c:892
  2014-04-01  9:40 [Bug ipa/60727] New: ICE in ipcp_verify_propagated_values, at ipa-cp.c:892 rguenth at gcc dot gnu.org
@ 2014-04-01  9:41 ` rguenth at gcc dot gnu.org
  2014-04-01 11:03 ` rguenth at gcc dot gnu.org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu.org @ 2014-04-01  9:41 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
eventually this is already fixed (cannot reproduce in my development tree - but
that has a load of patches, including LTO ones).


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug ipa/60727] ICE in ipcp_verify_propagated_values, at ipa-cp.c:892
  2014-04-01  9:40 [Bug ipa/60727] New: ICE in ipcp_verify_propagated_values, at ipa-cp.c:892 rguenth at gcc dot gnu.org
  2014-04-01  9:41 ` [Bug ipa/60727] " rguenth at gcc dot gnu.org
@ 2014-04-01 11:03 ` rguenth at gcc dot gnu.org
  2014-04-01 16:34 ` jamborm at gcc dot gnu.org
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu.org @ 2014-04-01 11:03 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
Can be reproduced with http://gcc.gnu.org/ml/gcc-patches/2014-03/msg01237.html
ontop of r208807 and the following reduced testcase:

typedef long unsigned int size_t;
class JSCell;
class JSObject;
class X;
class JSValue {
public:
    JSValue(JSCell* ptr);
};
class MarkStack{ };
class I { };
class JSCell {
    friend class JSObject;
    virtual JSObject* toObject() const;
    bool fastGetOwnX(const I& propertyName, X&);
    virtual bool getOwnX(const I& propertyName, X&);
};
class X {
public:
    typedef JSValue (*GetValueFunc)(const I&, const X&);
    void setValueSlot(JSValue, JSValue*, size_t) { m_getValue = 0; }
    GetValueFunc m_getValue;
};
class JSObject : public JSCell {
    friend class JSCell;
    virtual void markChildren(MarkStack&);
    bool getX(const I& propertyName, X&);
    virtual bool getOwnX(const I& propertyName, X&);
    bool inlineGetOwnX(const I& propertyName, X&);
};
inline __attribute__((__always_inline__)) bool
JSObject::inlineGetOwnX(const I& propertyName, X& slot)
{
    slot.setValueSlot(this, 0, 0);
}
inline __attribute__((__always_inline__)) bool
JSObject::getOwnX(const I& propertyName, X& slot)
{
    return inlineGetOwnX(propertyName, slot);
}
inline __attribute__((__always_inline__)) bool
JSCell::fastGetOwnX(const I& propertyName, X& slot)
{
    return getOwnX(propertyName, slot);
}
inline __attribute__((__always_inline__)) bool
JSObject::getX(const I& propertyName, X& slot)
{
    this->fastGetOwnX(propertyName, slot);
}
bool JSCell::getOwnX(const I& identifier, X& slot)
{
    JSObject* object = toObject();
    object->getX(identifier, slot);
}

I suppose that patch either pulls the bodies from IPA-CP at some bogus
time or ends up with cgraph nodes confusing IPA-CP.  Needs -flto only
because the patch changes the -flto path only (as opposed to Honzas proposed
change in that thread that doesn't fix the issue).  Somehow the patch
doesn't trigger the same issue on trunk though.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug ipa/60727] ICE in ipcp_verify_propagated_values, at ipa-cp.c:892
  2014-04-01  9:40 [Bug ipa/60727] New: ICE in ipcp_verify_propagated_values, at ipa-cp.c:892 rguenth at gcc dot gnu.org
  2014-04-01  9:41 ` [Bug ipa/60727] " rguenth at gcc dot gnu.org
  2014-04-01 11:03 ` rguenth at gcc dot gnu.org
@ 2014-04-01 16:34 ` jamborm at gcc dot gnu.org
  2014-04-01 17:41 ` jamborm at gcc dot gnu.org
  2014-04-07 10:20 ` jamborm at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: jamborm at gcc dot gnu.org @ 2014-04-01 16:34 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Martin Jambor <jamborm at gcc dot gnu.org> ---
What happens is that we do not remove an unreachable cgraph_node.  We
don't do it because the node has used_from_other_partition set which I
assume is always bogus at the beginning of WPA (moreover, the node is
also local).  I'll have a look why exactly that happens.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug ipa/60727] ICE in ipcp_verify_propagated_values, at ipa-cp.c:892
  2014-04-01  9:40 [Bug ipa/60727] New: ICE in ipcp_verify_propagated_values, at ipa-cp.c:892 rguenth at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2014-04-01 16:34 ` jamborm at gcc dot gnu.org
@ 2014-04-01 17:41 ` jamborm at gcc dot gnu.org
  2014-04-07 10:20 ` jamborm at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: jamborm at gcc dot gnu.org @ 2014-04-01 17:41 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Martin Jambor <jamborm at gcc dot gnu.org> ---
OK, the bit is actually calculated when streaming the node out (ugh)
in the following way:

  bp_pack_value (&bp, tag == LTO_symtab_analyzed_node
         && symtab_get_symbol_partitioning_class (node) == SYMBOL_PARTITION
         && (reachable_from_other_partition_p (node, encoder)
             || referenced_from_other_partition_p (&node->ref_list,
                               encoder)), 1);

and with the patch, reachable_from_other_partition_p returns true
because it goes over all callers and if it does not find one in the
encoder it assumes it is in another partition.  The one caller is an
always_inline function that is not streamed after being squashed.

Honza told me on IRC that he would come up with a different patch to
fix the FORTIFY_SOURCE issue so I guess we don't need to fix this.
Otherwise we'd need to aff !flag_wpa or some such thing to the
condition.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug ipa/60727] ICE in ipcp_verify_propagated_values, at ipa-cp.c:892
  2014-04-01  9:40 [Bug ipa/60727] New: ICE in ipcp_verify_propagated_values, at ipa-cp.c:892 rguenth at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2014-04-01 17:41 ` jamborm at gcc dot gnu.org
@ 2014-04-07 10:20 ` jamborm at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: jamborm at gcc dot gnu.org @ 2014-04-07 10:20 UTC (permalink / raw)
  To: gcc-bugs

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

Martin Jambor <jamborm at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |WONTFIX

--- Comment #5 from Martin Jambor <jamborm at gcc dot gnu.org> ---
The patch causing this did not get committed, the bug it was intended
to fix was fixed a by a different patch, which also adds asserts to
guard against this problem:

http://gcc.gnu.org/ml/gcc-patches/2014-04/msg00179.html


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2014-04-07 10:20 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-01  9:40 [Bug ipa/60727] New: ICE in ipcp_verify_propagated_values, at ipa-cp.c:892 rguenth at gcc dot gnu.org
2014-04-01  9:41 ` [Bug ipa/60727] " rguenth at gcc dot gnu.org
2014-04-01 11:03 ` rguenth at gcc dot gnu.org
2014-04-01 16:34 ` jamborm at gcc dot gnu.org
2014-04-01 17:41 ` jamborm at gcc dot gnu.org
2014-04-07 10:20 ` jamborm at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).