aboutsummaryrefslogtreecommitdiff
path: root/8.4.0
diff options
context:
space:
mode:
authorSergei Trofimovich <slyfox@gentoo.org>2020-05-04 19:00:12 +0100
committerSergei Trofimovich <slyfox@gentoo.org>2020-05-04 19:00:12 +0100
commit872994d6e70ffca2d1b57f9013dccb5dcf48cbb0 (patch)
tree3e6e4596ede31fc7af3bc5026ef5e68c86650f64 /8.4.0
parent8.4.0: fix libcpp ar detection (diff)
downloadgcc-patches-872994d6e70ffca2d1b57f9013dccb5dcf48cbb0.tar.gz
gcc-patches-872994d6e70ffca2d1b57f9013dccb5dcf48cbb0.tar.bz2
gcc-patches-872994d6e70ffca2d1b57f9013dccb5dcf48cbb0.zip
8.4.0: backport https://gcc.gnu.org/PR94929
Bug: https://gcc.gnu.org/PR94929 Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
Diffstat (limited to '8.4.0')
-rw-r--r--8.4.0/gentoo/30_all_alignof-failure-PR90736.patch35
-rw-r--r--8.4.0/gentoo/README.history1
2 files changed, 36 insertions, 0 deletions
diff --git a/8.4.0/gentoo/30_all_alignof-failure-PR90736.patch b/8.4.0/gentoo/30_all_alignof-failure-PR90736.patch
new file mode 100644
index 0000000..862ed6d
--- /dev/null
+++ b/8.4.0/gentoo/30_all_alignof-failure-PR90736.patch
@@ -0,0 +1,35 @@
+https://gcc.gnu.org/PR94929
+
+From f6965321b1c00bfb2b9c8407df56bcf38f096088 Mon Sep 17 00:00:00 2001
+From: Marek Polacek <polacek@redhat.com>
+Date: Mon, 4 May 2020 13:25:42 -0400
+Subject: [PATCH] c++: Bogus error with alignof [PR90736]
+
+ PR c++/90736 - bogus error with alignof.
+ * constexpr.c (adjust_temp_type): Use cv_unqualified type.
+---
+--- a/gcc/cp/constexpr.c
++++ b/gcc/cp/constexpr.c
+@@ -1255,7 +1255,9 @@ adjust_temp_type (tree type, tree temp)
+ if (TREE_CODE (temp) == EMPTY_CLASS_EXPR)
+ return build0 (EMPTY_CLASS_EXPR, type);
+ gcc_assert (scalarish_type_p (type));
+- return cp_fold_convert (type, temp);
++ /* Now we know we're dealing with a scalar, and a prvalue of non-class
++ type is cv-unqualified. */
++ return cp_fold_convert (cv_unqualified (type), temp);
+ }
+
+ /* Callback for walk_tree used by unshare_constructor. */
+--- /dev/null
++++ b/gcc/testsuite/g++.dg/cpp0x/alignof5.C
+@@ -0,0 +1,6 @@
++// PR c++/90736 - bogus error with alignof.
++// { dg-do compile { target c++11 } }
++
++constexpr int fn(const int b) { return b; }
++constexpr int c = fn(alignof(int));
++alignas(c) char d;
+--
+2.26.2
+
diff --git a/8.4.0/gentoo/README.history b/8.4.0/gentoo/README.history
index dd7b53a..4a4db81 100644
--- a/8.4.0/gentoo/README.history
+++ b/8.4.0/gentoo/README.history
@@ -1,5 +1,6 @@
2 TODO
+ 29_all_libcpp-ar.patch
+ + 30_all_alignof-failure-PR90736.patch
1 03 Mar 2020
+ 01_all_default-fortify-source.patch