diff --git a/.gitignore b/.gitignore index b11fa57..eee8aca 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ /gcc-6.0.0-20160128.tar.bz2 /gcc-6.0.0-20160129.tar.bz2 /gcc-6.0.0-20160201.tar.bz2 +/gcc-6.0.0-20160205.tar.bz2 diff --git a/gcc.spec b/gcc.spec index 6959985..93159dc 100644 --- a/gcc.spec +++ b/gcc.spec @@ -1,9 +1,9 @@ -%global DATE 20160201 -%global SVNREV 233052 +%global DATE 20160205 +%global SVNREV 233185 %global gcc_version 6.0.0 # 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 0.9 +%global gcc_release 0.10 %global _unpackaged_files_terminate_build 0 %global _performance_build 1 # Hardening slows the compiler way too much. @@ -206,8 +206,11 @@ Patch10: gcc6-no-add-needed.patch Patch11: gcc6-libgo-p224.patch Patch12: gcc6-aarch64-async-unw-tables.patch Patch13: gcc6-libsanitize-aarch64-va42.patch -Patch14: gcc6-pr69558.patch -Patch15: gcc6-pr69592.patch +Patch14: gcc6-pr65932-cse-revert.patch +Patch15: gcc6-pr69241.patch +Patch16: gcc6-pr69628.patch +Patch17: gcc6-pr69658.patch +Patch18: gcc6-pr69691.patch # On ARM EABI systems, we do want -gnueabi to be part of the # target triple. @@ -774,8 +777,11 @@ package or when debugging this package. rm -f libgo/go/crypto/elliptic/p224{,_test}.go %patch12 -p0 -b .aarch64-async-unw-tables~ %patch13 -p0 -b .libsanitize-aarch64-va42~ -%patch14 -p0 -b .pr69558~ -%patch15 -p0 -b .pr69592~ +%patch14 -p0 -b .pr65932-cse-revert~ +%patch15 -p0 -b .pr69241~ +%patch16 -p0 -b .pr69628~ +%patch17 -p0 -b .pr69658~ +%patch18 -p0 -b .pr69691~ %if 0%{?_enable_debug_packages} mkdir dwz-wrapper @@ -835,7 +841,7 @@ if [ -f "${BUILDDIR}"/debugfiles.list \ done cp -a "${BUILDDIR}"/debugfiles-base.list "${BUILDDIR}"/debugfiles-remove.list %if %{build_go} - libgoso=`basename .%{_prefix}/%{_lib}/libgo.so.8.*` + libgoso=`basename .%{_prefix}/%{_lib}/libgo.so.9.*` for f in %{_prefix}/bin/go.gcc \ %{_prefix}/bin/gofmt.gcc \ %{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/cgo \ @@ -846,8 +852,8 @@ if [ -f "${BUILDDIR}"/debugfiles.list \ rm -f usr/lib/debug$f.debug echo "/usr/lib/debug$f.debug" >> "${BUILDDIR}"/debugfiles-remove.list done - rm -f usr/lib/debug%{_prefix}/%{_lib}/libgo.so.8.debug - echo "/usr/lib/debug%{_prefix}/%{_lib}/libgo.so.8.debug" >> "${BUILDDIR}"/debugfiles-remove.list + rm -f usr/lib/debug%{_prefix}/%{_lib}/libgo.so.9.debug + echo "/usr/lib/debug%{_prefix}/%{_lib}/libgo.so.9.debug" >> "${BUILDDIR}"/debugfiles-remove.list for f in `find usr/lib/debug/.build-id -type l`; do if ls -l "$f" | egrep -q -- '->.*(/bin/go.gcc|/bin/gofmt.gcc|/cgo|lib[0-9]*/libgo\.so)'; then echo "/$f" >> "${BUILDDIR}"/debugfiles-remove.list @@ -1339,7 +1345,7 @@ ln -sf ../../../libstdc++.so.6.*[0-9] libstdc++.so ln -sf ../../../libgfortran.so.3.* libgfortran.so ln -sf ../../../libgomp.so.1.* libgomp.so %if %{build_go} -ln -sf ../../../libgo.so.8.* libgo.so +ln -sf ../../../libgo.so.9.* libgo.so %endif %if %{build_libquadmath} ln -sf ../../../libquadmath.so.0.* libquadmath.so @@ -1370,7 +1376,7 @@ ln -sf ../../../../%{_lib}/libstdc++.so.6.*[0-9] libstdc++.so ln -sf ../../../../%{_lib}/libgfortran.so.3.* libgfortran.so ln -sf ../../../../%{_lib}/libgomp.so.1.* libgomp.so %if %{build_go} -ln -sf ../../../../%{_lib}/libgo.so.8.* libgo.so +ln -sf ../../../../%{_lib}/libgo.so.9.* libgo.so %endif %if %{build_libquadmath} ln -sf ../../../../%{_lib}/libquadmath.so.0.* libquadmath.so @@ -1491,8 +1497,8 @@ ln -sf ../`echo ../../../../lib/libgfortran.so.3.* | sed s~/lib/~/lib64/~` 64/li ln -sf ../`echo ../../../../lib/libgomp.so.1.* | sed s~/lib/~/lib64/~` 64/libgomp.so %if %{build_go} rm -f libgo.so -echo 'INPUT ( %{_prefix}/lib/'`echo ../../../../lib/libgo.so.8.* | sed 's,^.*libg,libg,'`' )' > libgo.so -echo 'INPUT ( %{_prefix}/lib64/'`echo ../../../../lib/libgo.so.8.* | sed 's,^.*libg,libg,'`' )' > 64/libgo.so +echo 'INPUT ( %{_prefix}/lib/'`echo ../../../../lib/libgo.so.9.* | sed 's,^.*libg,libg,'`' )' > libgo.so +echo 'INPUT ( %{_prefix}/lib64/'`echo ../../../../lib/libgo.so.9.* | sed 's,^.*libg,libg,'`' )' > 64/libgo.so %endif %if %{build_libquadmath} rm -f libquadmath.so @@ -1598,8 +1604,8 @@ ln -sf ../`echo ../../../../lib64/libgfortran.so.3.* | sed s~/../lib64/~/~` 32/l ln -sf ../`echo ../../../../lib64/libgomp.so.1.* | sed s~/../lib64/~/~` 32/libgomp.so %if %{build_go} rm -f libgo.so -echo 'INPUT ( %{_prefix}/lib64/'`echo ../../../../lib64/libgo.so.8.* | sed 's,^.*libg,libg,'`' )' > libgo.so -echo 'INPUT ( %{_prefix}/lib/'`echo ../../../../lib64/libgo.so.8.* | sed 's,^.*libg,libg,'`' )' > 32/libgo.so +echo 'INPUT ( %{_prefix}/lib64/'`echo ../../../../lib64/libgo.so.9.* | sed 's,^.*libg,libg,'`' )' > libgo.so +echo 'INPUT ( %{_prefix}/lib/'`echo ../../../../lib64/libgo.so.9.* | sed 's,^.*libg,libg,'`' )' > 32/libgo.so %endif %if %{build_libquadmath} rm -f libquadmath.so @@ -1780,7 +1786,7 @@ chmod 755 %{buildroot}%{_prefix}/%{_lib}/libtsan.so.0.* chmod 755 %{buildroot}%{_prefix}/%{_lib}/liblsan.so.0.* %endif %if %{build_go} -chmod 755 %{buildroot}%{_prefix}/%{_lib}/libgo.so.8.* +chmod 755 %{buildroot}%{_prefix}/%{_lib}/libgo.so.9.* %endif chmod 755 %{buildroot}%{_prefix}/%{_lib}/libobjc.so.4.* @@ -2982,7 +2988,7 @@ fi %doc rpm.doc/go/* %files -n libgo -%{_prefix}/%{_lib}/libgo.so.8* +%{_prefix}/%{_lib}/libgo.so.9* %doc rpm.doc/libgo/* %files -n libgo-devel @@ -3068,6 +3074,24 @@ fi %doc rpm.doc/changelogs/libcc1/ChangeLog* %changelog +* Fri Feb 5 2016 Jakub Jelinek 6.0.0-0.10 +- update from the trunk + - PRs bootstrap/69611, bootstrap/69677, c++/68948, c++/69056, c++/69251, + c++/69253, c++/69277, c++/69290, c++/69349, c/69627, c/69669, + fortran/67451, fortran/69368, fortran/69418, libstdc++/69626, + middle-end/68542, rtl-opt/67609, rtl-optimization/64682, + rtl-optimization/69567, rtl-optimization/69577, sanitizer/69276, + target/65932, target/67032, target/67714, target/68124, target/68662, + target/69118, target/69369, target/69454, target/69461, target/69548, + target/69619, target/69625, target/69644, target/69667, target/69677, + testsuite/65940, tree-optimization/69580, tree-optimization/69595, + tree-optimization/69606 + - Go 1.6rc1 +- fix various C++ ICEs in assign_temp (PR ipa/69241, PR c++/69649) +- fix character constant error recovery (PR c++/69628) +- fix invalid diagnostics on C++ array initializers (PR c++/69658) +- fix RA subreg handling (PR rtl-optimization/69691) + * Mon Feb 1 2016 Jakub Jelinek 6.0.0-0.9 - update from the trunk - PRs middle-end/69556, tree-optimization/67921, tree-optimization/69574 diff --git a/gcc6-pr65932-cse-revert.patch b/gcc6-pr65932-cse-revert.patch new file mode 100644 index 0000000..12be488 --- /dev/null +++ b/gcc6-pr65932-cse-revert.patch @@ -0,0 +1,19 @@ +Revert: +2016-02-04 Kyrylo Tkachov + + PR target/65932 + PR target/67714 + * cse.c (cse_insn): Pass NULL to fold_rtx when initially + folding the source of a SET. + +--- gcc/cse.c (revision 233133) ++++ gcc/cse.c (revision 233132) +@@ -4636,7 +4636,7 @@ cse_insn (rtx_insn *insn) + + /* Simplify and foldable subexpressions in SRC. Then get the fully- + simplified result, which may not necessarily be valid. */ +- src_folded = fold_rtx (src, NULL); ++ src_folded = fold_rtx (src, insn); + + #if 0 + /* ??? This caused bad code to be generated for the m68k port with -O2. diff --git a/gcc6-pr69241.patch b/gcc6-pr69241.patch new file mode 100644 index 0000000..74bf6ad --- /dev/null +++ b/gcc6-pr69241.patch @@ -0,0 +1,163 @@ +2016-02-03 Jakub Jelinek + Patrick Palka + + PR ipa/69241 + PR c++/69649 + * gimplify.c (gimplify_modify_expr): Set lhs even for noreturn + calls if the return type is TREE_ADDRESSABLE. + * cgraphunit.c (cgraph_node::expand_thunk): Likewise. + * ipa-split.c (split_function): Fix doubled "we" in comment. + Use void return type for the split part even if + !split_point->split_part_set_retval. + + * g++.dg/ipa/pr69241-1.C: New test. + * g++.dg/ipa/pr69241-2.C: New test. + * g++.dg/ipa/pr69241-3.C: New test. + * g++.dg/ipa/pr69649.C: New test. + +--- gcc/gimplify.c.jj 2016-02-02 20:42:00.000000000 +0100 ++++ gcc/gimplify.c 2016-02-03 11:04:06.400757668 +0100 +@@ -4828,7 +4828,8 @@ gimplify_modify_expr (tree *expr_p, gimp + } + } + notice_special_calls (call_stmt); +- if (!gimple_call_noreturn_p (call_stmt)) ++ if (!gimple_call_noreturn_p (call_stmt) ++ || TREE_ADDRESSABLE (TREE_TYPE (*to_p))) + gimple_call_set_lhs (call_stmt, *to_p); + assign = call_stmt; + } +--- gcc/cgraphunit.c.jj 2016-01-20 10:55:15.000000000 +0100 ++++ gcc/cgraphunit.c 2016-02-03 11:04:41.034279370 +0100 +@@ -1703,7 +1703,8 @@ cgraph_node::expand_thunk (bool output_a + bsi = gsi_start_bb (bb); + + /* Build call to the function being thunked. */ +- if (!VOID_TYPE_P (restype) && !alias_is_noreturn) ++ if (!VOID_TYPE_P (restype) ++ && (!alias_is_noreturn || TREE_ADDRESSABLE (restype))) + { + if (DECL_BY_REFERENCE (resdecl)) + { +@@ -1770,7 +1771,7 @@ cgraph_node::expand_thunk (bool output_a + || DECL_BY_REFERENCE (resdecl))) + gimple_call_set_return_slot_opt (call, true); + +- if (restmp && !alias_is_noreturn) ++ if (restmp) + { + gimple_call_set_lhs (call, restmp); + gcc_assert (useless_type_conversion_p (TREE_TYPE (restmp), +--- gcc/ipa-split.c.jj 2016-01-04 14:55:52.000000000 +0100 ++++ gcc/ipa-split.c 2016-02-03 13:01:45.905136051 +0100 +@@ -1254,7 +1254,7 @@ split_function (basic_block return_bb, s + else + main_part_return_p = true; + } +- /* The main part also returns if we we split on a fallthru edge ++ /* The main part also returns if we split on a fallthru edge + and the split part returns. */ + if (split_part_return_p) + FOR_EACH_EDGE (e, ei, split_point->entry_bb->preds) +@@ -1364,8 +1364,9 @@ split_function (basic_block return_bb, s + /* Now create the actual clone. */ + cgraph_edge::rebuild_edges (); + node = cur_node->create_version_clone_with_body +- (vNULL, NULL, args_to_skip, !split_part_return_p, split_point->split_bbs, +- split_point->entry_bb, "part"); ++ (vNULL, NULL, args_to_skip, ++ !split_part_return_p || !split_point->split_part_set_retval, ++ split_point->split_bbs, split_point->entry_bb, "part"); + + node->split_part = true; + +--- gcc/testsuite/g++.dg/ipa/pr69241-1.C.jj 2016-02-03 10:56:10.624328263 +0100 ++++ gcc/testsuite/g++.dg/ipa/pr69241-1.C 2016-02-03 11:01:18.600075039 +0100 +@@ -0,0 +1,12 @@ ++// PR ipa/69241 ++// { dg-do compile } ++// { dg-options "-O2" } ++ ++struct R { R (const R &) {} }; ++__attribute__ ((noreturn)) R bar (); ++ ++R ++foo () ++{ ++ bar (); ++} +--- gcc/testsuite/g++.dg/ipa/pr69241-2.C.jj 2016-02-03 10:56:07.996364556 +0100 ++++ gcc/testsuite/g++.dg/ipa/pr69241-2.C 2016-02-03 11:01:42.958738639 +0100 +@@ -0,0 +1,18 @@ ++// PR ipa/69241 ++// { dg-do compile } ++// { dg-options "-O2" } ++ ++__attribute__((noreturn)) void foo (int); ++struct R { R (const R &) {} }; ++ ++R ++bar () ++{ ++ foo (0); ++} ++ ++R ++baz () ++{ ++ foo (0); ++} +--- gcc/testsuite/g++.dg/ipa/pr69241-3.C.jj 2016-02-03 11:00:39.840610317 +0100 ++++ gcc/testsuite/g++.dg/ipa/pr69241-3.C 2016-02-03 11:01:02.044303678 +0100 +@@ -0,0 +1,12 @@ ++// PR ipa/69241 ++// { dg-do compile } ++// { dg-options "-O2" } ++ ++struct R { int x[100]; }; ++__attribute__ ((noreturn)) R bar (); ++ ++void ++foo () ++{ ++ bar (); ++} +--- gcc/testsuite/g++.dg/ipa/pr69649.C.jj 2016-02-03 13:19:00.850845887 +0100 ++++ gcc/testsuite/g++.dg/ipa/pr69649.C 2016-02-03 13:18:43.000000000 +0100 +@@ -0,0 +1,36 @@ ++// PR c++/69649 ++// { dg-do compile } ++// { dg-options "-O2" } ++ ++struct A { virtual void m1 (); }; ++struct C : A { void m1 () { m1 (); } }; ++template struct B ++{ ++ T *t; ++ B (T *x) : t (x) { if (t) t->m1 (); } ++ B (const B &); ++}; ++struct D : public C {}; ++struct F : public D ++{ ++ virtual B m2 (); ++ virtual B m3 (); ++ int m4 (); ++}; ++struct G : F ++{ ++ B m2 (); ++ B m3 (); ++}; ++B G::m2 () ++{ ++ if (m4 () == 0) ++ return this; ++ return 0; ++} ++B G::m3 () ++{ ++ if (m4 () == 0) ++ return this; ++ return 0; ++} diff --git a/gcc6-pr69558.patch b/gcc6-pr69558.patch deleted file mode 100644 index 9d13731..0000000 --- a/gcc6-pr69558.patch +++ /dev/null @@ -1,62 +0,0 @@ -2016-01-29 Jakub Jelinek - - PR preprocessor/69543 - PR c/69558 - * c-pragma.c (handle_pragma_diagnostic): Pass input_location - instead of loc to control_warning_option. - - * gcc.dg/pr69543.c: New test. - * gcc.dg/pr69558.c: New test. - ---- gcc/c-family/c-pragma.c.jj 2016-01-15 21:57:00.000000000 +0100 -+++ gcc/c-family/c-pragma.c 2016-01-29 18:34:51.743943283 +0100 -@@ -819,7 +819,7 @@ handle_pragma_diagnostic(cpp_reader *ARG - arg = option_string + 1 + cl_options[option_index].opt_len; - control_warning_option (option_index, (int) kind, - arg, kind != DK_IGNORED, -- loc, lang_mask, &handlers, -+ input_location, lang_mask, &handlers, - &global_options, &global_options_set, - global_dc); - } ---- gcc/testsuite/gcc.dg/pr69558.c.jj 2016-01-29 18:43:32.191665058 +0100 -+++ gcc/testsuite/gcc.dg/pr69558.c 2016-01-29 18:40:05.000000000 +0100 -@@ -0,0 +1,17 @@ -+/* PR c/69558 */ -+/* { dg-do compile } */ -+/* { dg-options "-Wdeprecated-declarations" } */ -+ -+#define A \ -+ _Pragma ("GCC diagnostic push") \ -+ _Pragma ("GCC diagnostic ignored \"-Wdeprecated-declarations\"") -+#define B \ -+ _Pragma ("GCC diagnostic pop") -+#define C(x) \ -+ A \ -+ static inline void bar (void) { x (); } \ -+ B -+ -+__attribute__((deprecated)) void foo (void); /* { dg-bogus "declared here" } */ -+ -+C (foo) /* { dg-bogus "is deprecated" } */ ---- gcc/testsuite/gcc.dg/pr69543.c.jj 2016-01-29 18:45:09.520323395 +0100 -+++ gcc/testsuite/gcc.dg/pr69543.c 2016-01-29 18:44:56.000000000 +0100 -@@ -0,0 +1,18 @@ -+/* PR preprocessor/69543 */ -+/* { dg-do compile } */ -+/* { dg-options "-O2 -Wuninitialized" } */ -+ -+# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ -+ _Pragma ("GCC diagnostic push") \ -+ _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\ -+ _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") -+# define YY_IGNORE_MAYBE_UNINITIALIZED_END \ -+ _Pragma ("GCC diagnostic pop") -+ -+void test (char yylval) -+{ -+ char *yyvsp; -+ YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN -+ *++yyvsp = yylval; -+ YY_IGNORE_MAYBE_UNINITIALIZED_END -+} diff --git a/gcc6-pr69592.patch b/gcc6-pr69592.patch deleted file mode 100644 index 2fab52a..0000000 --- a/gcc6-pr69592.patch +++ /dev/null @@ -1,154 +0,0 @@ -2016-02-01 Jakub Jelinek - - PR rtl-optimization/69592 - * rtlanal.c (nonzero_bits_binary_arith_p): New inline function. - (cached_nonzero_bits): Use it instead of ARITHMETIC_P. - (num_sign_bit_copies_binary_arith_p): New inline function. - (cached_num_sign_bit_copies): Use it instead of ARITHMETIC_P. - - * gcc.dg/pr69592.c: New test. - ---- gcc/rtlanal.c.jj 2016-01-21 21:27:57.000000000 +0100 -+++ gcc/rtlanal.c 2016-02-01 18:53:06.130934333 +0100 -@@ -4163,6 +4163,36 @@ num_sign_bit_copies (const_rtx x, machin - return cached_num_sign_bit_copies (x, mode, NULL_RTX, VOIDmode, 0); - } - -+/* Return true if nonzero_bits1 might recurse into both operands -+ of X. */ -+ -+static inline bool -+nonzero_bits_binary_arith_p (const_rtx x) -+{ -+ if (!ARITHMETIC_P (x)) -+ return false; -+ switch (GET_CODE (x)) -+ { -+ case AND: -+ case XOR: -+ case IOR: -+ case UMIN: -+ case UMAX: -+ case SMIN: -+ case SMAX: -+ case PLUS: -+ case MINUS: -+ case MULT: -+ case DIV: -+ case UDIV: -+ case MOD: -+ case UMOD: -+ return true; -+ default: -+ return false; -+ } -+} -+ - /* The function cached_nonzero_bits is a wrapper around nonzero_bits1. - It avoids exponential behavior in nonzero_bits1 when X has - identical subexpressions on the first or the second level. */ -@@ -4179,7 +4209,7 @@ cached_nonzero_bits (const_rtx x, machin - nonzero_bits1 on X with the subexpressions as KNOWN_X and the - precomputed value for the subexpression as KNOWN_RET. */ - -- if (ARITHMETIC_P (x)) -+ if (nonzero_bits_binary_arith_p (x)) - { - rtx x0 = XEXP (x, 0); - rtx x1 = XEXP (x, 1); -@@ -4191,13 +4221,13 @@ cached_nonzero_bits (const_rtx x, machin - known_mode, known_ret)); - - /* Check the second level. */ -- if (ARITHMETIC_P (x0) -+ if (nonzero_bits_binary_arith_p (x0) - && (x1 == XEXP (x0, 0) || x1 == XEXP (x0, 1))) - return nonzero_bits1 (x, mode, x1, mode, - cached_nonzero_bits (x1, mode, known_x, - known_mode, known_ret)); - -- if (ARITHMETIC_P (x1) -+ if (nonzero_bits_binary_arith_p (x1) - && (x0 == XEXP (x1, 0) || x0 == XEXP (x1, 1))) - return nonzero_bits1 (x, mode, x0, mode, - cached_nonzero_bits (x0, mode, known_x, -@@ -4672,6 +4702,33 @@ nonzero_bits1 (const_rtx x, machine_mode - #undef cached_num_sign_bit_copies - - -+/* Return true if num_sign_bit_copies1 might recurse into both operands -+ of X. */ -+ -+static inline bool -+num_sign_bit_copies_binary_arith_p (const_rtx x) -+{ -+ if (!ARITHMETIC_P (x)) -+ return false; -+ switch (GET_CODE (x)) -+ { -+ case IOR: -+ case AND: -+ case XOR: -+ case SMIN: -+ case SMAX: -+ case UMIN: -+ case UMAX: -+ case PLUS: -+ case MINUS: -+ case MULT: -+ return true; -+ default: -+ return false; -+ } -+} -+ -+ - /* The function cached_num_sign_bit_copies is a wrapper around - num_sign_bit_copies1. It avoids exponential behavior in - num_sign_bit_copies1 when X has identical subexpressions on the -@@ -4689,7 +4746,7 @@ cached_num_sign_bit_copies (const_rtx x, - num_sign_bit_copies1 on X with the subexpressions as KNOWN_X and - the precomputed value for the subexpression as KNOWN_RET. */ - -- if (ARITHMETIC_P (x)) -+ if (num_sign_bit_copies_binary_arith_p (x)) - { - rtx x0 = XEXP (x, 0); - rtx x1 = XEXP (x, 1); -@@ -4703,7 +4760,7 @@ cached_num_sign_bit_copies (const_rtx x, - known_ret)); - - /* Check the second level. */ -- if (ARITHMETIC_P (x0) -+ if (num_sign_bit_copies_binary_arith_p (x0) - && (x1 == XEXP (x0, 0) || x1 == XEXP (x0, 1))) - return - num_sign_bit_copies1 (x, mode, x1, mode, -@@ -4711,7 +4768,7 @@ cached_num_sign_bit_copies (const_rtx x, - known_mode, - known_ret)); - -- if (ARITHMETIC_P (x1) -+ if (num_sign_bit_copies_binary_arith_p (x1) - && (x0 == XEXP (x1, 0) || x0 == XEXP (x1, 1))) - return - num_sign_bit_copies1 (x, mode, x0, mode, ---- gcc/testsuite/gcc.dg/pr69592.c.jj 2016-02-01 19:02:23.122251761 +0100 -+++ gcc/testsuite/gcc.dg/pr69592.c 2016-02-01 19:00:30.000000000 +0100 -@@ -0,0 +1,16 @@ -+/* PR rtl-optimization/69592 */ -+/* { dg-do compile } */ -+/* { dg-options "-O2" } */ -+ -+unsigned int -+foo (unsigned int a, unsigned int *b, unsigned int c) -+{ -+ unsigned int d; -+#define A(n) d = a + b[n]; if (d < a) c++; a = d; -+#define B(n) A(n##0) A(n##1) A(n##2) A(n##3) A(n##4) A(n##5) A(n##6) A(n##7) A(n##8) A(n##9) -+#define C(n) B(n##0) B(n##1) B(n##2) B(n##3) B(n##4) B(n##5) B(n##6) B(n##7) B(n##8) B(n##9) -+#define D(n) C(n##0) C(n##1) C(n##2) C(n##3) C(n##4) C(n##5) C(n##6) C(n##7) C(n##8) C(n##9) -+#define E(n) D(n##0) D(n##1) D(n##2) D(n##3) D(n##4) D(n##5) D(n##6) D(n##7) D(n##8) D(n##9) -+ C(1) C(2) C(3) C(4) C(5) C(6) -+ return d + c; -+} diff --git a/gcc6-pr69628.patch b/gcc6-pr69628.patch new file mode 100644 index 0000000..2a06d55 --- /dev/null +++ b/gcc6-pr69628.patch @@ -0,0 +1,38 @@ +2016-02-03 Jakub Jelinek + + PR c++/69628 + * charset.c (cpp_interpret_charconst): Clear *PCHARS_SEEN + and *UNSIGNEDP if bailing out early due to errors. + + * g++.dg/parse/pr69628.C: New test. + +--- libcpp/charset.c.jj 2016-01-04 15:14:08.000000000 +0100 ++++ libcpp/charset.c 2016-02-03 13:44:05.100120898 +0100 +@@ -1620,10 +1620,17 @@ cpp_interpret_charconst (cpp_reader *pfi + if (token->val.str.len == (size_t) (2 + wide + u8)) + { + cpp_error (pfile, CPP_DL_ERROR, "empty character constant"); ++ *pchars_seen = 0; ++ *unsignedp = 0; ++ return 0; ++ } ++ else if (!cpp_interpret_string (pfile, &token->val.str, 1, &str, ++ token->type)) ++ { ++ *pchars_seen = 0; ++ *unsignedp = 0; + return 0; + } +- else if (!cpp_interpret_string (pfile, &token->val.str, 1, &str, token->type)) +- return 0; + + if (wide) + result = wide_str_to_charconst (pfile, str, pchars_seen, unsignedp, +--- gcc/testsuite/g++.dg/parse/pr69628.C.jj 2016-02-03 13:47:55.300061110 +0100 ++++ gcc/testsuite/g++.dg/parse/pr69628.C 2016-02-03 13:47:32.000000000 +0100 +@@ -0,0 +1,5 @@ ++// PR c++/69628 ++// { dg-do compile } ++ ++0''; // { dg-error "empty character constant" } ++// { dg-error "expected unqualified-id before numeric constant" "" { target *-*-* } 4 } diff --git a/gcc6-pr69658.patch b/gcc6-pr69658.patch new file mode 100644 index 0000000..781e873 --- /dev/null +++ b/gcc6-pr69658.patch @@ -0,0 +1,41 @@ +2016-02-04 Jakub Jelinek + + PR c++/69658 + * init.c (expand_default_init): Only call reshape_init + in the direct-initialization from an initializer list case. + + * g++.dg/init/pr69658.C: New test. + +--- gcc/cp/init.c.jj 2016-01-29 12:12:46.000000000 +0100 ++++ gcc/cp/init.c 2016-02-04 18:53:26.865318337 +0100 +@@ -1636,16 +1636,17 @@ expand_default_init (tree binfo, tree tr + gcc_checking_assert ((flags & LOOKUP_ONLYCONVERTING) == 0 + && TREE_CHAIN (init) == NULL_TREE); + init = TREE_VALUE (init); ++ /* Only call reshape_init if it has not been called earlier ++ by the callers. */ ++ if (BRACE_ENCLOSED_INITIALIZER_P (init) && CP_AGGREGATE_TYPE_P (type)) ++ init = reshape_init (type, init, complain); + } + + if (init && BRACE_ENCLOSED_INITIALIZER_P (init) + && CP_AGGREGATE_TYPE_P (type)) + /* A brace-enclosed initializer for an aggregate. In C++0x this can + happen for direct-initialization, too. */ +- { +- init = reshape_init (type, init, complain); +- init = digest_init (type, init, complain); +- } ++ init = digest_init (type, init, complain); + + /* A CONSTRUCTOR of the target's type is a previously digested + initializer, whether that happened just above or in +--- gcc/testsuite/g++.dg/init/pr69658.C.jj 2016-02-04 18:55:46.862390961 +0100 ++++ gcc/testsuite/g++.dg/init/pr69658.C 2016-02-04 18:54:58.000000000 +0100 +@@ -0,0 +1,6 @@ ++// PR c++/69658 ++// { dg-do compile } ++ ++struct S { S (int); }; ++struct T { char n[6]; S s; }; ++T t[1] = { { "foo", 1 } }; // { dg-bogus "C99 designator" } diff --git a/gcc6-pr69691.patch b/gcc6-pr69691.patch new file mode 100644 index 0000000..528931b --- /dev/null +++ b/gcc6-pr69691.patch @@ -0,0 +1,149 @@ +2016-02-05 Jakub Jelinek + + PR rtl-optimization/69691 + * lra-eliminations.c (move_plus_up): Don't add the addend twice. + + * gcc.c-torture/execute/pr69691.c: New test. + +--- gcc/lra-eliminations.c.jj 2016-01-14 20:57:03.000000000 +0100 ++++ gcc/lra-eliminations.c 2016-02-05 16:54:42.142004224 +0100 +@@ -303,7 +303,8 @@ move_plus_up (rtx x) + subreg_lowpart_offset (x_mode, + subreg_reg_mode)); + if (cst && CONSTANT_P (cst)) +- return gen_rtx_PLUS (x_mode, lowpart_subreg (x_mode, subreg_reg, ++ return gen_rtx_PLUS (x_mode, lowpart_subreg (x_mode, ++ XEXP (subreg_reg, 0), + subreg_reg_mode), cst); + } + return x; +--- gcc/testsuite/gcc.c-torture/execute/pr69691.c.jj 2016-02-05 17:08:31.582557031 +0100 ++++ gcc/testsuite/gcc.c-torture/execute/pr69691.c 2016-02-05 17:08:24.000000000 +0100 +@@ -0,0 +1,127 @@ ++/* PR rtl-optimization/69691 */ ++ ++char u[] = { 46, 97, 99, 104, 52, 0 }; ++char *v[] = { u, 0 }; ++struct S { char a[10]; struct S *b[31]; }; ++struct S r[7], *r2 = r; ++static struct S *w = 0; ++ ++__attribute__((noinline, noclone)) int ++fn (int x) ++{ ++ if (__builtin_strchr (u, x) || x == 96) ++ return x; ++ __builtin_abort (); ++} ++ ++__attribute__((noinline, noclone)) int ++foo (char x) ++{ ++ if (x == 0) ++ __builtin_abort (); ++ if (fn (x) >= 96 && fn (x) <= 122) ++ return (fn (x) - 96); ++ else if (x == 46) ++ return 0; ++ else ++ { ++ __builtin_printf ("foo %d\n", x); ++ return -1; ++ } ++} ++ ++__attribute__((noinline, noclone)) void ++bar (char **x) ++{ ++ char **b, c, *d, e[500], *f, g[10]; ++ int z, l, h, i; ++ struct S *s; ++ ++ w = r2++; ++ for (b = x; *b; b++) ++ { ++ __builtin_strcpy (e, *b); ++ f = e; ++ do ++ { ++ d = __builtin_strchr (f, 32); ++ if (d) ++ *d = 0; ++ l = __builtin_strlen (f); ++ h = 0; ++ s = w; ++ __builtin_memset (g, 0, sizeof (g)); ++ for (z = 0; z < l; z++) ++ { ++ c = f[z]; ++ if (c >= 48 && c <= 57) ++ g[h] = c - 48; ++ else ++ { ++ i = foo (c); ++ if (!s->b[i]) ++ { ++ s->b[i] = r2++; ++ if (r2 == &r[7]) ++ __builtin_abort (); ++ } ++ s = s->b[i]; ++ h++; ++ } ++ } ++ __builtin_memcpy (s->a, g, 10); ++ if (d) ++ f = d + 1; ++ } ++ while (d); ++ } ++} ++ ++__attribute__((noinline, noclone)) void ++baz (char *x) ++{ ++ char a[300], b[300]; ++ int z, y, t, l; ++ struct S *s; ++ ++ l = __builtin_strlen (x); ++ *a = 96; ++ for (z = 0; z < l; z++) ++ { ++ a[z + 1] = fn ((unsigned int) x[z]); ++ if (foo (a[z + 1]) <= 0) ++ return; ++ } ++ a[l + 1] = 96; ++ l += 2; ++ __builtin_memset (b, 0, l + 2); ++ ++ if (!w) ++ return; ++ ++ for (z = 0; z < l; z++) ++ { ++ s = w; ++ for (y = z; y < l; y++) ++ { ++ s = s->b[foo (a[y])]; ++ if (!s) ++ break; ++ for (t = 0; t <= y - z + 2; t++) ++ if (s->a[t] > b[z + t]) ++ b[z + t] = s->a[t]; ++ } ++ } ++ for (z = 3; z < l - 2; z++) ++ if ((b[z] & 1) == 1) ++ asm (""); ++} ++ ++int ++main () ++{ ++ bar (v); ++ char c[] = { 97, 97, 97, 97, 97, 0 }; ++ baz (c); ++ return 0; ++} diff --git a/sources b/sources index 12fef62..9b4ccae 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -a5ea3b53e3c52e684097d088f7d9a565 gcc-6.0.0-20160201.tar.bz2 +8f3f950e75ddde6b87c71096c645efb8 gcc-6.0.0-20160205.tar.bz2