This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/71711] [6/7 Regression] ICE on valid C++1z code with fold expression: tree check: expected tree_vec, have expr_pack_expansion in tsubst_unary_left_fold, at cp/pt.c:10792


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71711

--- Comment #4 from Jason Merrill <jason at gcc dot gnu.org> ---
Author: jason
Date: Thu Jul 21 06:15:23 2016
New Revision: 238568

URL: https://gcc.gnu.org/viewcvs?rev=238568&root=gcc&view=rev
Log:
        PR c++/71711 - mangle C++1z fold-expressions.

gcc/cp/
        * operators.def: Add *_FOLD_EXPR.
        * cp-tree.h (FOLD_EXPR_P): Parenthesize.
        * mangle.c (write_expression): Handle fold-expressions.
        * pt.c (tsubst_unary_left_fold, tsubst_binary_left_fold)
        (tsubst_unary_right_fold, tsubst_binary_right_fold): Handle
        partial instantiation.
libiberty/
        * cp-demangle.c (cplus_demangle_operators): Add f[lrLR].
        (d_expression_1): Handle them.
        (d_maybe_print_fold_expression): New.
        (d_print_comp_inner): Use it.
        (d_index_template_argument): Handle negative index.

Added:
    branches/gcc-6-branch/gcc/testsuite/g++.dg/cpp1z/fold-mangle.C
Modified:
    branches/gcc-6-branch/gcc/cp/ChangeLog
    branches/gcc-6-branch/gcc/cp/cp-tree.h
    branches/gcc-6-branch/gcc/cp/mangle.c
    branches/gcc-6-branch/gcc/cp/operators.def
    branches/gcc-6-branch/gcc/cp/pt.c
    branches/gcc-6-branch/libiberty/ChangeLog
    branches/gcc-6-branch/libiberty/cp-demangle.c
    branches/gcc-6-branch/libiberty/testsuite/demangle-expected

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]