From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18414 invoked by alias); 1 Apr 2014 11:03:48 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 18367 invoked by uid 48); 1 Apr 2014 11:03:45 -0000 From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug ipa/60727] ICE in ipcp_verify_propagated_values, at ipa-cp.c:892 Date: Tue, 01 Apr 2014 11:03:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: ipa X-Bugzilla-Version: 4.9.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-04/txt/msg00038.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60727 --- Comment #2 from Richard Biener --- 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.