From 65505a4c17ef92acd7eba9b9ba72052c2d87c967 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Tue, 4 Feb 2025 20:28:37 +0100 Subject: [PATCH] 15.0.1-0.7 --- .gitignore | 1 + gcc.spec | 23 ++++-- gcc15-pr117231.patch | 177 ------------------------------------------- sources | 2 +- 4 files changed, 18 insertions(+), 185 deletions(-) delete mode 100644 gcc15-pr117231.patch diff --git a/.gitignore b/.gitignore index 1f435f0..bcefcfb 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ /nvptx-tools-87ce9dc5999e5fca2e1d3478a30888d9864c9804.tar.xz /newlib-cygwin-2e4db338ac125579d555aeee516e48588a628a16.tar.xz /gcc-15.0.1-20250201.tar.xz +/gcc-15.0.1-20250204.tar.xz diff --git a/gcc.spec b/gcc.spec index f9646e1..a1cf483 100644 --- a/gcc.spec +++ b/gcc.spec @@ -1,5 +1,5 @@ -%global DATE 20250201 -%global gitrev 3e0244fe19596234d3e6cf38c4afa5ca638f4b8d +%global DATE 20250204 +%global gitrev 785011ff892f91b1fedd8ba7812ff3203bc17b1a %global gcc_version 15.0.1 %global gcc_major 15 # Note, gcc_release must be integer, if you want to add suffixes to @@ -143,7 +143,7 @@ Summary: Various compilers (C, C++, Objective-C, ...) Name: gcc Version: %{gcc_version} -Release: %{gcc_release}.6%{?dist} +Release: %{gcc_release}.7%{?dist} # License notes for some of the less obvious ones: # gcc/doc/cppinternals.texi: Linux-man-pages-copyleft-2-para # isl: MIT, BSD-2-Clause @@ -299,8 +299,7 @@ Patch9: gcc15-Wno-format-security.patch Patch10: gcc15-rh1574936.patch Patch11: gcc15-d-shared-libphobos.patch Patch12: gcc15-pr118206.patch -Patch13: gcc15-pr117231.patch -Patch14: gcc15-pr118671.patch +Patch13: gcc15-pr118671.patch Patch50: isl-rh2155127.patch @@ -916,8 +915,7 @@ so that there cannot be any synchronization problems. %endif %patch -P11 -p0 -b .d-shared-libphobos~ %patch -P12 -p0 -b .pr118206~ -%patch -P13 -p0 -b .pr117231~ -%patch -P14 -p0 -b .pr118671~ +%patch -P13 -p0 -b .pr118671~ %patch -P50 -p0 -b .rh2155127~ touch -r isl-0.24/m4/ax_prog_cxx_for_build.m4 isl-0.24/m4/ax_prog_cc_for_build.m4 @@ -3671,6 +3669,17 @@ end %endif %changelog +* Tue Feb 4 2025 Jakub Jelinek 15.0.1-0.7 +- update from trunk + - PRs ada/118712, ada/118731, c/118742, c++/79786, c++/98893, c++/108205, + c++/109918, c++/114619, c++/116506, c++/116880, c++/116914, + c++/117114, c++/117778, c++/118265, c++/118470, c++/118491, + c++/118718, c++/118719, fortran/93289, lto/113207, middle-end/115913, + middle-end/116926, modula2/117411, modula2/118703, + rtl-optimization/111673, rtl-optimization/117248, + rtl-optimization/117611, target/116010, target/118713, + testsuite/116845, tree-optimization/117113, tree-optimization/118717 + * Sat Feb 1 2025 Jakub Jelinek 15.0.1-0.6 - update from trunk - PRs c++/117501, c++/117516, debug/100530, fortran/108454, fortran/118714, diff --git a/gcc15-pr117231.patch b/gcc15-pr117231.patch deleted file mode 100644 index ad1a83a..0000000 --- a/gcc15-pr117231.patch +++ /dev/null @@ -1,177 +0,0 @@ -In the current implementation, statement expressions were intentionally -unsupported (as a C++ extension). However since they are quite heavily -used by end-users and also now emitted by the compiler in some cases -we are now working to add them. This first patch ensures that we -recurse into statement expressions (and therefore handle coroutine -keywords that might appear inside them). - - PR c++/115851 - PR c++/116914 - PR c++/117231 - -gcc/cp/ChangeLog: - - * coroutines.cc (await_statement_expander): Walk into - statement expressions. - (await_statement_walker): Likewise. - -gcc/testsuite/ChangeLog: - - * g++.dg/coroutines/pr115851.C: New test. - * g++.dg/coroutines/pr116914.C: New test. - * g++.dg/coroutines/pr117231.C: New test. - -Signed-off-by: Iain Sandoe ---- - gcc/cp/coroutines.cc | 22 ++++++++++++ - gcc/testsuite/g++.dg/coroutines/pr115851.C | 35 +++++++++++++++++++ - gcc/testsuite/g++.dg/coroutines/pr116914.C | 40 ++++++++++++++++++++++ - gcc/testsuite/g++.dg/coroutines/pr117231.C | 21 ++++++++++++ - 4 files changed, 118 insertions(+) - create mode 100644 gcc/testsuite/g++.dg/coroutines/pr115851.C - create mode 100644 gcc/testsuite/g++.dg/coroutines/pr116914.C - create mode 100644 gcc/testsuite/g++.dg/coroutines/pr117231.C - ---- gcc/cp/coroutines.cc -+++ gcc/cp/coroutines.cc -@@ -2128,6 +2128,14 @@ await_statement_expander (tree *stmt, int *do_subtree, void *d) - } - else if (EXPR_P (*stmt)) - { -+ /* Look for ({}) at the top level - just recurse into these. */ -+ if (TREE_CODE (*stmt) == EXPR_STMT) -+ { -+ tree inner = EXPR_STMT_EXPR (*stmt); -+ if (TREE_CODE (inner) == STATEMENT_LIST -+ || TREE_CODE (inner) == BIND_EXPR) -+ return NULL_TREE; // process contents -+ } - process_one_statement (stmt, d); - *do_subtree = 0; /* Done subtrees. */ - } -@@ -3857,6 +3865,20 @@ await_statement_walker (tree *stmt, int *do_subtree, void *d) - if (!(cp_walk_tree (stmt, find_any_await, &await_ptr, &visited))) - return NULL_TREE; /* Nothing special to do here. */ - -+ /* Handle statement expressions. */ -+ if (TREE_CODE (expr) == EXPR_STMT) -+ { -+ tree inner = EXPR_STMT_EXPR (expr); -+ if (TREE_CODE (inner) == STATEMENT_LIST -+ || TREE_CODE (inner) == BIND_EXPR) -+ { -+ res = cp_walk_tree (&EXPR_STMT_EXPR (expr), -+ await_statement_walker, d, NULL); -+ *do_subtree = 0; -+ return res; -+ } -+ } -+ - visited.empty (); - awpts->saw_awaits = 0; - hash_set truth_aoif_to_expand; ---- gcc/testsuite/g++.dg/coroutines/pr115851.C -+++ gcc/testsuite/g++.dg/coroutines/pr115851.C -@@ -0,0 +1,35 @@ -+// { dg-additional-options "-Wno-pedantic " } -+#include -+ -+struct SuspendNever { -+ bool await_ready() noexcept; -+ void await_suspend(std::coroutine_handle<>) noexcept; -+ void await_resume() noexcept; -+}; -+ -+struct Coroutine; -+ -+struct PromiseType { -+ Coroutine get_return_object(); -+ SuspendNever initial_suspend(); -+ SuspendNever final_suspend() noexcept; -+ void unhandled_exception () {} -+}; -+ -+struct Coroutine { -+ using promise_type = PromiseType; -+}; -+ -+struct ErrorOr { -+ int release_error(); -+}; -+ -+void warnln(int const&); -+ -+Coroutine __async_test_input_basic() { -+ ({ -+ co_await SuspendNever{}; -+ ErrorOr _temporary_result2; -+ warnln(_temporary_result2.release_error()); -+ }); -+} ---- gcc/testsuite/g++.dg/coroutines/pr116914.C -+++ gcc/testsuite/g++.dg/coroutines/pr116914.C -@@ -0,0 +1,40 @@ -+// { dg-additional-options "-std=gnu++20 -fpreprocessed" } -+ -+namespace std { -+template struct coroutine_traits : a {}; -+template struct coroutine_handle { -+ static coroutine_handle from_address(void *); -+ operator coroutine_handle<>(); -+ void *address(); -+}; -+struct b { -+ int await_ready() noexcept; -+ void await_suspend(coroutine_handle<>) noexcept; -+ void await_resume() noexcept; -+}; -+} // namespace std -+struct c; -+struct d { -+ c get_return_object(); -+ std::b initial_suspend(); -+ std::b final_suspend() noexcept; -+ void unhandled_exception(); -+ std::b yield_value(int); -+}; -+struct e { -+ void operator++(); -+ int operator*(); -+ int operator!=(e); -+}; -+struct c { -+ using promise_type = d; -+ e begin(); -+ e end(); -+ c f() { -+ c g; -+ for (auto h : g) { -+ auto i = 1; -+ co_yield i; -+ } -+ } -+}; ---- gcc/testsuite/g++.dg/coroutines/pr117231.C -+++ gcc/testsuite/g++.dg/coroutines/pr117231.C -@@ -0,0 +1,21 @@ -+// { dg-additional-options "-std=c++23 " } -+// { dg-do run } -+#include -+//#include -+#include -+ -+std::generator get_seq() -+{ -+ std::vector data_{1, 2, 3}; -+ for (auto item : data_) -+ co_yield item; -+} -+ -+int main() -+{ -+ int res = 0; -+ for (auto item : get_seq()) -+ res = item; //std::println("{}", item); -+ if (res != 3) -+ __builtin_abort (); -+} diff --git a/sources b/sources index a9e4c63..a90cbaf 100644 --- a/sources +++ b/sources @@ -1,4 +1,4 @@ -SHA512 (gcc-15.0.1-20250201.tar.xz) = 2b429a615554218d491851b741cfd15ff871ef3beabd27194fe20ce85faa7422e9ac948b6c6bc8c194c33f1564e13ef438e2ec1665d61acc8823443953b01952 +SHA512 (gcc-15.0.1-20250204.tar.xz) = 33b9175db47e892b60d9de6d2bbe48b44d7e44ac36f36e08a522cbf020919fe2dc2ef2239fa4c75be63c788fde9725106e64f76663ce1330f984ee3c03fc1ac9 SHA512 (isl-0.24.tar.bz2) = aab3bddbda96b801d0f56d2869f943157aad52a6f6e6a61745edd740234c635c38231af20bc3f1a08d416a5e973a90e18249078ed8e4ae2f1d5de57658738e95 SHA512 (newlib-cygwin-2e4db338ac125579d555aeee516e48588a628a16.tar.xz) = 839bb0c45b5023a83e1a5bf8773050af46bd075754502fc49a62ab860144c9a6bdc0a7d52e6c7ded87ba13ce58192755dd3f83333bc7c61ffb184fef4142a808 SHA512 (nvptx-tools-87ce9dc5999e5fca2e1d3478a30888d9864c9804.tar.xz) = 941e763af8601b89f0e4ec48a2d68ae0a8e70ee1e6ba6859394b021ad7bd7d143cc529f3c35c08d7f84e5554980ddcc97cf05b6c4755c2bc36c91161b79e8cea