public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/63885] New: ICE in static assert of constexpr forwarding xvalue container member rvalue reference
@ 2014-11-15 8:48 listcrawler at gmail dot com
2014-11-18 11:41 ` [Bug c++/63885] [5 Regression] " paolo.carlini at oracle dot com
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: listcrawler at gmail dot com @ 2014-11-15 8:48 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63885
Bug ID: 63885
Summary: ICE in static assert of constexpr forwarding xvalue
container member rvalue reference
Product: gcc
Version: 5.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: listcrawler at gmail dot com
Created attachment 33983
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=33983&action=edit
preprocessed source file
Internal compiler error in static assert of constexpr forwarding xvalue
container member rvalue reference.
g++ 4.8 and 4.9 passes, but trunk built from r217559 on ubuntu 14.04 fails
compilation with
$ g++-trunk -std=c++11 -Wall -Wextra constexpr_static_assert.ii
constexpr_static_assert.cpp:50:39: in constexpr expansion of ‘get<0, S<int&&>
>((* & S<int&&>((* &1))))’
constexpr_static_assert.cpp:35:35: in constexpr expansion of ‘__get<0,
T>::value<S<int&&>&&>((* & std::forward<S<int&&> >((* & arg))))’
constexpr_static_assert.cpp:50:44: internal compiler error: in
verify_ctor_sanity, at cp/constexpr.c:1779
static_assert (get <0> (S <int &&> (1)) == 1, ""); // g++ 4.9 passes, g++
trunk r217559 fails
...
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
//
// source
//
#include <utility>
using namespace std;
///////////////////////////////////////////////////////////////////////////////
template <typename C> struct member_forward
{
typedef typename remove_reference <C>::type::type T;
typedef typename conditional
<
is_lvalue_reference <C &&>::value && not is_reference <T>::value,
typename add_lvalue_reference <T>::type,
T
>::type type;
};
template <typename C> using member_forward_t = typename member_forward
<C>::type;
///////////////////////////////////////////////////////////////////////////////
template <int , typename > struct __get;
template < typename T> struct __get <0, T>
{
constexpr static auto value (T arg)
-> decltype ((forward <member_forward_t <T>> (arg.t)))
{
return forward <member_forward_t <T>> (arg.t);
}
};
template <int N, typename T> constexpr auto get (T && arg)
-> decltype (__get <N, T &&>::value (forward <T> (arg)))
{
return __get <N, T &&>::value (forward <T> (arg));
}
///////////////////////////////////////////////////////////////////////////////
template <typename T> struct S
{
typedef T type;
T t;
template <typename U> constexpr S (U && u) : t (forward <U> (u)) {}
};
///////////////////////////////////////////////////////////////////////////////
static_assert (get <0> (S <int &&> (1)) == 1, ""); // g++ 4.9 passes, g++ trunk
r217559 fails
int main () {}
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
>From gcc-bugs-return-466841-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Sat Nov 15 08:59:20 2014
Return-Path: <gcc-bugs-return-466841-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 21010 invoked by alias); 15 Nov 2014 08:59:19 -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 20983 invoked by uid 48); 15 Nov 2014 08:59:15 -0000
From: "trippels at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug driver/63837] [5 Regression] r217391 causes kernel build errors with GCC_COMPARE_DEBUG=1
Date: Sat, 15 Nov 2014 08:59:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: driver
X-Bugzilla-Version: 5.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: trippels at gcc dot gnu.org
X-Bugzilla-Status: NEW
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: 5.0
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields:
Message-ID: <bug-63837-4-BeqYyvnWr1@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-63837-4@http.gcc.gnu.org/bugzilla/>
References: <bug-63837-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: 2014-11/txt/msg01313.txt.bz2
Content-length: 711
https://gcc.gnu.org/bugzilla/show_bug.cgi?idc837
--- Comment #9 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
(In reply to Andrew Pinski from comment #8)
> I bet this is really the same as bug 63881. The kernel is using /dev/null
> for both the input and output when testing if the options work.
No. From scripts/Kbuild.include:
126 # cc-disable-warning
127 # Usage: cflags-y += $(call cc-disable-warning,unused-but-set-variable)
128 cc-disable-warning = $(call try-run,\
129 $(CC) $(KBUILD_CPPFLAGS) $(KBUILD_CFLAGS) -W$(strip $(1)) -c -x c
/dev/null -o "$$TMP",-Wno-$(strip $(1)))
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/63885] [5 Regression] ICE in static assert of constexpr forwarding xvalue container member rvalue reference
2014-11-15 8:48 [Bug c++/63885] New: ICE in static assert of constexpr forwarding xvalue container member rvalue reference listcrawler at gmail dot com
@ 2014-11-18 11:41 ` paolo.carlini at oracle dot com
2014-11-19 13:30 ` rguenth at gcc dot gnu.org
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: paolo.carlini at oracle dot com @ 2014-11-18 11:41 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63885
Paolo Carlini <paolo.carlini at oracle dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2014-11-18
Summary|ICE in static assert of |[5 Regression] ICE in
|constexpr forwarding xvalue |static assert of constexpr
|container member rvalue |forwarding xvalue container
|reference |member rvalue reference
Ever confirmed|0 |1
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/63885] [5 Regression] ICE in static assert of constexpr forwarding xvalue container member rvalue reference
2014-11-15 8:48 [Bug c++/63885] New: ICE in static assert of constexpr forwarding xvalue container member rvalue reference listcrawler at gmail dot com
2014-11-18 11:41 ` [Bug c++/63885] [5 Regression] " paolo.carlini at oracle dot com
@ 2014-11-19 13:30 ` rguenth at gcc dot gnu.org
2014-11-19 22:07 ` jason at gcc dot gnu.org
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu.org @ 2014-11-19 13:30 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63885
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |5.0
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/63885] [5 Regression] ICE in static assert of constexpr forwarding xvalue container member rvalue reference
2014-11-15 8:48 [Bug c++/63885] New: ICE in static assert of constexpr forwarding xvalue container member rvalue reference listcrawler at gmail dot com
2014-11-18 11:41 ` [Bug c++/63885] [5 Regression] " paolo.carlini at oracle dot com
2014-11-19 13:30 ` rguenth at gcc dot gnu.org
@ 2014-11-19 22:07 ` jason at gcc dot gnu.org
2014-11-20 3:37 ` jason at gcc dot gnu.org
2014-11-20 17:17 ` listcrawler at gmail dot com
4 siblings, 0 replies; 6+ messages in thread
From: jason at gcc dot gnu.org @ 2014-11-19 22:07 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63885
--- Comment #1 from Jason Merrill <jason at gcc dot gnu.org> ---
Author: jason
Date: Wed Nov 19 22:06:26 2014
New Revision: 217815
URL: https://gcc.gnu.org/viewcvs?rev=217815&root=gcc&view=rev
Log:
PR c++/63885
* constexpr.c (cxx_eval_constant_expression) [PARM_DECL]: Don't
complain yet about a reference.
[TARGET_EXPR]: Handle TARGET_EXPR with addr == true.
[ADDR_EXPR]: Make sure we don't take the address of a CONSTRUCTOR.
(cxx_bind_parameters_in_call): In the new scheme addr is always false.
* typeck.c (build_address): Don't take the address of a CONSTRUCTOR.
Added:
trunk/gcc/testsuite/g++.dg/cpp0x/constexpr-ref8.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/constexpr.c
trunk/gcc/cp/typeck.c
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/63885] [5 Regression] ICE in static assert of constexpr forwarding xvalue container member rvalue reference
2014-11-15 8:48 [Bug c++/63885] New: ICE in static assert of constexpr forwarding xvalue container member rvalue reference listcrawler at gmail dot com
` (2 preceding siblings ...)
2014-11-19 22:07 ` jason at gcc dot gnu.org
@ 2014-11-20 3:37 ` jason at gcc dot gnu.org
2014-11-20 17:17 ` listcrawler at gmail dot com
4 siblings, 0 replies; 6+ messages in thread
From: jason at gcc dot gnu.org @ 2014-11-20 3:37 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63885
Jason Merrill <jason at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
CC| |jason at gcc dot gnu.org
Resolution|--- |FIXED
Assignee|unassigned at gcc dot gnu.org |jason at gcc dot gnu.org
--- Comment #2 from Jason Merrill <jason at gcc dot gnu.org> ---
Fixed.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/63885] [5 Regression] ICE in static assert of constexpr forwarding xvalue container member rvalue reference
2014-11-15 8:48 [Bug c++/63885] New: ICE in static assert of constexpr forwarding xvalue container member rvalue reference listcrawler at gmail dot com
` (3 preceding siblings ...)
2014-11-20 3:37 ` jason at gcc dot gnu.org
@ 2014-11-20 17:17 ` listcrawler at gmail dot com
4 siblings, 0 replies; 6+ messages in thread
From: listcrawler at gmail dot com @ 2014-11-20 17:17 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63885
--- Comment #3 from listcrawler at gmail dot com ---
I tested the latest revision this morning and all my tests passed. Thanks!
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2014-11-20 17:17 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-11-15 8:48 [Bug c++/63885] New: ICE in static assert of constexpr forwarding xvalue container member rvalue reference listcrawler at gmail dot com
2014-11-18 11:41 ` [Bug c++/63885] [5 Regression] " paolo.carlini at oracle dot com
2014-11-19 13:30 ` rguenth at gcc dot gnu.org
2014-11-19 22:07 ` jason at gcc dot gnu.org
2014-11-20 3:37 ` jason at gcc dot gnu.org
2014-11-20 17:17 ` listcrawler at gmail dot com
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).