This commit is contained in:
Jakub Jelinek 2020-08-26 11:39:03 +02:00
parent eed69448a1
commit e0d9613563
4 changed files with 92 additions and 4 deletions

1
.gitignore vendored
View File

@ -15,3 +15,4 @@
/gcc-10.1.1-20200618.tar.xz
/gcc-10.2.1-20200723.tar.xz
/gcc-10.2.1-20200804.tar.xz
/gcc-10.2.1-20200826.tar.xz

View File

@ -1,10 +1,10 @@
%global DATE 20200804
%global gitrev 08d83635c2ab388f6139db6965e600b296ad85e6
%global DATE 20200826
%global gitrev c59c8927f43fb78d6a72a0ff93a47b36e43282d5
%global gcc_version 10.2.1
%global gcc_major 10
# Note, gcc_release must be integer, if you want to add suffixes to
# %%{release}, append them after %%{gcc_release} on Release: line.
%global gcc_release 2
%global gcc_release 3
%global nvptx_tools_gitrev 5f6f343a302d620b0868edab376c00b15741e39e
%global newlib_cygwin_gitrev 50e2a63b04bdd018484605fbb954fd1bd5147fa0
%global _unpackaged_files_terminate_build 0
@ -266,6 +266,7 @@ Patch10: gcc10-rh1574936.patch
Patch11: gcc10-d-shared-libphobos.patch
Patch12: gcc10-pr96383.patch
Patch13: gcc10-pr96385.patch
Patch14: gcc10-pr96690.patch
# On ARM EABI systems, we do want -gnueabi to be part of the
# target triple.
@ -779,6 +780,7 @@ to NVidia PTX capable devices if available.
%patch11 -p0 -b .d-shared-libphobos~
%patch12 -p0 -b .pr96383~
%patch13 -p0 -b .pr96385~
%patch14 -p0 -b .pr96690~
echo 'Red Hat %{version}-%{gcc_release}' > gcc/DEV-PHASE
@ -3045,6 +3047,21 @@ end
%endif
%changelog
* Wed Aug 26 2020 Jakub Jelinek <jakub@redhat.com> 10.2.1-3
- update from releases/gcc-10 branch
- PRs c++/95428, c++/96082, c++/96106, c++/96164, c++/96199, c++/96497,
c/96545, c/96549, c/96571, d/96250, d/96254, d/96301, debug/96354,
fortran/93553, fortran/96312, fortran/96486, ipa/95320, ipa/96291,
ipa/96482, libstdc++/89760, libstdc++/95749, libstdc++/96303,
libstdc++/96484, libstdc++/96718, lto/95362, lto/95548,
middle-end/96426, middle-end/96459, target/93897, target/95450,
target/96191, target/96243, target/96446, target/96493, target/96506,
target/96525, target/96530, target/96536, target/96562, target/96682,
tree-optimization/96483, tree-optimization/96535,
tree-optimization/96722, tree-optimization/96730,
tree-optimization/96758
- mangle some further symbols needed for debug info during early dwarf
(#1862029, PR debug/96690)
- during %%check perform tests whether annobin is usable with the newly built
compiler or whether it might need to be rebuilt

70
gcc10-pr96690.patch Normal file
View File

@ -0,0 +1,70 @@
2020-08-25 Richard Biener <rguenther@suse.de>
PR debug/96690
* dwarf2out.c (reference_to_unused): Make FUNCTION_DECL
processing more consistent with respect to
symtab->global_info_ready.
(tree_add_const_value_attribute): Unconditionally call
rtl_for_decl_init to do all mangling early but throw
away the result if early_dwarf.
* g++.dg/lto/pr96690_0.C: New testcase.
--- gcc/dwarf2out.c
+++ gcc/dwarf2out.c
@@ -19756,7 +19756,7 @@ reference_to_unused (tree * tp, int * walk_subtrees,
/* ??? The C++ FE emits debug information for using decls, so
putting gcc_unreachable here falls over. See PR31899. For now
be conservative. */
- else if (!symtab->global_info_ready && VAR_OR_FUNCTION_DECL_P (*tp))
+ else if (!symtab->global_info_ready && VAR_P (*tp))
return *tp;
else if (VAR_P (*tp))
{
@@ -19771,7 +19771,7 @@ reference_to_unused (tree * tp, int * walk_subtrees,
optimizing and gimplifying the CU by now.
So if *TP has no call graph node associated
to it, it means *TP will not be emitted. */
- if (!cgraph_node::get (*tp))
+ if (!symtab->global_info_ready || !cgraph_node::get (*tp))
return *tp;
}
else if (TREE_CODE (*tp) == STRING_CST && !TREE_ASM_WRITTEN (*tp))
@@ -20295,12 +20295,11 @@ tree_add_const_value_attribute (dw_die_ref die, tree t)
return true;
}
}
- if (! early_dwarf)
- {
- rtl = rtl_for_decl_init (init, type);
- if (rtl)
- return add_const_value_attribute (die, rtl);
- }
+ /* Generate the RTL even if early_dwarf to force mangling of all refered to
+ symbols. */
+ rtl = rtl_for_decl_init (init, type);
+ if (rtl && !early_dwarf)
+ return add_const_value_attribute (die, rtl);
/* If the host and target are sane, try harder. */
if (CHAR_BIT == 8 && BITS_PER_UNIT == 8
&& initializer_constant_valid_p (init, type))
--- gcc/testsuite/g++.dg/lto/pr96690_0.C
+++ gcc/testsuite/g++.dg/lto/pr96690_0.C
@@ -0,0 +1,17 @@
+// { dg-lto-do assemble }
+// { dg-lto-options { { -flto -ffat-lto-objects -g } } }
+struct A { A (int); };
+template <class T> class B { T f; };
+unsigned char *foo (int *, bool *, const int &);
+template <typename, unsigned char *F (int *, bool *, const int &)> struct C {};
+struct D { B<C<unsigned char, foo> > d; };
+struct E { D e; };
+struct F {};
+struct G { static int bar (A, F, E, int); };
+
+void
+baz ()
+{
+ F f;
+ G::bar (0, f, E (), 0);
+}

View File

@ -1,3 +1,3 @@
SHA512 (gcc-10.2.1-20200804.tar.xz) = be849af9a5a8924c0ad957805a80859243f08d908f652b1290080ac6fd474d874be9745ecd209c9a069a65c44a3923841bec84f348f7352999cb3eac95b1c1cc
SHA512 (gcc-10.2.1-20200826.tar.xz) = b6949ea780618400dec06b8fc7b2728414d46e5972970ed70949ce16100547e4a9a6a5ce84ae1f47309a0610607b5454b0acc5fe5ecbb2889c84346bcdbdc8ab
SHA512 (newlib-cygwin-50e2a63b04bdd018484605fbb954fd1bd5147fa0.tar.xz) = 002a48a7b689a81abbf16161bcaec001a842e67dfbe372e9e109092703bfc666675f16198f60ca429370e8850d564547dc505df81bc3aaca4ce6defbc014ad6c
SHA512 (nvptx-tools-5f6f343a302d620b0868edab376c00b15741e39e.tar.xz) = f6d10db94fa1570ae0f94df073fa3c73c8e5ee16d59070b53d94f7db0de8a031bc44d7f3f1852533da04b625ce758e022263855ed43cfc6867e0708d001e53c7