public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "thibaut.lutz at googlemail dot com" <gcc-bugzilla@gcc.gnu.org>
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 [thread overview]
Message-ID: <bug-61362-4-2nLjLlBNsw@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-61362-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61362
--- Comment #6 from Thibaut LUTZ <thibaut.lutz at googlemail dot com> ---
My previous test cases still fails with 6.0.0 20151012 on linux64.
It passes with "-std=c++11".
Fails with "-std=c++14", "-std=c++17", "-std=c++1y".
Same error:
prog.cc: In instantiation of ‘struct S<int>::<lambda()>’:
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: <gcc-bugs-return-499313-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
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: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
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" <gcc-bugzilla@gcc.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: <bug-67929-4@http.gcc.gnu.org/bugzilla/>
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?idg929
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.
prev parent reply other threads:[~2015-10-12 10:53 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-29 22:00 [Bug c++/61362] New: " dgront at chem dot uw.edu.pl
2014-05-29 22:01 ` [Bug c++/61362] " dgront at chem dot uw.edu.pl
2014-05-30 15:07 ` daniel.kruegler at googlemail dot com
2014-05-30 15:14 ` daniel.kruegler at googlemail dot com
2014-06-26 17:10 ` paolo.carlini at oracle dot com
2015-03-07 10:46 ` thibaut.lutz at googlemail dot com
2015-10-11 19:32 ` ville.voutilainen at gmail dot com
2015-10-11 19:41 ` ville.voutilainen at gmail dot com
2015-10-12 10:53 ` thibaut.lutz at googlemail dot com [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=bug-61362-4-2nLjLlBNsw@http.gcc.gnu.org/bugzilla/ \
--to=gcc-bugzilla@gcc.gnu.org \
--cc=gcc-bugs@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).