This commit is contained in:
Jakub Jelinek 2022-04-21 12:49:38 +02:00
parent 7fd6140f2f
commit f064ddbb2e
3 changed files with 49 additions and 12 deletions

View File

@ -272,6 +272,7 @@ Patch15: gcc11-pr101786.patch
Patch16: gcc11-stringify-__VA_OPT__.patch
Patch17: gcc11-stringify-__VA_OPT__-2.patch
Patch18: gcc11-pr105331.patch
Patch19: gcc11-pr105324.patch
Patch100: gcc11-fortran-fdec-duplicates.patch
Patch101: gcc11-fortran-flogical-as-integer.patch
@ -802,6 +803,7 @@ to NVidia PTX capable devices if available.
%patch16 -p0 -b .stringify-__VA_OPT__~
%patch17 -p0 -b .stringify-__VA_OPT__-2~
%patch18 -p0 -b .pr105331~
%patch19 -p0 -b .pr105324~
%if 0%{?rhel} >= 9
%patch100 -p1 -b .fortran-fdec-duplicates~
@ -3173,6 +3175,9 @@ end
tree-optimization/105189, tree-optimization/105198,
tree-optimization/105226, tree-optimization/105232,
tree-optimization/105235
- fix bogus -Wuninitialized warning on va_arg with complex types on x86_64
(PR target/105331)
- remove bogus assertion in std::from_chars (PR libstdc++/105324)
* Fri Apr 1 2022 Jakub Jelinek <jakub@redhat.com> 11.2.1-10
- update from releases/gcc-11-branch

View File

@ -19,7 +19,6 @@ that also repeats later in the @multilib_flags@, which should be harmless.
2021-08-04 Jakub Jelinek <jakub@redhat.com>
* config/t-slibgcc (SHLIB_LINK): Add $(LDFLAGS).
* config/t-slibgcc-darwin (SHLIB_LINK): Likewise.
* config/t-slibgcc-vms (SHLIB_LINK): Likewise.
--- libgcc/config/t-slibgcc
@ -33,17 +32,6 @@ that also repeats later in the @multilib_flags@, which should be harmless.
-o $(SHLIB_DIR)/$(SHLIB_SONAME).tmp @multilib_flags@ \
$(SHLIB_OBJS) $(SHLIB_LC) && \
rm -f $(SHLIB_DIR)/$(SHLIB_SOLINK) && \
--- libgcc/config/t-slibgcc-darwin
+++ libgcc/config/t-slibgcc-darwin
@@ -15,7 +15,7 @@ SHLIB_LC = -lc
# Note that this version is used for the loader, not the linker; the linker
# uses the stub versions named by the versioned members of $(INSTALL_FILES).
-SHLIB_LINK = $(CC) $(LIBGCC2_CFLAGS) -dynamiclib -nodefaultlibs \
+SHLIB_LINK = $(CC) $(LIBGCC2_CFLAGS) $(LDFLAGS) -dynamiclib -nodefaultlibs \
-install_name @shlib_slibdir@/$(SHLIB_INSTALL_NAME) \
-single_module -o $(SHLIB_DIR)/$(SHLIB_SONAME) \
-Wl,-exported_symbols_list,$(SHLIB_MAP) \
--- libgcc/config/t-slibgcc-vms
+++ libgcc/config/t-slibgcc-vms
@@ -22,7 +22,7 @@ SHLIB_LINK = \

44
gcc11-pr105324.patch Normal file
View File

@ -0,0 +1,44 @@
libstdc++: Remove bogus assertion in std::from_chars [PR105324]
I'm not sure what I was thinking when I added this assertion, maybe it
was supposed to be alignment == 1 (which is what the pmr::string actually
uses). The simplest fix is to just remove the assertion.
The assertion is no longer enabled by default on trunk, but it's still
there for the --enablke-libstdcxx-debug build, and is still wrong. The
fix is needed on the gcc-11 branch.
2022-04-21 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/105324
* src/c++17/floating_from_chars.cc (buffer_resource::do_allocate):
Remove assertion.
* testsuite/20_util/from_chars/pr105324.cc: New test.
--- libstdc++-v3/src/c++17/floating_from_chars.cc
+++ libstdc++-v3/src/c++17/floating_from_chars.cc
@@ -101,7 +101,6 @@ namespace
return m_buf + std::__exchange(m_bytes, m_bytes + bytes);
__glibcxx_assert(m_ptr == nullptr);
- __glibcxx_assert(alignment != 1);
m_ptr = operator new(bytes);
m_bytes = bytes;
--- libstdc++-v3/testsuite/20_util/from_chars/pr105324.cc
+++ libstdc++-v3/testsuite/20_util/from_chars/pr105324.cc
@@ -0,0 +1,14 @@
+// { dg-do run { target c++17 } }
+
+#include <charconv>
+#include <string>
+
+int main()
+{
+ // PR libstdc++/105324
+ // std::from_chars() assertion at floating_from_chars.cc:78
+ std::string s(512, '1');
+ s[1] = '.';
+ long double d;
+ std::from_chars(s.data(), s.data() + s.size(), d);
+}