about summary refs log tree commit diff
diff options
context:
space:
mode:
authorVladimír Čunát <v@cunat.cz>2024-06-24 09:37:35 +0200
committerVladimír Čunát <v@cunat.cz>2024-06-24 09:37:35 +0200
commit12df9ba6c373c7b864683904adc585acf98dddaa (patch)
tree1c9bf603d9cbcd0dc0de157a9eb75351ccd7f777
parent99428c3cf0ceae2458bfd02aa66e7c46a02198cb (diff)
parent833a9841fec2fd672456fb758c328159b987e79a (diff)
Merge #321340: gcc12: 12.3.0 -> 12.4.0
...into staging
-rw-r--r--pkgs/development/compilers/gcc/patches/12/lambda-ICE-PR109241.patch77
-rw-r--r--pkgs/development/compilers/gcc/patches/default.nix1
-rw-r--r--pkgs/development/compilers/gcc/versions.nix6
3 files changed, 2 insertions, 82 deletions
diff --git a/pkgs/development/compilers/gcc/patches/12/lambda-ICE-PR109241.patch b/pkgs/development/compilers/gcc/patches/12/lambda-ICE-PR109241.patch
deleted file mode 100644
index a27a8a08d9d5d..0000000000000
--- a/pkgs/development/compilers/gcc/patches/12/lambda-ICE-PR109241.patch
+++ /dev/null
@@ -1,77 +0,0 @@
-https://gcc.gnu.org/PR109241
-
-Fix ICE on ccache.
-
-From 396a4e76afec30d2461638f569cae18955eb4ad2 Mon Sep 17 00:00:00 2001
-From: Jason Merrill <jason@redhat.com>
-Date: Wed, 22 Mar 2023 16:11:47 -0400
-Subject: [PATCH] c++: local class in nested generic lambda [PR109241]
-
-In this testcase, the tree walk to look for bare parameter packs was
-confused by finding a type with no TREE_BINFO.  But it should be fine that
-it's unset; we already checked for unexpanded packs at parse time.
-
-I also tried doing the partial instantiation of the local class, which is
-probably the long-term direction we want to go, but for stage 4 let's go
-with this safer change.
-
-	PR c++/109241
-
-gcc/cp/ChangeLog:
-
-	* pt.cc (find_parameter_packs_r): Handle null TREE_BINFO.
-
-gcc/testsuite/ChangeLog:
-
-	* g++.dg/cpp1y/lambda-generic-local-class2.C: New test.
----
- gcc/cp/pt.cc                                        | 12 ++++++++----
- .../g++.dg/cpp1y/lambda-generic-local-class2.C      | 13 +++++++++++++
- 2 files changed, 21 insertions(+), 4 deletions(-)
- create mode 100644 gcc/testsuite/g++.dg/cpp1y/lambda-generic-local-class2.C
-
-diff --git a/gcc/cp/pt.cc b/gcc/cp/pt.cc
-index c7f4a95a723..79bc9c014c8 100644
---- a/gcc/cp/pt.cc
-+++ b/gcc/cp/pt.cc
-@@ -4106,10 +4106,14 @@ find_parameter_packs_r (tree *tp, int *walk_subtrees, void* data)
-     case TAG_DEFN:
-       t = TREE_TYPE (t);
-       if (CLASS_TYPE_P (t))
--	/* Local class, need to look through the whole definition.  */
--	for (tree bb : BINFO_BASE_BINFOS (TYPE_BINFO (t)))
--	  cp_walk_tree (&BINFO_TYPE (bb), &find_parameter_packs_r,
--			ppd, ppd->visited);
-+	{
-+	  /* Local class, need to look through the whole definition.
-+	     TYPE_BINFO might be unset for a partial instantiation.  */
-+	  if (TYPE_BINFO (t))
-+	    for (tree bb : BINFO_BASE_BINFOS (TYPE_BINFO (t)))
-+	      cp_walk_tree (&BINFO_TYPE (bb), &find_parameter_packs_r,
-+			    ppd, ppd->visited);
-+	}
-       else
- 	/* Enum, look at the values.  */
- 	for (tree l = TYPE_VALUES (t); l; l = TREE_CHAIN (l))
-diff --git a/gcc/testsuite/g++.dg/cpp1y/lambda-generic-local-class2.C b/gcc/testsuite/g++.dg/cpp1y/lambda-generic-local-class2.C
-new file mode 100644
-index 00000000000..83856de1f41
---- /dev/null
-+++ b/gcc/testsuite/g++.dg/cpp1y/lambda-generic-local-class2.C
-@@ -0,0 +1,13 @@
-+// PR c++/109241
-+// { dg-do compile { target c++14 } }
-+// { dg-options "" } no pedantic
-+
-+void g() {
-+  [](auto) {
-+    [](auto) {
-+      ({
-+        struct A {};
-+      });
-+    };
-+  }(1);
-+}
--- 
-2.40.1
-
diff --git a/pkgs/development/compilers/gcc/patches/default.nix b/pkgs/development/compilers/gcc/patches/default.nix
index 8f0a499da362a..b7da7eb925eef 100644
--- a/pkgs/development/compilers/gcc/patches/default.nix
+++ b/pkgs/development/compilers/gcc/patches/default.nix
@@ -76,7 +76,6 @@ in
 ++ optional (atLeast12 && langAda) ./gnat-cflags-11.patch
 ++ optional langFortran (if atLeast12 then ./gcc-12-gfortran-driving.patch else ./gfortran-driving.patch)
 ++ optional atLeast7 ./ppc-musl.patch
-++ optional is12 ./12/lambda-ICE-PR109241.patch # backport ICE fix on ccache code
 ++ optional (atLeast9 && langD) ./libphobos.patch
 
 
diff --git a/pkgs/development/compilers/gcc/versions.nix b/pkgs/development/compilers/gcc/versions.nix
index 3421152ef12ac..317f4f1165e6e 100644
--- a/pkgs/development/compilers/gcc/versions.nix
+++ b/pkgs/development/compilers/gcc/versions.nix
@@ -2,7 +2,7 @@ let
   majorMinorToVersionMap = {
     "14" = "14.1.0";
     "13" = "13.3.0";
-    "12" = "12.3.0";
+    "12" = "12.4.0";
     "11" = "11.4.0";
     "10" = "10.5.0";
     "9"  =  "9.5.0";
@@ -18,11 +18,9 @@ let
 
   # TODO(amjoseph): convert older hashes to SRI form
   srcHashForVersion = version: {
-    # NOTE: there is no need to remove hashes of obsolete minor
-    # versions when adding a new minor version.
     "14.1.0" = "sha256-4oPGVJh6/j3p2AgLwL15U0tcoNaBpzoR/ytdN2dCaEA=";
     "13.3.0" = "sha256-CEXpYhyVQ6E/SE6UWEpJ/8ASmXDpkUYkI1/B0GGgwIM=";
-    "12.3.0" = "sha256-lJpdT5nnhkIak7Uysi/6tVeN5zITaZdbka7Jet/ajDs=";
+    "12.4.0" = "sha256-cE9lJgTMvMsUvavzR4yVEciXiLEss7v/3tNzQZFqkXU=";
     "11.4.0" = "sha256-Py2yIrAH6KSiPNW6VnJu8I6LHx6yBV7nLBQCzqc6jdk=";
     "10.5.0" = "sha256-JRCVQ/30bzl8NHtdi3osflaUpaUczkucbh6opxyjB8E=";
     "9.5.0"  = "13ygjmd938m0wmy946pxdhz9i1wq7z4w10l6pvidak0xxxj9yxi7";