From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2761 invoked by alias); 19 Feb 2014 14:08:12 -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 2557 invoked by uid 48); 19 Feb 2014 14:08:09 -0000 From: "trippels at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug ipa/60266] [4.9 Regression] ICE: in ipa_get_parm_lattices, at ipa-cp.c:261 during LibreOffice LTO build Date: Wed, 19 Feb 2014 14:08: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: trippels 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: 4.9.0 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-02/txt/msg01968.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60266 --- Comment #2 from Markus Trippelsdorf --- It's caused by mixing -O0 and -O2 with LTO: markus@x4 ~S % cat TableCopyHelper.ii namespace com { namespace sun { namespace star {} } } namespace css = com::sun::star; namespace com { namespace sun { namespace star { class A {}; template class C : A { public: interface_type *operator->(); }; } } typedef struct { } uno_Any; namespace sun { namespace star { class D : uno_Any {}; class B { virtual css::D m_fn1(); virtual void m_fn2(); virtual void m_fn3(); }; class F : css::B { virtual int m_fn4(); }; namespace sdb { namespace application { class XCopyTableWizard : css::F { public: virtual void m_fn5(); virtual void m_fn6(); }; } } } } using namespace com::sun::star; using namespace com::sun::star::sdb::application; void fn1(C &&) try { C a; a->m_fn6(); } catch (int &) { } } markus@x4 ~S % cat copytablewizard.ii namespace com { namespace sun { namespace star { class A {}; namespace sdb { namespace application { class XCopyTableWizard { virtual int m_fn1(); }; } } } } } class OPropertyArrayUsageHelper { public: virtual ~OPropertyArrayUsageHelper(); }; using com::sun::star::A; using com::sun::star::sdb::application::XCopyTableWizard; class CopyTableWizard : XCopyTableWizard, OPropertyArrayUsageHelper { ~CopyTableWizard(); }; CopyTableWizard::~CopyTableWizard() try {} catch (A &) { } markus@x4 ~S % g++ -flto -fPIC -O0 -c copytablewizard.ii markus@x4 ~S % g++ -flto -fPIC -std=gnu++11 -O2 -c TableCopyHelper.ii markus@x4 ~S % g++ -w -r -nostdlib -O2 TableCopyHelper.o copytablewizard.o lto1: internal compiler error: in ipa_get_parm_lattices, at ipa-cp.c:261 0x50c7ac ipa_get_parm_lattices ../../gcc/gcc/ipa-cp.c:261 0xc41824 ipa_get_parm_lattices ../../gcc/gcc/ipa-cp.c:261 0xc41824 propagate_constants_accross_call ../../gcc/gcc/ipa-cp.c:1443 0xc44308 propagate_constants_topo ../../gcc/gcc/ipa-cp.c:2231 0xc44308 ipcp_propagate_stage ../../gcc/gcc/ipa-cp.c:2327 0xc44308 ipcp_driver ../../gcc/gcc/ipa-cp.c:3705 0xc44308 execute ../../gcc/gcc/ipa-cp.c:3804 Please submit a full bug report, with preprocessed source if appropriate. (I think the ODR violation got introduced during reduction.)