]> TLD Linux GIT Repositories - packages/gcc.git/commitdiff
- updated branch diff, #89906 fix from Debian
authorMarcin Krol <hawk@tld-linux.org>
Tue, 23 Jul 2019 18:23:26 +0000 (20:23 +0200)
committerMarcin Krol <hawk@tld-linux.org>
Tue, 23 Jul 2019 18:23:26 +0000 (20:23 +0200)
gcc.spec
pr88419-revert.patch [new file with mode: 0644]

index 3002b86d09f0db569ee654c02ac6414ecfb351b9..be6ee61fec74b674a87ec0e3db60243bdfead656 100644 (file)
--- a/gcc.spec
+++ b/gcc.spec
@@ -91,10 +91,11 @@ Source3:    libffi.pc.in
 Source4:       branch.sh
 # use branch.sh to update gcc-branch.diff
 Patch100:      %{name}-branch.diff
-# Patch100-md5:        8f1837d897354786bc1ca2a550849b55
+# Patch100-md5:        7ba29b0799f0a4314b3b344264bb027a
 Patch0:                %{name}-info.patch
 Patch2:                %{name}-nodebug.patch
 Patch3:                %{name}-ada-link.patch
+Patch4:                pr88419-revert.patch
 
 Patch11:       %{name}-install-libffi.patch
 URL:           http://gcc.gnu.org/
@@ -1818,6 +1819,7 @@ Extensions dla języka C. W tym pakiecie znajduje się wersja 32-bitowa.
 %patch0 -p1
 %patch2 -p1
 %patch3 -p1
+%patch4 -p1
 
 %if %{with gcc_libffi}
 %patch11 -p0
diff --git a/pr88419-revert.patch b/pr88419-revert.patch
new file mode 100644 (file)
index 0000000..a8a0600
--- /dev/null
@@ -0,0 +1,47 @@
+# DP: Revert the fix for PC c++/88419, causing PR c++/89906.
+
+2019-03-08  Jason Merrill  <jason@redhat.com>
+
+       PR c++/88419 - C++17 ICE with class template arg deduction.
+       * pt.c (make_template_placeholder): Set TYPE_CANONICAL after
+       CLASS_PLACEHOLDER_TEMPLATE.
+
+--- a/gcc/cp/pt.c
++++ b/gcc/cp/pt.c
+@@ -26002,10 +26002,8 @@
+ tree
+ make_template_placeholder (tree tmpl)
+ {
+-  tree t = make_auto_1 (DECL_NAME (tmpl), false);
++  tree t = make_auto_1 (DECL_NAME (tmpl), true);
+   CLASS_PLACEHOLDER_TEMPLATE (t) = tmpl;
+-  /* Our canonical type depends on the placeholder.  */
+-  TYPE_CANONICAL (t) = canonical_type_parameter (t);
+   return t;
+ }
+--- a/gcc/testsuite/g++.dg/cpp1z/class-deduction62.C
++++ b/gcc/testsuite/g++.dg/cpp1z/class-deduction62.C
+@@ -1,22 +0,0 @@
+-// PR c++/88419
+-// { dg-do compile { target c++17 } }
+-
+-template<class> struct ref_view {
+-  template<class T> ref_view(T&&);
+-};
+-
+-template<class R> ref_view(R&) -> ref_view<R>;
+-
+-struct ref_fn {
+-  template<class R> auto operator()(R r) const
+-    noexcept(noexcept(ref_view{r}));
+-};
+-
+-template<class R> struct indirect_view {
+-  indirect_view(R);
+-};
+-
+-struct indirect_fn {
+-  template<class R> auto operator()(R r) const
+-    noexcept(noexcept(indirect_view{r}));
+-};