On Tue, May 09, 2017 at 04:17:07PM +0300, Ville Voutilainen wrote: > On 9 May 2017 at 16:12, Marc Glisse <marc.gli...@inria.fr> wrote: > > On Tue, 9 May 2017, Ville Voutilainen wrote: > > > >> Tested on Linux-x64, not tested with the full suite yet. > >> > >> 2017-05-09 Ville Voutilainen <ville.voutilai...@gmail.com> > >> > >> gcc/ > >> > >> PR c++/80682 > >> * cp/method.c (is_trivially_xible): Reject void types.
No cp/ in cp/ChangeLog entries. > >> testsuite/ > >> > >> PR c++/80682 > >> * g++.dg/ext/is_trivially_constructible1.C: Add tests for void target. > > > > > > What happens for "const void" and other variants? > > > They don't work. New patch attached. > diff --git a/gcc/cp/method.c b/gcc/cp/method.c > index b4c1f60..9b17ef1 100644 > --- a/gcc/cp/method.c > +++ b/gcc/cp/method.c > @@ -1207,6 +1207,8 @@ constructible_expr (tree to, tree from) > bool > is_trivially_xible (enum tree_code code, tree to, tree from) > { > + if (cv_unqualified (to) == void_type_node) > + return false; Can't this be checked more cheaply as if (TYPE_MAIN_VARIANT (to) == void_type_node) ? Jakub