summaryrefslogtreecommitdiff
path: root/source/d/gcc/patches/PR100102.5357ab75dedef403b0eebf9277d61d1cbeb5898f.patch
diff options
context:
space:
mode:
authorPatrick J Volkerding <volkerdi@slackware.com>2021-06-09 18:59:30 +0000
committerEric Hameleers <alien@slackware.com>2021-06-10 08:59:32 +0200
commitbd0fcc79d4fa32412994f803fa62ecc2232923a2 (patch)
tree9528e5d95abe16acc96037355e03345d9fb9659a /source/d/gcc/patches/PR100102.5357ab75dedef403b0eebf9277d61d1cbeb5898f.patch
parent3e486d66d253cd7a7436d1771c2f7403a5e87240 (diff)
downloadcurrent-bd0fcc79d4fa32412994f803fa62ecc2232923a2.tar.gz
Wed Jun 9 18:59:30 UTC 202120210609185930
a/dialog-1.3_20210530-x86_64-1.txz: Upgraded. a/grub-2.06-x86_64-1.txz: Upgraded. a/kernel-firmware-20210609_0f66b74-noarch-1.txz: Upgraded. d/gcc-10.3.0-x86_64-2.txz: Rebuilt. Applied upstream patches to address the regressions noted in PR100101 and PR100102. Thanks to eduardr. d/gcc-brig-10.3.0-x86_64-2.txz: Rebuilt. d/gcc-g++-10.3.0-x86_64-2.txz: Rebuilt. d/gcc-gdc-10.3.0-x86_64-2.txz: Rebuilt. d/gcc-gfortran-10.3.0-x86_64-2.txz: Rebuilt. d/gcc-gnat-10.3.0-x86_64-2.txz: Rebuilt. d/gcc-go-10.3.0-x86_64-2.txz: Rebuilt. d/gcc-objc-10.3.0-x86_64-2.txz: Rebuilt. d/meson-0.58.1-x86_64-1.txz: Upgraded. kde/bluedevil-5.22.0-x86_64-1.txz: Upgraded. kde/breeze-5.22.0-x86_64-1.txz: Upgraded. kde/breeze-grub-5.22.0-x86_64-1.txz: Upgraded. kde/breeze-gtk-5.22.0-x86_64-1.txz: Upgraded. kde/drkonqi-5.22.0-x86_64-1.txz: Upgraded. kde/kactivitymanagerd-5.22.0-x86_64-1.txz: Upgraded. kde/kde-cli-tools-5.22.0-x86_64-1.txz: Upgraded. kde/kde-gtk-config-5.22.0-x86_64-1.txz: Upgraded. kde/kdecoration-5.22.0-x86_64-1.txz: Upgraded. kde/kdeplasma-addons-5.22.0-x86_64-1.txz: Upgraded. kde/kgamma5-5.22.0-x86_64-1.txz: Upgraded. kde/khotkeys-5.22.0-x86_64-1.txz: Upgraded. kde/kinfocenter-5.22.0-x86_64-1.txz: Upgraded. kde/kmenuedit-5.22.0-x86_64-1.txz: Upgraded. kde/krita-4.4.5-x86_64-1.txz: Upgraded. kde/kscreen-5.22.0-x86_64-1.txz: Upgraded. kde/kscreenlocker-5.22.0-x86_64-1.txz: Upgraded. kde/ksshaskpass-5.22.0-x86_64-1.txz: Upgraded. kde/ksysguard-5.22.0-x86_64-1.txz: Upgraded. kde/ksystemstats-5.22.0-x86_64-1.txz: Added. kde/kwallet-pam-5.22.0-x86_64-1.txz: Upgraded. kde/kwayland-integration-5.22.0-x86_64-1.txz: Upgraded. kde/kwayland-server-5.22.0-x86_64-1.txz: Upgraded. kde/kwin-5.22.0-x86_64-1.txz: Upgraded. kde/kwrited-5.22.0-x86_64-1.txz: Upgraded. kde/latte-dock-0.9.12-x86_64-1.txz: Upgraded. kde/layer-shell-qt-5.22.0-x86_64-1.txz: Added. kde/libkscreen-5.22.0-x86_64-1.txz: Upgraded. kde/libksysguard-5.22.0-x86_64-1.txz: Upgraded. kde/milou-5.22.0-x86_64-1.txz: Upgraded. kde/oxygen-5.22.0-x86_64-1.txz: Upgraded. kde/plasma-browser-integration-5.22.0-x86_64-1.txz: Upgraded. kde/plasma-desktop-5.22.0-x86_64-1.txz: Upgraded. kde/plasma-disks-5.22.0-x86_64-1.txz: Upgraded. kde/plasma-firewall-5.22.0-x86_64-1.txz: Upgraded. kde/plasma-integration-5.22.0-x86_64-1.txz: Upgraded. kde/plasma-nm-5.22.0-x86_64-1.txz: Upgraded. kde/plasma-pa-5.22.0-x86_64-1.txz: Upgraded. kde/plasma-sdk-5.22.0-x86_64-1.txz: Upgraded. kde/plasma-systemmonitor-5.22.0-x86_64-1.txz: Upgraded. kde/plasma-vault-5.22.0-x86_64-1.txz: Upgraded. kde/plasma-workspace-5.22.0-x86_64-1.txz: Upgraded. kde/plasma-workspace-wallpapers-5.22.0-x86_64-1.txz: Upgraded. kde/polkit-kde-agent-1-5.22.0-x86_64-1.txz: Upgraded. kde/powerdevil-5.22.0-x86_64-1.txz: Upgraded. kde/qqc2-breeze-style-5.22.0-x86_64-1.txz: Upgraded. kde/sddm-kcm-5.22.0-x86_64-1.txz: Upgraded. kde/systemsettings-5.22.0-x86_64-1.txz: Upgraded. kde/xdg-desktop-portal-kde-5.22.0-x86_64-1.txz: Upgraded. l/alsa-lib-1.2.5-x86_64-3.txz: Rebuilt. Apply upstream patches to fix device detection. Thanks to USUARIONUEVO. l/libiodbc-3.52.15-x86_64-1.txz: Upgraded. n/sshfs-3.7.2-x86_64-1.txz: Upgraded. n/wpa_supplicant-2.9-x86_64-7.txz: Rebuilt. Support WPA3 and add some more options from the defconfig included in the source to Slackware's config file. Thanks to ArTourter. x/xkeyboard-config-2.33-noarch-1.txz: Upgraded. x/xterm-368-x86_64-1.txz: Upgraded. xfce/xfce4-settings-4.16.2-x86_64-1.txz: Upgraded.
Diffstat (limited to 'source/d/gcc/patches/PR100102.5357ab75dedef403b0eebf9277d61d1cbeb5898f.patch')
-rw-r--r--source/d/gcc/patches/PR100102.5357ab75dedef403b0eebf9277d61d1cbeb5898f.patch133
1 files changed, 133 insertions, 0 deletions
diff --git a/source/d/gcc/patches/PR100102.5357ab75dedef403b0eebf9277d61d1cbeb5898f.patch b/source/d/gcc/patches/PR100102.5357ab75dedef403b0eebf9277d61d1cbeb5898f.patch
new file mode 100644
index 00000000..57432468
--- /dev/null
+++ b/source/d/gcc/patches/PR100102.5357ab75dedef403b0eebf9277d61d1cbeb5898f.patch
@@ -0,0 +1,133 @@
+From 5357ab75dedef403b0eebf9277d61d1cbeb5898f Mon Sep 17 00:00:00 2001
+From: Patrick Palka <ppalka@redhat.com>
+Date: Fri, 4 Jun 2021 13:46:53 -0400
+Subject: [PATCH 1/1] c++: tsubst_function_decl and excess arg levels
+ [PR100102]
+
+Here, when instantiating the dependent alias template
+duration::__is_harmonic with args={{T,U},{int}}, we find ourselves
+substituting the function decl _S_gcd. Since we have more arg levels
+than _S_gcd has parm levels, an old special case in tsubst_function_decl
+causes us to unwantedly reduce args to its innermost level, yielding
+args={int}, which leads to a nonsensical substitution into the decl
+context and eventually a crash.
+
+The comment for this special case refers to three examples for which we
+ought to see more arg levels than parm levels here, but none of the
+examples actually demonstrate this. In the first example, when
+defining S<int>::f(U) parms_depth is 2 and args_depth is 1, and
+later when instantiating say S<int>::f<char> both depths are 2. In the
+second example, when substituting the template friend declaration
+parms_depth is 2 and args_depth is 1, and later when instantiating f
+both depths are 1. Finally, the third example is invalid since we can't
+specialize a member template of an unspecialized class template like
+that.
+
+Given that this reduction code seems no longer relevant for its
+documented purpose and that it causes problems as in the PR, this patch
+just removes it. Note that as far as bootstrap/regtest is concerned,
+this code is dead; the below two tests would be the first to reach it.
+
+ PR c++/100102
+
+gcc/cp/ChangeLog:
+
+ * pt.c (tsubst_function_decl): Remove old code for reducing
+ args when it has excess levels.
+
+gcc/testsuite/ChangeLog:
+
+ * g++.dg/cpp0x/alias-decl-72.C: New test.
+ * g++.dg/cpp0x/alias-decl-72a.C: New test.
+---
+ gcc/cp/pt.c | 39 ---------------------
+ gcc/testsuite/g++.dg/cpp0x/alias-decl-72.C | 9 +++++
+ gcc/testsuite/g++.dg/cpp0x/alias-decl-72a.C | 9 +++++
+ 3 files changed, 18 insertions(+), 39 deletions(-)
+ create mode 100644 gcc/testsuite/g++.dg/cpp0x/alias-decl-72.C
+ create mode 100644 gcc/testsuite/g++.dg/cpp0x/alias-decl-72a.C
+
+diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c
+index 7211bdc5bbc..744461ed8cb 100644
+--- a/gcc/cp/pt.c
++++ b/gcc/cp/pt.c
+@@ -13905,45 +13905,6 @@ tsubst_function_decl (tree t, tree args, tsubst_flags_t complain,
+ if (tree spec = retrieve_specialization (gen_tmpl, argvec, hash))
+ return spec;
+ }
+-
+- /* We can see more levels of arguments than parameters if
+- there was a specialization of a member template, like
+- this:
+-
+- template <class T> struct S { template <class U> void f(); }
+- template <> template <class U> void S<int>::f(U);
+-
+- Here, we'll be substituting into the specialization,
+- because that's where we can find the code we actually
+- want to generate, but we'll have enough arguments for
+- the most general template.
+-
+- We also deal with the peculiar case:
+-
+- template <class T> struct S {
+- template <class U> friend void f();
+- };
+- template <class U> void f() {}
+- template S<int>;
+- template void f<double>();
+-
+- Here, the ARGS for the instantiation of will be {int,
+- double}. But, we only need as many ARGS as there are
+- levels of template parameters in CODE_PATTERN. We are
+- careful not to get fooled into reducing the ARGS in
+- situations like:
+-
+- template <class T> struct S { template <class U> void f(U); }
+- template <class T> template <> void S<T>::f(int) {}
+-
+- which we can spot because the pattern will be a
+- specialization in this case. */
+- int args_depth = TMPL_ARGS_DEPTH (args);
+- int parms_depth =
+- TMPL_PARMS_DEPTH (DECL_TEMPLATE_PARMS (DECL_TI_TEMPLATE (t)));
+-
+- if (args_depth > parms_depth && !DECL_TEMPLATE_SPECIALIZATION (t))
+- args = get_innermost_template_args (args, parms_depth);
+ }
+ else
+ {
+diff --git a/gcc/testsuite/g++.dg/cpp0x/alias-decl-72.C b/gcc/testsuite/g++.dg/cpp0x/alias-decl-72.C
+new file mode 100644
+index 00000000000..8009756dcba
+--- /dev/null
++++ b/gcc/testsuite/g++.dg/cpp0x/alias-decl-72.C
+@@ -0,0 +1,9 @@
++// PR c++/100102
++// { dg-do compile { target c++11 } }
++
++template<int()> struct ratio;
++template<class T, class U> struct duration {
++ static constexpr int _S_gcd();
++ template<class> using __is_harmonic = ratio<_S_gcd>;
++ using type = __is_harmonic<int>;
++};
+diff --git a/gcc/testsuite/g++.dg/cpp0x/alias-decl-72a.C b/gcc/testsuite/g++.dg/cpp0x/alias-decl-72a.C
+new file mode 100644
+index 00000000000..a4443e18f9d
+--- /dev/null
++++ b/gcc/testsuite/g++.dg/cpp0x/alias-decl-72a.C
+@@ -0,0 +1,9 @@
++// PR c++/100102
++// { dg-do compile { target c++11 } }
++
++template<int> struct ratio;
++template<class T> struct duration {
++ static constexpr int _S_gcd();
++ template<class> using __is_harmonic = ratio<(duration::_S_gcd)()>;
++ using type = __is_harmonic<int>;
++};
+--
+2.27.0
+
+