aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/frontend-passes.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2018-12-21 20:58:36 +0100
committerJakub Jelinek <jakub@gcc.gnu.org>2018-12-21 20:58:36 +0100
commit4cd3e7df0b7dc202d10ed7935918f1194adfc514 (patch)
treeed1257ff8ce1315fa49456373bd5eb9b09f61635 /gcc/fortran/frontend-passes.c
parentdca00617224cd24ba52555266d9d25f95fcb3fc4 (diff)
downloadgcc-4cd3e7df0b7dc202d10ed7935918f1194adfc514.zip
gcc-4cd3e7df0b7dc202d10ed7935918f1194adfc514.tar.gz
gcc-4cd3e7df0b7dc202d10ed7935918f1194adfc514.tar.bz2
re PR c++/86524 (std::less with pointer arguments not usable in static_assert in constexpr function)
PR c++/86524 PR c++/88446 * cp-tree.h (cp_fold_maybe_rvalue, cp_fold_rvalue): Declare. (fold_non_dependent_expr): Add manifestly_const_eval argument. * constexpr.c (cxx_eval_builtin_function_call): Evaluate __builtin_constant_p if ctx->manifestly_const_eval even in constexpr functions. Don't reuse dummy{1,2} vars between different arguments. Use cp_fold_rvalue instead of cp_fully_fold. Fix comment typo. (fold_non_dependent_expr): Add manifestly_const_eval argument, pass it through to cxx_eval_outermost_constant_expr and maybe_constant_value. * cp-gimplify.c (cp_fold_maybe_rvalue, cp_fold_rvalue): No longer static. * semantics.c (finish_static_assert): Call fold_non_dependent_expr with true as manifestly_const_eval. * g++.dg/cpp1y/constexpr-86524.C: New test. * g++.dg/cpp2a/is-constant-evaluated4.C: New test. * g++.dg/cpp2a/is-constant-evaluated5.C: New test. * g++.dg/cpp2a/is-constant-evaluated6.C: New test. From-SVN: r267341
Diffstat (limited to 'gcc/fortran/frontend-passes.c')
0 files changed, 0 insertions, 0 deletions