public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/67686] New: [concepts] segfault in finish_call_expr function
@ 2015-09-22 23:27 ryan.burn at gmail dot com
2015-09-23 7:53 ` [Bug c++/67686] " trippels at gcc dot gnu.org
2015-09-28 7:58 ` trippels at gcc dot gnu.org
0 siblings, 2 replies; 3+ messages in thread
From: ryan.burn at gmail dot com @ 2015-09-22 23:27 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67686
Bug ID: 67686
Summary: [concepts] segfault in finish_call_expr function
Product: gcc
Version: 6.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: ryan.burn at gmail dot com
Target Milestone: ---
Created attachment 36372
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=36372&action=edit
preprocessed code
The attached code causes a segfault with gcc 6.0 when compiling with
-std=c++1z. Here's the stack trace:
In file included from
/home/rnburn/proj/echo/htl/include/echo/htl/algorithm.h:10:0,
from /home/rnburn/proj/echo/htl/unittest/algorithm.cpp:1:
/home/rnburn/proj/echo/htl/include/echo/htl/concept.h: In instantiation of
‘constexpr const bool echo::htl::detail_concept::mappable_elements’:
/home/rnburn/proj/echo/htl/include/echo/htl/concept.h:70:22: required from
‘constexpr const bool echo::htl::detail_concept::mappable_impl’
/home/rnburn/proj/echo/htl/unittest/algorithm.cpp:60:23: required from here
/home/rnburn/proj/echo/htl/include/echo/htl/concept.h:40:66: internal compiler
error: Segmentation fault
requires cpt_CopyConstructible<decltype(std::forward<Functor>(functor)(
^
0xcacfef crash_signal
../../gcc/gcc/toplev.c:352
0x5edf35 resolve_args
../../gcc/gcc/cp/call.c:3951
0x60627d build_op_call_1
../../gcc/gcc/cp/call.c:4287
0x60627d build_op_call(tree_node*, vec<tree_node*, va_gc, vl_embed>**, int)
../../gcc/gcc/cp/call.c:4390
0x7901ba finish_call_expr(tree_node*, vec<tree_node*, va_gc, vl_embed>**, bool,
bool, int)
../../gcc/gcc/cp/semantics.c:2408
0x68131f tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool,
bool)
../../gcc/gcc/cp/pt.c:15872
0x661a6c tsubst(tree_node*, tree_node*, int, tree_node*)
../../gcc/gcc/cp/pt.c:13138
0x67cd12 tsubst_template_args
../../gcc/gcc/cp/pt.c:10839
0x660054 tsubst_aggr_type
../../gcc/gcc/cp/pt.c:11036
0x6621dc tsubst(tree_node*, tree_node*, int, tree_node*)
../../gcc/gcc/cp/pt.c:12505
0x67e7ea tsubst_qualified_id
../../gcc/gcc/cp/pt.c:13335
0x68081b tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool,
bool)
../../gcc/gcc/cp/pt.c:15452
0x66aad1 tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool)
../../gcc/gcc/cp/pt.c:15044
0x823207 satisfy_predicate_constraint
../../gcc/gcc/cp/constraint.cc:1694
0x823207 satisfy_constraint_1
../../gcc/gcc/cp/constraint.cc:1898
0x8235cd satisfy_parameterized_constraint
../../gcc/gcc/cp/constraint.cc:1841
0x8235cd satisfy_constraint_1
../../gcc/gcc/cp/constraint.cc:1916
0x823f76 satisfy_constraint
../../gcc/gcc/cp/constraint.cc:1949
0x605b94 build_new_function_call(tree_node*, vec<tree_node*, va_gc,
vl_embed>**, bool, int)
../../gcc/gcc/cp/call.c:4130
0x78ff5e finish_call_expr(tree_node*, vec<tree_node*, va_gc, vl_embed>**, bool,
bool, int)
../../gcc/gcc/cp/semantics.c:2391
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.
>From gcc-bugs-return-497838-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Tue Sep 22 23:38:49 2015
Return-Path: <gcc-bugs-return-497838-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 70644 invoked by alias); 22 Sep 2015 23:38:49 -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 70601 invoked by uid 48); 22 Sep 2015 23:38:45 -0000
From: "ramana at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/67321] [ARM] Exploit Wide Add operations when appropriate
Date: Tue, 22 Sep 2015 23:38: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: 6.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: enhancement
X-Bugzilla-Who: ramana at gcc dot gnu.org
X-Bugzilla-Status: ASSIGNED
X-Bugzilla-Resolution:
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: michael.collison at linaro dot org
X-Bugzilla-Target-Milestone: 6.0
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: bug_status cf_reconfirmed_on cc assigned_to target_milestone everconfirmed bug_severity
Message-ID: <bug-67321-4-NGzMyyHnY8@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-67321-4@http.gcc.gnu.org/bugzilla/>
References: <bug-67321-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-09/txt/msg01816.txt.bz2
Content-length: 778
https://gcc.gnu.org/bugzilla/show_bug.cgi?idg321
Ramana Radhakrishnan <ramana at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |ASSIGNED
Last reconfirmed| |2015-09-22
CC| |ramana at gcc dot gnu.org
Assignee|unassigned at gcc dot gnu.org |michael.collison at linaro dot org
Target Milestone|--- |6.0
Ever confirmed|0 |1
Severity|normal |enhancement
--- Comment #2 from Ramana Radhakrishnan <ramana at gcc dot gnu.org> ---
Confirmed.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug c++/67686] [concepts] segfault in finish_call_expr function
2015-09-22 23:27 [Bug c++/67686] New: [concepts] segfault in finish_call_expr function ryan.burn at gmail dot com
@ 2015-09-23 7:53 ` trippels at gcc dot gnu.org
2015-09-28 7:58 ` trippels at gcc dot gnu.org
1 sibling, 0 replies; 3+ messages in thread
From: trippels at gcc dot gnu.org @ 2015-09-23 7:53 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67686
Markus Trippelsdorf <trippels at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2015-09-23
CC| |trippels at gcc dot gnu.org
Ever confirmed|0 |1
--- Comment #1 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
This is what creduce came up with:
typedef int size_t;
template <typename> struct is_copy_constructible;
template <typename> struct remove_reference;
template <typename _Tp> struct remove_reference<_Tp &> { typedef _Tp type; };
template <typename> void forward();
template <size_t... _Indexes> struct A {
typedef A<0, sizeof...(_Indexes)> __next;
};
template <size_t _Num> struct B {
typedef typename B<_Num - 1>::__type::__next __type;
};
template <> struct B<0> { typedef A<> __type; };
template <typename _Tp, _Tp...> struct C;
template <typename, typename = B<1>::__type> struct D;
template <typename _Tp, size_t... _Idx> struct D<_Tp, A<_Idx...>> {
typedef C<_Tp, _Idx...> __type;
};
template <typename _Tp, _Tp>
using make_integer_sequence = typename D<_Tp>::__type;
template <size_t... _Idx> using index_sequence = C<size_t, _Idx...>;
template <size_t> using make_index_sequence = make_integer_sequence<size_t, 0>;
template <int> void and_c();
template <class X> concept bool cpt_CopyConstructible() {
return is_copy_constructible<X>::value;
}
template <class T> using uncvref_t = typename remove_reference<T>::type;
template <class...> class Tuple {};
auto make_tuple() { return Tuple<>(); }
template <class> size_t num_elements;
template <class... Values>
constexpr size_t num_elements<Tuple<Values...>> = sizeof...(Values);
template <size_t, class... TupleForwards> concept bool cpt_MappableElement() {
return requires(TupleForwards... tuples){requires cpt_CopyConstructible<
decltype(forward(forward<TupleForwards>(tuples)...))>()};
}
template <class...> int mappable_elements;
template <int... Indexes, class Functor, class... TupleForwards>
int mappable_elements<index_sequence<Indexes...>, Functor, TupleForwards...> =
and_c<cpt_MappableElement<Indexes>()...>;
template <class...> int mappable_impl;
template <class Functor, class TupleForwardFirst, class... TupleForwardsRest>
int mappable_impl<Functor, TupleForwardFirst, TupleForwardsRest...> =
mappable_elements<
make_index_sequence<num_elements<uncvref_t<TupleForwardFirst>>>,
TupleForwardFirst>;
template <class Functor, class... TupleForwards> concept bool cpt_Mappable() {
return mappable_impl<Functor, TupleForwards...>;
}
cpt_Mappable { Functor, ... TupleForwards }
auto map(Functor, TupleForwards &&...);
auto t1 = make_tuple();
auto f1 = map(0, t1)
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug c++/67686] [concepts] segfault in finish_call_expr function
2015-09-22 23:27 [Bug c++/67686] New: [concepts] segfault in finish_call_expr function ryan.burn at gmail dot com
2015-09-23 7:53 ` [Bug c++/67686] " trippels at gcc dot gnu.org
@ 2015-09-28 7:58 ` trippels at gcc dot gnu.org
1 sibling, 0 replies; 3+ messages in thread
From: trippels at gcc dot gnu.org @ 2015-09-28 7:58 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67686
--- Comment #2 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
*** Bug 67737 has been marked as a duplicate of this bug. ***
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-09-28 7:58 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-09-22 23:27 [Bug c++/67686] New: [concepts] segfault in finish_call_expr function ryan.burn at gmail dot com
2015-09-23 7:53 ` [Bug c++/67686] " trippels at gcc dot gnu.org
2015-09-28 7:58 ` trippels at gcc dot gnu.org
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).