diff options
author | Marek Polacek <polacek@redhat.com> | 2018-09-07 14:12:48 +0000 |
---|---|---|
committer | Marek Polacek <mpolacek@gcc.gnu.org> | 2018-09-07 14:12:48 +0000 |
commit | 8112667c8cb2fe109bc169561d68277277d35dc8 (patch) | |
tree | d8b5de955e6ab86691eb6cf20cdd7c9733cf9009 /libgfortran/runtime/environ.c | |
parent | 6bf9284fbfe4f37cdb02c502b211dd28317710a6 (diff) | |
download | gcc-8112667c8cb2fe109bc169561d68277277d35dc8.zip gcc-8112667c8cb2fe109bc169561d68277277d35dc8.tar.gz gcc-8112667c8cb2fe109bc169561d68277277d35dc8.tar.bz2 |
PR c++/87152 - range-based for loops with initializer broken in templates.
* constexpr.c (potential_constant_expression_1) <case RANGE_FOR_STMT>:
Recur into RANGE_FOR_INIT_STMT.
* cp-tree.def: Add RANGE_FOR_INIT_STMT to RANGE_FOR_STMT.
* cp-tree.h (RANGE_FOR_INIT_STMT): Define.
* dump.c (cp_dump_tree) <case RANGE_FOR_STMT>: Also dump
RANGE_FOR_INIT_STMT.
* pt.c (tsubst_expr) <case RANGE_FOR_STMT>: Recur into
RANGE_FOR_INIT_STMT.
* semantics.c (begin_range_for_stmt): Adjust call to build_stmt.
Do put the init statement in RANGE_FOR_INIT_STMT.
(finish_range_for_decl): Pop it for templates.
* g++.dg/cpp2a/range-for11.C: New test.
* g++.dg/cpp2a/range-for12.C: New test.
* g++.dg/cpp2a/range-for13.C: New test.
* g++.dg/cpp2a/range-for14.C: New test.
* g++.dg/cpp2a/range-for15.C: New test.
* g++.dg/cpp2a/range-for16.C: New test.
* g++.dg/cpp2a/range-for17.C: New test.
* g++.dg/cpp2a/range-for18.C: New test.
* g++.dg/parse/error61.C (foo): Adjust dg-error.
From-SVN: r264158
Diffstat (limited to 'libgfortran/runtime/environ.c')
0 files changed, 0 insertions, 0 deletions