diff --git a/.gitignore b/.gitignore index eee8aca..b7e1575 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ /gcc-6.0.0-20160129.tar.bz2 /gcc-6.0.0-20160201.tar.bz2 /gcc-6.0.0-20160205.tar.bz2 +/gcc-6.0.0-20160212.tar.bz2 diff --git a/gcc.spec b/gcc.spec index 2dbda30..590d16f 100644 --- a/gcc.spec +++ b/gcc.spec @@ -1,9 +1,9 @@ -%global DATE 20160205 -%global SVNREV 233185 +%global DATE 20160212 +%global SVNREV 233372 %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.10 +%global gcc_release 0.11 %global _unpackaged_files_terminate_build 0 %global _performance_build 1 # Hardening slows the compiler way too much. @@ -208,10 +208,9 @@ Patch12: gcc6-aarch64-async-unw-tables.patch Patch13: gcc6-libsanitize-aarch64-va42.patch Patch14: gcc6-pr65932-cse-revert.patch Patch15: gcc6-pr69241.patch -Patch16: gcc6-pr69628.patch -Patch17: gcc6-pr69658.patch -Patch18: gcc6-pr69691.patch -Patch19: gcc6-pr69274.patch +Patch16: gcc6-pr69658.patch +Patch17: gcc6-pr10200-revert.patch +Patch18: gcc6-pr68672.patch # On ARM EABI systems, we do want -gnueabi to be part of the # target triple. @@ -780,10 +779,9 @@ rm -f libgo/go/crypto/elliptic/p224{,_test}.go %patch13 -p0 -b .libsanitize-aarch64-va42~ %patch14 -p0 -b .pr65932-cse-revert~ %patch15 -p0 -b .pr69241~ -%patch16 -p0 -b .pr69628~ -%patch17 -p0 -b .pr69658~ -%patch18 -p0 -b .pr69691~ -%patch19 -p0 -b .pr69274~ +%patch16 -p0 -b .pr69658~ +%patch17 -p0 -b .pr10200~ +%patch18 -p0 -b .pr68672~ %if 0%{?_enable_debug_packages} mkdir dwz-wrapper @@ -1057,7 +1055,7 @@ CC="$CC" CXX="$CXX" CFLAGS="$OPT_FLAGS" \ --enable-languages=c,c++,objc,obj-c++,fortran${enablelada}${enablelgo},lto \ $CONFIGURE_OPTS -%ifarch sparc sparcv9 sparc64 ppc64 +%ifarch sparc sparcv9 sparc64 make %{?_smp_mflags} BOOT_CFLAGS="$OPT_FLAGS" bootstrap %else make %{?_smp_mflags} BOOT_CFLAGS="$OPT_FLAGS" profiledbootstrap @@ -3076,6 +3074,25 @@ fi %doc rpm.doc/changelogs/libcc1/ChangeLog* %changelog +* Fri Feb 12 2016 Jakub Jelinek 6.0.0-0.11 +- update from the trunk + - PRs c++/10200, c++/59627, c++/67835, c++/68726, c++/68926, c++/69098, + c++/69139, c++/69283, c++/69631, c++/69657, c++/69662, c++/69688, + c/69522, c/69643, c/69768, fortran/50555, fortran/66089, + fortran/69296, go/68562, ipa/69239, libstdc++/48891, lto/69707, + middle-end/66726, other/69722, plugins/69758, preprocessor/69664, + rtl-optimization/68730, rtl-optimization/69291, + rtl-optimization/69737, target/60410, target/65313, target/65867, + target/68273, target/68404, target/68532, target/69148, target/69634, + target/69713, tree-opt/69282, tree-optimization/65917, + tree-optimization/68021, tree-optimization/68541, + tree-optimization/69209, tree-optimization/69599, + tree-optimization/69652, tree-optimization/69715, + tree-optimization/69719, tree-optimization/69726 +- temporarily revert PR c++/10200 fix +- fix -fpartial-inlining with clobber or debug stmts in return_bb + (PR ipa/68672) + * 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, diff --git a/gcc6-pr10200-revert.patch b/gcc6-pr10200-revert.patch new file mode 100644 index 0000000..29ff7ce --- /dev/null +++ b/gcc6-pr10200-revert.patch @@ -0,0 +1,104 @@ +Revert due to PR69753: +2016-02-10 Jason Merrill + + PR c++/10200 + * parser.c (cp_parser_lookup_name): When looking for a template + after . or ->, only consider class templates. + (cp_parser_postfix_dot_deref_expression): Handle the current + instantiation. Remember a dependent object expression. + * typeck2.c (build_x_arrow): Handle the current instantiation. + +--- gcc/cp/typeck2.c (revision 233277) ++++ gcc/cp/typeck2.c (revision 233276) +@@ -1694,10 +1694,7 @@ build_x_arrow (location_t loc, tree expr + + if (processing_template_decl) + { +- if (type && TREE_CODE (type) == POINTER_TYPE +- && !dependent_scope_p (TREE_TYPE (type))) +- /* Pointer to current instantiation, don't treat as dependent. */; +- else if (type_dependent_expression_p (expr)) ++ if (type_dependent_expression_p (expr)) + return build_min_nt_loc (loc, ARROW_EXPR, expr); + expr = build_non_dependent_expr (expr); + } +--- gcc/cp/parser.c (revision 233277) ++++ gcc/cp/parser.c (revision 233276) +@@ -7184,16 +7184,8 @@ cp_parser_postfix_dot_deref_expression ( + if (token_type == CPP_DEREF) + postfix_expression = build_x_arrow (location, postfix_expression, + tf_warning_or_error); +- /* According to the standard, no expression should ever have +- reference type. Unfortunately, we do not currently match +- the standard in this respect in that our internal representation +- of an expression may have reference type even when the standard +- says it does not. Therefore, we have to manually obtain the +- underlying type here. */ +- scope = non_reference (TREE_TYPE (postfix_expression)); +- /* Check to see whether or not the expression is type-dependent and +- not the current instantiation. */ +- dependent_p = !scope || dependent_scope_p (scope); ++ /* Check to see whether or not the expression is type-dependent. */ ++ dependent_p = type_dependent_expression_p (postfix_expression); + /* The identifier following the `->' or `.' is not qualified. */ + parser->scope = NULL_TREE; + parser->qualifying_scope = NULL_TREE; +@@ -7202,8 +7194,16 @@ cp_parser_postfix_dot_deref_expression ( + + /* Enter the scope corresponding to the type of the object + given by the POSTFIX_EXPRESSION. */ +- if (!dependent_p) ++ if (!dependent_p && TREE_TYPE (postfix_expression) != NULL_TREE) + { ++ scope = TREE_TYPE (postfix_expression); ++ /* According to the standard, no expression should ever have ++ reference type. Unfortunately, we do not currently match ++ the standard in this respect in that our internal representation ++ of an expression may have reference type even when the standard ++ says it does not. Therefore, we have to manually obtain the ++ underlying type here. */ ++ scope = non_reference (scope); + /* The type of the POSTFIX_EXPRESSION must be complete. */ + if (scope == unknown_type_node) + { +@@ -7215,10 +7215,7 @@ cp_parser_postfix_dot_deref_expression ( + required to be of complete type for purposes of class member + access (5.2.5) outside the member function body. */ + else if (postfix_expression != current_class_ref +- && !(processing_template_decl +- && current_class_type +- && (same_type_ignoring_top_level_qualifiers_p +- (scope, current_class_type)))) ++ && !(processing_template_decl && scope == current_class_type)) + scope = complete_type_or_else (scope, NULL_TREE); + /* Let the name lookup machinery know that we are processing a + class member access expression. */ +@@ -7234,10 +7231,6 @@ cp_parser_postfix_dot_deref_expression ( + if (scope == error_mark_node) + postfix_expression = error_mark_node; + } +- else +- /* Tell cp_parser_lookup_name that there was an object, even though it's +- type-dependent. */ +- parser->context->object_type = unknown_type_node; + + /* Assume this expression is not a pseudo-destructor access. */ + pseudo_destructor_p = false; +@@ -24727,15 +24720,10 @@ cp_parser_lookup_name (cp_parser *parser + decl = NULL_TREE; + + if (!decl) +- /* Look it up in the enclosing context. DR 141: When looking for a +- template-name after -> or ., only consider class templates. */ +- decl = lookup_name_real (name, tag_type != none_type || is_template, ++ /* Look it up in the enclosing context. */ ++ decl = lookup_name_real (name, tag_type != none_type, + /*nonclass=*/0, + /*block_p=*/true, is_namespace, 0); +- if (object_type == unknown_type_node) +- /* The object is type-dependent, so we can't look anything up; we used +- this to get the DR 141 behavior. */ +- object_type = NULL_TREE; + parser->object_scope = object_type; + parser->qualifying_scope = NULL_TREE; + } diff --git a/gcc6-pr68672.patch b/gcc6-pr68672.patch new file mode 100644 index 0000000..ed7c8bf --- /dev/null +++ b/gcc6-pr68672.patch @@ -0,0 +1,299 @@ +2016-02-11 Jakub Jelinek + + PR ipa/68672 + * ipa-split.c (split_function): Don't compute/use main_part_return_p. + Compute retval and retbnd early in all cases if split_part_return_p + and return_bb is not EXIT. Remove all clobber stmts and reset + all debug stmts that refer to SSA_NAMEs defined in split part, + except if it is retval, in that case replace the old retval with the + lhs of the call to the split part. + + * g++.dg/ipa/pr68672-1.C: New test. + * g++.dg/ipa/pr68672-2.C: New test. + * g++.dg/ipa/pr68672-3.C: New test. + +--- gcc/ipa-split.c.jj 2016-02-11 10:50:52.888220581 +0100 ++++ gcc/ipa-split.c 2016-02-11 12:46:15.975777652 +0100 +@@ -1244,28 +1244,13 @@ split_function (basic_block return_bb, s + args_to_pass.safe_push (arg); + } + +- /* See if the split function or the main part will return. */ +- bool main_part_return_p = false; ++ /* See if the split function will return. */ + bool split_part_return_p = false; + FOR_EACH_EDGE (e, ei, return_bb->preds) + { + if (bitmap_bit_p (split_point->split_bbs, e->src->index)) + split_part_return_p = true; +- else +- main_part_return_p = true; + } +- /* 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) +- { +- if (! bitmap_bit_p (split_point->split_bbs, e->src->index) +- && single_succ_p (e->src)) +- { +- main_part_return_p = true; +- break; +- } +- } + + /* Add return block to what will become the split function. + We do not return; no return block is needed. */ +@@ -1279,8 +1264,8 @@ split_function (basic_block return_bb, s + FIXME: Once we are able to change return type, we should change function + to return void instead of just outputting function with undefined return + value. For structures this affects quality of codegen. */ +- else if (!split_point->split_part_set_retval +- && (retval = find_retval (return_bb))) ++ else if ((retval = find_retval (return_bb)) ++ && !split_point->split_part_set_retval) + { + bool redirected = true; + basic_block new_return_bb = create_basic_block (NULL, 0, return_bb); +@@ -1308,12 +1293,10 @@ split_function (basic_block return_bb, s + } + /* When we pass around the value, use existing return block. */ + else +- bitmap_set_bit (split_point->split_bbs, return_bb->index); +- +- /* If the main part doesn't return pretend the return block wasn't +- found for all of the following. */ +- if (! main_part_return_p) +- return_bb = EXIT_BLOCK_PTR_FOR_FN (cfun); ++ { ++ bitmap_set_bit (split_point->split_bbs, return_bb->index); ++ retbnd = find_retbnd (return_bb); ++ } + + /* If RETURN_BB has virtual operand PHIs, they must be removed and the + virtual operand marked for renaming as we change the CFG in a way that +@@ -1382,6 +1365,44 @@ split_function (basic_block return_bb, s + DECL_FUNCTION_CODE (node->decl) = (enum built_in_function) 0; + } + ++ /* If return_bb contains any clobbers that refer to SSA_NAMEs ++ set in the split part, remove them. Also reset debug stmts that ++ refer to SSA_NAMEs set in the split part. */ ++ if (return_bb != EXIT_BLOCK_PTR_FOR_FN (cfun)) ++ { ++ gimple_stmt_iterator gsi = gsi_start_bb (return_bb); ++ while (!gsi_end_p (gsi)) ++ { ++ tree op; ++ ssa_op_iter iter; ++ gimple *stmt = gsi_stmt (gsi); ++ bool remove = false; ++ if (gimple_clobber_p (stmt) || is_gimple_debug (stmt)) ++ FOR_EACH_SSA_TREE_OPERAND (op, stmt, iter, SSA_OP_USE) ++ { ++ basic_block bb = gimple_bb (SSA_NAME_DEF_STMT (op)); ++ if (op != retval ++ && bb ++ && bb != return_bb ++ && bitmap_bit_p (split_point->split_bbs, bb->index)) ++ { ++ if (is_gimple_debug (stmt)) ++ { ++ gimple_debug_bind_reset_value (stmt); ++ update_stmt (stmt); ++ } ++ else ++ remove = true; ++ break; ++ } ++ } ++ if (remove) ++ gsi_remove (&gsi, true); ++ else ++ gsi_next (&gsi); ++ } ++ } ++ + /* If the original function is instrumented then it's + part is also instrumented. */ + if (with_bounds) +@@ -1499,9 +1520,7 @@ split_function (basic_block return_bb, s + return value into and put call just before it. */ + if (return_bb != EXIT_BLOCK_PTR_FOR_FN (cfun)) + { +- real_retval = retval = find_retval (return_bb); +- retbnd = find_retbnd (return_bb); +- ++ real_retval = retval; + if (real_retval && split_point->split_part_set_retval) + { + gphi_iterator psi; +@@ -1545,6 +1564,28 @@ split_function (basic_block return_bb, s + break; + } + update_stmt (gsi_stmt (bsi)); ++ /* Also adjust clobbers and debug stmts in return_bb. */ ++ for (bsi = gsi_start_bb (return_bb); !gsi_end_p (bsi); ++ gsi_next (&bsi)) ++ { ++ gimple *stmt = gsi_stmt (bsi); ++ if (gimple_clobber_p (stmt) ++ || is_gimple_debug (stmt)) ++ { ++ ssa_op_iter iter; ++ use_operand_p use_p; ++ bool update = false; ++ FOR_EACH_SSA_USE_OPERAND (use_p, stmt, iter, ++ SSA_OP_USE) ++ if (USE_FROM_PTR (use_p) == real_retval) ++ { ++ SET_USE (use_p, retval); ++ update = true; ++ } ++ if (update) ++ update_stmt (stmt); ++ } ++ } + } + + /* Replace retbnd with new one. */ +--- gcc/testsuite/g++.dg/ipa/pr68672-1.C.jj 2016-02-11 12:31:27.344497187 +0100 ++++ gcc/testsuite/g++.dg/ipa/pr68672-1.C 2016-02-11 12:31:01.000000000 +0100 +@@ -0,0 +1,20 @@ ++// PR ipa/68672 ++// { dg-do compile } ++// { dg-options "-O -finline-small-functions -fpartial-inlining --param=partial-inlining-entry-probability=100" } ++ ++void f2 (void *); ++void *a; ++struct C { virtual void m1 (); }; ++struct D { C *m2 () { if (a) __builtin_abort (); } }; ++D f1 (); ++struct E { int e; ~E () { if (e) f2 (&e); } }; ++E *b; ++struct I { virtual void m3 (); }; ++ ++void ++I::m3 () ++{ ++ if (a) ++ f1 ().m2 ()->m1 (); ++ b->~E (); ++} +--- gcc/testsuite/g++.dg/ipa/pr68672-2.C.jj 2016-02-11 12:33:50.744438948 +0100 ++++ gcc/testsuite/g++.dg/ipa/pr68672-2.C 2016-02-11 12:32:50.000000000 +0100 +@@ -0,0 +1,54 @@ ++// PR ipa/68672 ++// { dg-do compile } ++// { dg-options "-O3 --param=partial-inlining-entry-probability=100 -g" } ++ ++struct S { ~S () {} }; ++S *a; ++int *b; ++void bar (); ++void baz (); ++void fn (int *); ++ ++static int ++foo () ++{ ++ S *c = a; ++ if (c) ++ { ++ bar (); ++ if (a) ++ __builtin_abort (); ++ baz (); ++ } ++ int p = *b; ++ if (p) ++ { ++ fn (b); fn (b); fn (b); fn (b); fn (b); fn (b); fn (b); fn (b); fn (b); fn (b); ++ fn (b); fn (b); fn (b); fn (b); fn (b); fn (b); fn (b); fn (b); fn (b); fn (b); ++ fn (b); fn (b); fn (b); fn (b); fn (b); fn (b); fn (b); fn (b); fn (b); fn (b); ++ fn (b); fn (b); fn (b); fn (b); fn (b); fn (b); fn (b); fn (b); fn (b); fn (b); ++ } ++ c->~S (); ++ int q = 2 * p; ++ int r = 3 * q; ++ S *d = c; ++ return p; ++} ++ ++void ++use1 () ++{ ++ foo (); ++} ++ ++void ++use2 () ++{ ++ foo (); ++} ++ ++void ++use3 () ++{ ++ foo (); ++} +--- gcc/testsuite/g++.dg/ipa/pr68672-3.C.jj 2016-02-11 12:34:02.374272024 +0100 ++++ gcc/testsuite/g++.dg/ipa/pr68672-3.C 2016-02-11 12:34:22.337985482 +0100 +@@ -0,0 +1,57 @@ ++// PR ipa/68672 ++// { dg-do compile } ++// { dg-options "-O3 --param=partial-inlining-entry-probability=100 -g" } ++ ++struct S { ~S () {} }; ++S *a, *e; ++int *b; ++void bar (); ++void baz (); ++void fn (int *); ++void fn2 (S *); ++ ++static int ++foo () ++{ ++ S *c = a; ++ if (c) ++ { ++ bar (); ++ if (a) ++ __builtin_abort (); ++ baz (); ++ } ++ int p = *b; ++ S *f = e; ++ if (p) ++ { ++ fn2 (f); ++ fn (b); fn (b); fn (b); fn (b); fn (b); fn (b); fn (b); fn (b); fn (b); fn (b); ++ fn (b); fn (b); fn (b); fn (b); fn (b); fn (b); fn (b); fn (b); fn (b); fn (b); ++ fn (b); fn (b); fn (b); fn (b); fn (b); fn (b); fn (b); fn (b); fn (b); fn (b); ++ fn (b); fn (b); fn (b); fn (b); fn (b); fn (b); fn (b); fn (b); fn (b); fn (b); ++ } ++ f->~S (); ++ int q = 2 * p; ++ int r = 3 * q; ++ S *d = c; ++ return p; ++} ++ ++void ++use1 () ++{ ++ foo (); ++} ++ ++void ++use2 () ++{ ++ foo (); ++} ++ ++void ++use3 () ++{ ++ foo (); ++} diff --git a/gcc6-pr69241.patch b/gcc6-pr69241.patch index 74bf6ad..39f6f1b 100644 --- a/gcc6-pr69241.patch +++ b/gcc6-pr69241.patch @@ -1,163 +1,88 @@ -2016-02-03 Jakub Jelinek - Patrick Palka +2016-02-10 Jakub Jelinek 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. + * ipa-split.c (split_function): If split part returns TREE_ADDRESSABLE + type by reference, force lhs on the call. - * 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. + * g++.dg/ipa/pr69241-4.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 @@ +--- gcc/ipa-split.c.jj 2016-02-11 12:46:15.975777652 +0100 ++++ gcc/ipa-split.c 2016-02-11 13:06:57.715241871 +0100 +@@ -629,7 +629,18 @@ consider_split (struct split_point *curr + 4) For non-SSA we need to look where the var is computed. */ + retval = find_retval (return_bb); + if (!retval) +- current->split_part_set_retval = true; ++ { ++ /* If there is a return_bb with no return value in function returning ++ value by reference, also make the split part return void, otherwise ++ we expansion would try to create a non-POD temporary, which is ++ invalid. */ ++ if (return_bb != EXIT_BLOCK_PTR_FOR_FN (cfun) ++ && DECL_RESULT (current_function_decl) ++ && DECL_BY_REFERENCE (DECL_RESULT (current_function_decl))) ++ current->split_part_set_retval = false; ++ else ++ current->split_part_set_retval = true; ++ } + else if (is_gimple_min_invariant (retval)) + current->split_part_set_retval = false; + /* Special case is value returned by reference we record as if it was non-ssa +--- gcc/testsuite/g++.dg/ipa/pr69241-4.C.jj 2016-02-11 13:00:04.160075417 +0100 ++++ gcc/testsuite/g++.dg/ipa/pr69241-4.C 2016-02-11 13:00:04.160075417 +0100 +@@ -0,0 +1,55 @@ +// PR ipa/69241 -+// { dg-do compile } -+// { dg-options "-O2" } ++// { dg-do compile { target c++11 } } ++// { dg-options "-O2 -Wno-return-type" } + -+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 &); ++template class A; ++struct B { ++ using pointer = int *; +}; -+struct D : public C {}; -+struct F : public D -+{ -+ virtual B m2 (); -+ virtual B m3 (); -+ int m4 (); ++template > class basic_string { ++ long _M_string_length; ++ enum { _S_local_capacity = 15 } _M_local_buf[_S_local_capacity]; ++ B::pointer _M_local_data; ++ ++public: ++ ~basic_string(); +}; -+struct G : F -+{ -+ B m2 (); -+ B m3 (); ++template ++int operator<<(_Traits, basic_string<_CharT, _Alloc>); ++class C { ++ basic_string> _M_string; +}; -+B G::m2 () -+{ -+ if (m4 () == 0) -+ return this; -+ return 0; -+} -+B G::m3 () -+{ -+ if (m4 () == 0) -+ return this; -+ return 0; ++class D { ++ C _M_stringbuf; ++}; ++class F { ++ int stream; ++ D stream_; ++}; ++class G { ++public: ++ void operator&(int); ++}; ++class H { ++public: ++ H(unsigned); ++ H(H &&); ++ bool m_fn1(); ++}; ++class I { ++ void m_fn2(const int &&); ++ static H m_fn3(const int &); ++}; ++template void Bind(Functor); ++class J { ++public: ++ static basic_string m_fn4(); ++}; ++int a; ++void I::m_fn2(const int &&) { Bind(m_fn3); } ++H I::m_fn3(const int &) { ++ !false ? (void)0 : G() & F() << J::m_fn4(); ++ H b(a); ++ if (b.m_fn1()) ++ F(); +} diff --git a/gcc6-pr69274.patch b/gcc6-pr69274.patch deleted file mode 100644 index 67d6a69..0000000 --- a/gcc6-pr69274.patch +++ /dev/null @@ -1,22 +0,0 @@ -2016-02-05 Richard Biener - - PR rtl-optimization/69274 - * ira.c (ira_setup_alts): Do not change recog_data.operand - order. - ---- gcc/ira.c (revision 231814) -+++ gcc/ira.c (working copy) -@@ -1888,10 +1888,11 @@ ira_setup_alts (rtx_insn *insn, HARD_REG - } - if (commutative < 0) - break; -- if (curr_swapped) -- break; -+ /* Swap forth and back to avoid changing recog_data. */ - std::swap (recog_data.operand[commutative], - recog_data.operand[commutative + 1]); -+ if (curr_swapped) -+ break; - } - } - diff --git a/gcc6-pr69628.patch b/gcc6-pr69628.patch deleted file mode 100644 index 2a06d55..0000000 --- a/gcc6-pr69628.patch +++ /dev/null @@ -1,38 +0,0 @@ -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-pr69691.patch b/gcc6-pr69691.patch deleted file mode 100644 index 528931b..0000000 --- a/gcc6-pr69691.patch +++ /dev/null @@ -1,149 +0,0 @@ -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 9b4ccae..5c03116 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -8f3f950e75ddde6b87c71096c645efb8 gcc-6.0.0-20160205.tar.bz2 +9add2f51dd3d4c93c13801fadfd8fb6e gcc-6.0.0-20160212.tar.bz2