From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10032 invoked by alias); 12 Oct 2015 10:53:35 -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 9852 invoked by uid 48); 12 Oct 2015 10:53:31 -0000 From: "thibaut.lutz at googlemail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/61362] g++ (Ubuntu 4.8.2-19ubuntu1) 4.8.2 does not compile lambda with template Date: Mon, 12 Oct 2015 10:53: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.8.2 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: thibaut.lutz at googlemail dot com X-Bugzilla-Status: NEW X-Bugzilla-Resolution: 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: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-10/txt/msg00867.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D61362 --- Comment #6 from Thibaut LUTZ --- My previous test cases still fails with 6.0.0 20151012 on linux64. It passes with "-std=3Dc++11". Fails with "-std=3Dc++14", "-std=3Dc++17", "-std=3Dc++1y". Same error: prog.cc: In instantiation of =E2=80=98struct S::=E2=80=99: prog.cc:3:29: required from here prog.cc:3:10: internal compiler error: in tsubst_copy, at cp/pt.c:13708 int f{[this](){return 42;}()}; >>From gcc-bugs-return-499313-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Mon Oct 12 10:57:31 2015 Return-Path: Delivered-To: listarch-gcc-bugs@gcc.gnu.org Received: (qmail 19354 invoked by alias); 12 Oct 2015 10:57:31 -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 19331 invoked by uid 48); 12 Oct 2015 10:57:27 -0000 From: "ktkachov at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/67929] New: [4.9/5/6 Regression][arm] Wrong code for FP mult-by-power-of-2 + int conversion Date: Mon, 12 Oct 2015 10:57:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 6.0 X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: ktkachov at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: 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 keywords bug_severity priority component assigned_to reporter target_milestone cf_gcctarget 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: 2015-10/txt/msg00868.txt.bz2 Content-length: 1044 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67929 Bug ID: 67929 Summary: [4.9/5/6 Regression][arm] Wrong code for FP mult-by-power-of-2 + int conversion Product: gcc Version: 6.0 Status: UNCONFIRMED Keywords: wrong-code Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: ktkachov at gcc dot gnu.org Target Milestone: --- Target: arm* Testcase: int foo (float a) { return a * 4.9f; } int main (void) { if (foo (10.0f) != 49) __builtin_abort (); return 0; } Compiled with -Ofast -mfpu=vfpv3 -mfloat-abi=hard -mcpu=cortex-a15 -fno-inline aborts. The problem is foo (10.0f) returns 40. This is because the combine_vcvtf2i triggers where its predicate should have rejected 4.9f The vfp3_const_double_for_bits function in arm.c is too liberal and accepts any FP constant that, when truncated, evaluates to a power of 2 FP constant.