This commit is contained in:
Jakub Jelinek 2016-09-01 14:20:47 +02:00
parent 31e7eb359b
commit 50fa9e4ee3
4 changed files with 19 additions and 116 deletions

1
.gitignore vendored
View File

@ -12,3 +12,4 @@
/gcc-6.1.1-20160721.tar.bz2 /gcc-6.1.1-20160721.tar.bz2
/gcc-6.1.1-20160810.tar.bz2 /gcc-6.1.1-20160810.tar.bz2
/gcc-6.1.1-20160817.tar.bz2 /gcc-6.1.1-20160817.tar.bz2
/gcc-6.2.1-20160901.tar.bz2

View File

@ -1,9 +1,9 @@
%global DATE 20160817 %global DATE 20160901
%global SVNREV 239541 %global SVNREV 239935
%global gcc_version 6.1.1 %global gcc_version 6.2.1
# Note, gcc_release must be integer, if you want to add suffixes to # Note, gcc_release must be integer, if you want to add suffixes to
# %{release}, append them after %{gcc_release} on Release: line. # %{release}, append them after %{gcc_release} on Release: line.
%global gcc_release 6 %global gcc_release 1
%global _unpackaged_files_terminate_build 0 %global _unpackaged_files_terminate_build 0
%global _performance_build 1 %global _performance_build 1
# Hardening slows the compiler way too much. # Hardening slows the compiler way too much.
@ -207,7 +207,6 @@ Patch10: gcc6-no-add-needed.patch
Patch11: gcc6-libgo-p224.patch Patch11: gcc6-libgo-p224.patch
Patch12: gcc6-aarch64-async-unw-tables.patch Patch12: gcc6-aarch64-async-unw-tables.patch
Patch13: gcc6-libsanitize-aarch64-va42.patch Patch13: gcc6-libsanitize-aarch64-va42.patch
Patch14: gcc6-pr77259.patch
# On ARM EABI systems, we do want -gnueabi to be part of the # On ARM EABI systems, we do want -gnueabi to be part of the
# target triple. # target triple.
@ -774,7 +773,6 @@ package or when debugging this package.
rm -f libgo/go/crypto/elliptic/p224{,_test}.go rm -f libgo/go/crypto/elliptic/p224{,_test}.go
%patch12 -p0 -b .aarch64-async-unw-tables~ %patch12 -p0 -b .aarch64-async-unw-tables~
%patch13 -p0 -b .libsanitize-aarch64-va42~ %patch13 -p0 -b .libsanitize-aarch64-va42~
%patch14 -p0 -b .pr77259~
%if 0%{?_enable_debug_packages} %if 0%{?_enable_debug_packages}
mkdir dwz-wrapper mkdir dwz-wrapper
@ -3110,6 +3108,19 @@ fi
%doc rpm.doc/changelogs/libcc1/ChangeLog* %doc rpm.doc/changelogs/libcc1/ChangeLog*
%changelog %changelog
* Thu Sep 1 2016 Jakub Jelinek <jakub@redhat.com> 6.2.1-1
- update from the 6 branch
- GCC 6.2 release
- PRs bootstrap/77279, debug/77363, fortran/69281, fortran/71014,
fortran/72744, fortran/77352, fortran/77358, fortran/77374,
libstdc++/77334, libstdc++/77395, lto/70955, middle-end/70895,
middle-end/71700, middle-end/77377, target/71338, target/71910,
target/72863, target/72867, target/77270, target/77281, target/77403,
tree-optimization/62171, tree-optimization/68542,
tree-optimization/71077, tree-optimization/72851,
tree-optimization/72866, tree-optimization/76490,
tree-optimization/76783
* Wed Aug 17 2016 Jakub Jelinek <jakub@redhat.com> 6.1.1-6 * Wed Aug 17 2016 Jakub Jelinek <jakub@redhat.com> 6.1.1-6
- update from the 6 branch - update from the 6 branch
- PRs c++/71972, c++/72868, c++/73456, c/67410, c/71512, c/72816, - PRs c++/71972, c++/72868, c++/73456, c/67410, c/71512, c/72816,

View File

@ -1,109 +0,0 @@
2016-08-17 Jakub Jelinek <jakub@redhat.com>
PR middle-end/77259
* tree-ssa-pre.c (eliminate_dom_walker::before_dom_children): If
turning a call into __builtin_unreachable-like noreturn call, adjust
gimple_call_set_fntype.
* tree-cfgcleanup.c (fixup_noreturn_call): Remove lhs also if
gimple_call_fntype has void return type.
* g++.dg/ipa/devirt-52.C: New test.
--- gcc/tree-ssa-pre.c.jj 2016-08-16 13:22:49.095671219 +0200
+++ gcc/tree-ssa-pre.c 2016-08-17 10:24:42.498730917 +0200
@@ -4543,6 +4543,15 @@ eliminate_dom_walker::before_dom_childre
lang_hooks.decl_printable_name (fn, 2));
}
gimple_call_set_fndecl (call_stmt, fn);
+ /* If changing the call to __builtin_unreachable
+ or similar noreturn function, adjust gimple_call_fntype
+ too. */
+ if (gimple_call_noreturn_p (call_stmt)
+ && VOID_TYPE_P (TREE_TYPE (TREE_TYPE (fn)))
+ && TYPE_ARG_TYPES (TREE_TYPE (fn))
+ && (TREE_VALUE (TYPE_ARG_TYPES (TREE_TYPE (fn)))
+ == void_type_node))
+ gimple_call_set_fntype (call_stmt, TREE_TYPE (fn));
maybe_remove_unused_call_args (cfun, call_stmt);
gimple_set_modified (stmt, true);
}
--- gcc/tree-cfgcleanup.c.jj 2016-08-09 09:41:14.000000000 +0200
+++ gcc/tree-cfgcleanup.c 2016-08-17 10:36:24.198791289 +0200
@@ -602,10 +602,15 @@ fixup_noreturn_call (gimple *stmt)
/* If there is an LHS, remove it, but only if its type has fixed size.
The LHS will need to be recreated during RTL expansion and creating
temporaries of variable-sized types is not supported. Also don't
- do this with TREE_ADDRESSABLE types, as assign_temp will abort. */
+ do this with TREE_ADDRESSABLE types, as assign_temp will abort.
+ Drop LHS regardless of TREE_ADDRESSABLE, if the function call
+ has been changed into a call that does not return a value, like
+ __builtin_unreachable or __cxa_pure_virtual. */
tree lhs = gimple_call_lhs (stmt);
- if (lhs && TREE_CODE (TYPE_SIZE_UNIT (TREE_TYPE (lhs))) == INTEGER_CST
- && !TREE_ADDRESSABLE (TREE_TYPE (lhs)))
+ if (lhs
+ && ((TREE_CODE (TYPE_SIZE_UNIT (TREE_TYPE (lhs))) == INTEGER_CST
+ && !TREE_ADDRESSABLE (TREE_TYPE (lhs)))
+ || VOID_TYPE_P (TREE_TYPE (gimple_call_fntype (stmt)))))
{
gimple_call_set_lhs (stmt, NULL_TREE);
--- gcc/testsuite/g++.dg/ipa/devirt-52.C.jj 2016-08-17 10:23:39.775528901 +0200
+++ gcc/testsuite/g++.dg/ipa/devirt-52.C 2016-08-17 10:23:39.775528901 +0200
@@ -0,0 +1,56 @@
+// PR middle-end/77259
+// { dg-do compile { target c++11 } }
+// { dg-options "-O2" }
+
+template <typename, typename = int> class A;
+template <typename, typename> struct A
+{
+ A (A &&);
+};
+template <typename S, typename T, typename U>
+A<S> operator+(S *, const A<T, U> &);
+template <typename S, typename T, typename U>
+void operator+(const A<T, U> &, S *);
+struct B
+{
+ template <typename V> B (V);
+};
+template <typename V> V foo (B) {}
+class C;
+template <typename> struct D
+{
+ C *operator->() { return d; }
+ C *d;
+};
+struct C
+{
+ virtual A<int> bar ();
+};
+struct E
+{
+ ~E ();
+ virtual A<char> bar (const B &) const;
+};
+template <typename> struct F : E
+{
+};
+template <typename W> struct F<D<W>> : E
+{
+ A<char> bar (const B &) const try
+ {
+ D<W> a = baz ();
+ }
+ catch (int)
+ {
+ }
+ D<W> baz () const
+ {
+ D<C> b = foo<D<C>>(0);
+ "" + b->bar () + "";
+ }
+};
+struct G : F<D<int>>
+{
+ G (int);
+};
+void test () { G (0); }

View File

@ -1 +1 @@
353d904ccfe4dc9cfd8d9ddf67e4ad1d gcc-6.1.1-20160817.tar.bz2 87ef2d4f344fa8d66006b4d7579b96bd gcc-6.2.1-20160901.tar.bz2