From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31976 invoked by alias); 26 Aug 2014 21:48:53 -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 31897 invoked by uid 48); 26 Aug 2014 21:48:44 -0000 From: "daniel.kruegler at googlemail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/62241] C++14 generalized lambda capture doesn't work with uniform initialization syntax. Date: Tue, 26 Aug 2014 21:48:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 4.9.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: daniel.kruegler at googlemail 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: cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-08/txt/msg01809.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D62241 Daniel Kr=C3=BCgler changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |daniel.kruegler@googlemail. | |com --- Comment #5 from Daniel Kr=C3=BCgler --- (In reply to Andrew Pinski from comment #2) > Have you tried 5.x yet? Trying 5.0.0 20140826 (experimental) the outcome is still the same rejection >>From gcc-bugs-return-459313-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Tue Aug 26 21:59:54 2014 Return-Path: Delivered-To: listarch-gcc-bugs@gcc.gnu.org Received: (qmail 6457 invoked by alias); 26 Aug 2014 21:59: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 6398 invoked by uid 48); 26 Aug 2014 21:59:50 -0000 From: "carrot at google dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/62262] aarch64 gcc generates invalid assembler Date: Tue, 26 Aug 2014 21:59:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 5.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: carrot at google dot com X-Bugzilla-Status: NEW 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-08/txt/msg01810.txt.bz2 Content-length: 1188 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62262 --- Comment #5 from Carrot --- (In reply to amker from comment #2) > (In reply to Andrew Pinski from comment #1) > > (insn 27 26 40 5 (set (reg:SI 73 [ D.2590 ]) > > (and:SI (ashift:SI (reg/v:SI 74 [ value ]) > > (const_int 32 [0x20])) > > (const_int 8388607 [0x7fffff]))) t7.c:13 611 > > {*andim_ashiftsi_bfiz} > > (expr_list:REG_DEAD (reg/v:SI 74 [ value ]) > > (nil))) > > > > Confirmed. > > > > "exact_log2 ((INTVAL (operands[3]) >> INTVAL (operands[2])) + 1) >= 0 > > && (INTVAL (operands[3]) & ((1 << INTVAL (operands[2])) - 1)) == 0" > > > > > > In fact we invoke undefined behavior inside the compiler too due to the > > shift there. > > Since it's undefined code, how should we handle it in GCC? Should we give > warning messages as accurate as possible? But that sounds impractical > either, since "value << 1" and "value <<= zeros" could be undefined too. Actually the original source code is guarded by assert, and the parameter passed to CLZ can be guaranteed not 0, so "value <<= zeros" is well defined in our original source code.