diff options
author | Jakub Jelinek <jakub@redhat.com> | 2019-03-22 15:40:59 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2019-03-22 15:40:59 +0100 |
commit | a15ffa22b5b541a385e509649dc39db59492bcdb (patch) | |
tree | 8606dad0f353d85630d41e4b1e4b709dce94fd2e /gcc/fortran/interface.c | |
parent | 29e0246c68efd4b68f9593ff26b3c123fb05161d (diff) | |
download | gcc-a15ffa22b5b541a385e509649dc39db59492bcdb.zip gcc-a15ffa22b5b541a385e509649dc39db59492bcdb.tar.gz gcc-a15ffa22b5b541a385e509649dc39db59492bcdb.tar.bz2 |
re PR c++/87481 (Endless loop with optimisation in C++17)
PR c++/87481
* doc/invoke.texi (-fconstexpr-ops-limit=): Document.
* c.opt (-fconstexpr-ops-limit=): New option.
* constexpr.c (struct constexpr_ctx): Add constexpr_ops_count member.
(cxx_eval_constant_expression): When not skipping, not constant class
or location wrapper, increment *ctx->constexpr_ops_count and if it is
above constexpr_loop_nest_limit, diagnose failure.
(cxx_eval_outermost_constant_expr): Add constexpr_ops_count and
initialize ctx.constexpr_ops_count to its address.
(is_sub_constant_expr): Likewise.
* g++.dg/cpp1y/constexpr-87481.C: New test.
From-SVN: r269874
Diffstat (limited to 'gcc/fortran/interface.c')
0 files changed, 0 insertions, 0 deletions