https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64149 Bug ID: 64149 Summary: -mno-lra bitrots, suggest to remove for GCC 5 Product: gcc Version: 5.0 Status: UNCONFIRMED Keywords: ice-on-valid-code Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: rguenth at gcc dot gnu.org Target: aarch64 I suggest to remove -mno-lra support from AARCH64 for GCC 5. When trying to reproduce a 4.8/4.9 ICE on trunk I now run into an earlier ICE /abuild/rguenther/obj-aarch64-g/gcc/cc1plus -quiet wxe_funcs.i -O2 -fPIC -w -I /abuild/rguenther/obj-aarch64-g/gcc/include -g -fstack-protector -funwind-tables -fasynchronous-unwind-tables -fno-strict-aliasing -fomit-frame-pointer -mno-lra In file included from /usr/include/wx-3.0/wx/grid.h:14:0, from gen/../wxe_return.h:37, from gen/wxe_funcs.cpp:25: /usr/include/wx-3.0/wx/generic/grid.h: In constructor ‘wxGrid::wxGrid()’: /usr/include/wx-3.0/wx/generic/grid.h:935:24: internal compiler error: in insert_save, at caller-save.c:1338 0x8826fd insert_save /space/rguenther/src/svn/trunk/gcc/caller-save.c:1337 0x8826fd save_call_clobbered_regs() /space/rguenther/src/svn/trunk/gcc/caller-save.c:875 0xc0bb41 reload(rtx_insn*, int) /space/rguenther/src/svn/trunk/gcc/reload1.c:1008 0xaf457d do_reload /space/rguenther/src/svn/trunk/gcc/ira.c:5403 0xaf457d execute /space/rguenther/src/svn/trunk/gcc/ira.c:5561 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See for instructions. where I suppose the ports reload support simply bitrotted. >From gcc-bugs-return-469194-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Tue Dec 02 12:33:54 2014 Return-Path: Delivered-To: listarch-gcc-bugs@gcc.gnu.org Received: (qmail 3597 invoked by alias); 2 Dec 2014 12:33:54 -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 Delivered-To: mailing list gcc-bugs@gcc.gnu.org Received: (qmail 3568 invoked by uid 48); 2 Dec 2014 12:33:50 -0000 From: "marc at kdab dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/64150] New: Missed optimisation opportunity with moved-from pimpl classes and a nullptr d-pointer Date: Tue, 02 Dec 2014 12:33:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: unknown X-Bugzilla-Keywords: X-Bugzilla-Severity: enhancement X-Bugzilla-Who: marc at kdab dot com 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: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter attachments.created Message-ID: 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-12/txt/msg00201.txt.bz2 Content-length: 1400 https://gcc.gnu.org/bugzilla/show_bug.cgi?idd150 Bug ID: 64150 Summary: Missed optimisation opportunity with moved-from pimpl classes and a nullptr d-pointer Product: gcc Version: unknown Status: UNCONFIRMED Severity: enhancement Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: marc at kdab dot com Created attachment 34162 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id4162&actioníit Sample program When compiling attached sample program to assembler source, the compiler emits two calls to destroy(), one for p1 and one for p2. However, it should be statically clear that p1.d == nullptr, always, so dead code elimination should remove the check for nullptr, the branch and the call to destroy(). $ g++ -v Using built-in specs. COLLECT_GCC=g++ COLLECT_LTO_WRAPPER=/opt/gcc/trunk/libexec/gcc/x86_64-unknown-linux-gnu/5.0.0/lto-wrapper Target: x86_64-unknown-linux-gnu Configured with: ../gcc/configure --prefix=/opt/gcc/trunk --program-suffix=-trunk --enable-checking=release --enable-languages=c,c++,go,fortran,objc,obj-c++ : (reconfigured) ../gcc/configure --prefix=/opt/gcc/trunk --enable-checking=release --enable-languages=c,c++,go,fortran,objc,obj-c++ Thread model: posix gcc version 5.0.0 20141015 (experimental) (GCC)