+2025-05-15 Jakub Jelinek <jakub@redhat.com>
+
+ Backported from master:
+ 2025-02-10 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/118623
+ * config/i386/i386.md (*bt<mode>): Represent bt as
+ compare:CCC of const0_rtx and zero_extract rather than
+ zero_extract and const0_rtx.
+ (*bt<SWI48:mode>_mask): Likewise.
+ (*jcc_bt<mode>): Likewise. Use LTU and GEU as flags test
+ instead of EQ and NE.
+ (*jcc_bt<mode>_mask): Likewise.
+ (*jcc_bt<SWI48:mode>_mask_1): Likewise.
+ (Help combine recognize bt followed by cmov splitter): Likewise.
+ (*bt<mode>_setcqi): Likewise.
+ (*bt<mode>_setncqi): Likewise.
+ (*bt<mode>_setnc<mode>): Likewise.
+ (*bt<mode>_setncqi_2): Likewise.
+ (*bt<mode>_setc<mode>_mask): Likewise.
+
+2025-05-15 Jakub Jelinek <jakub@redhat.com>
+
+ Backported from master:
+ 2025-02-13 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/118822
+ * tree-iterator.h (tsi_split_stmt_list): Declare.
+ * tree-iterator.cc (tsi_split_stmt_list): New function.
+
2025-05-14 Kyle Huey <me@kylehuey.com>
Backported from master:
+2025-05-15 Jakub Jelinek <jakub@redhat.com>
+
+ Backported from master:
+ 2025-02-13 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/118822
+ * c-common.h (WHILE_COND_CLEANUP): Change description in comment.
+ (FOR_COND_CLEANUP): Likewise.
+ * c-gimplify.cc (genericize_c_loop): Adjust for COND_CLEANUP
+ being CLEANUP_STMT/TRY_FINALLY_EXPR trailing nesting depth
+ instead of actual cleanup.
+
+2025-05-15 Jakub Jelinek <jakub@redhat.com>
+
+ Backported from master:
+ 2025-02-07 Jakub Jelinek <jakub@redhat.com>
+ Jason Merrill <jason@redhat.com>
+
+ PR c++/86769
+ * c-common.def (FOR_STMT): Add 2 operands and document them.
+ (WHILE_STMT): Likewise.
+ * c-common.h (WHILE_COND_PREP, WHILE_COND_CLEANUP): Define.
+ (FOR_COND_PREP, FOR_COND_CLEANUP): Define.
+ * c-gimplify.cc (genericize_c_loop): Add COND_PREP and COND_CLEANUP
+ arguments, handle them if they are non-NULL.
+ (genericize_for_stmt, genericize_while_stmt, genericize_do_stmt):
+ Adjust callers.
+
2025-03-22 Martin Uecker <uecker@tugraz.at>
Backported from master:
+2025-05-15 Jakub Jelinek <jakub@redhat.com>
+
+ Backported from master:
+ 2025-02-07 Jakub Jelinek <jakub@redhat.com>
+ Jason Merrill <jason@redhat.com>
+
+ PR c++/86769
+ * c-parser.cc (c_parser_while_statement): Add 2 further NULL_TREE
+ operands to build_stmt.
+ (c_parser_for_statement): Likewise.
+
2025-05-14 Joseph Myers <josmyers@redhat.com>
Backported from master:
+2025-05-15 Jakub Jelinek <jakub@redhat.com>
+
+ Backported from master:
+ 2025-02-13 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/118822
+ * semantics.cc (adjust_loop_decl_cond): Allow multiple trailing
+ CLEANUP_STMT levels in *BODY_P. Set *CLEANUP_P to the number
+ of levels rather than one particular cleanup, keep the cleanups
+ in *PREP_P. Set *BODY_P to the last stmt in the cur_stmt_list
+ or NULL if *CLEANUP_P and the innermost cur_stmt_list is empty.
+ (finish_loop_cond_prep): New function.
+ (finish_while_stmt, finish_for_stmt): Use it. Don't call
+ set_one_cleanup_loc.
+ * constexpr.cc (cxx_eval_loop_expr): Adjust handling of
+ {FOR,WHILE}_COND_{PREP,CLEANUP}.
+
+2025-05-15 Jakub Jelinek <jakub@redhat.com>
+
+ Backported from master:
+ 2025-02-07 Jakub Jelinek <jakub@redhat.com>
+ Jason Merrill <jason@redhat.com>
+
+ PR c++/86769
+ * semantics.cc (set_one_cleanup_loc): New function.
+ (set_cleanup_locs): Use it.
+ (simplify_loop_decl_cond): Remove.
+ (adjust_loop_decl_cond): New function.
+ (begin_while_stmt): Add 2 further NULL_TREE operands to build_stmt.
+ (finish_while_stmt_cond): Call adjust_loop_decl_cond instead of
+ simplify_loop_decl_cond.
+ (finish_while_stmt): Call do_poplevel also on WHILE_COND_PREP if
+ non-NULL and also use pop_stmt_list rather than do_poplevel for
+ WHILE_BODY in that case. Call set_one_cleanup_loc.
+ (begin_for_stmt): Add 2 further NULL_TREE operands to build_stmt.
+ (finish_for_cond): Call adjust_loop_decl_cond instead of
+ simplify_loop_decl_cond.
+ (finish_for_stmt): Call do_poplevel also on FOR_COND_PREP if non-NULL
+ and also use pop_stmt_list rather than do_poplevel for FOR_BODY in
+ that case. Call set_one_cleanup_loc.
+ * constexpr.cc (cxx_eval_loop_expr): Handle
+ {WHILE,FOR}_COND_{PREP,CLEANUP}.
+ (check_for_return_continue): Handle {WHILE,FOR}_COND_PREP.
+ (potential_constant_expression_1): RECUR on
+ {WHILE,FOR}_COND_{PREP,CLEANUP}.
+
2025-05-14 Iain Sandoe <iain@sandoe.co.uk>
PR c++/113773
+2025-05-15 Jakub Jelinek <jakub@redhat.com>
+
+ Backported from master:
+ 2025-02-10 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/118623
+ * gcc.c-torture/execute/pr118623.c: New test.
+
+2025-05-15 Jakub Jelinek <jakub@redhat.com>
+
+ Backported from master:
+ 2025-02-13 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/118822
+ * g++.dg/expr/for9.C: New test.
+
+2025-05-15 Jakub Jelinek <jakub@redhat.com>
+
+ Backported from master:
+ 2025-02-07 Jakub Jelinek <jakub@redhat.com>
+ Jason Merrill <jason@redhat.com>
+
+ PR c++/86769
+ * g++.dg/diagnostic/redeclaration-7.C: New test.
+ * g++.dg/expr/for3.C: New test.
+ * g++.dg/expr/for4.C: New test.
+ * g++.dg/expr/for5.C: New test.
+ * g++.dg/expr/for6.C: New test.
+ * g++.dg/expr/for7.C: New test.
+ * g++.dg/expr/for8.C: New test.
+ * g++.dg/ext/stmtexpr27.C: New test.
+ * g++.dg/cpp2a/constexpr-86769.C: New test.
+ * g++.dg/cpp26/name-independent-decl7.C: New test.
+ * g++.dg/cpp26/name-independent-decl8.C: New test.
+
2025-05-14 Iain Sandoe <iain@sandoe.co.uk>
PR c++/113773