With the new shrink-wrap algorithm, blocks reachable both with and
without prologue are duplicated, and their incoming edges are then
distributed accordingly. So we need to call fixup_partitions.
2015-09-16 Segher Boessenkool <segher@kernel.crashing.org>
PR bootstrap/67587
* function.c (rest_of_handle_thread_prologue_and_epilogue): Call
fixup_partitions.
From-SVN: r227827
2015-09-16 Richard Biener <rguenther@suse.de>
PR middle-end/67253
* cfgexpand.c (expand_gimple_stmt_1): Do not clobber
location of possibly shared trees.
* gcc.dg/torture/pr67253.c: New testcase.
From-SVN: r227826
2015-09-16 Richard Biener <rguenther@suse.de>
PR middle-end/67271
* fold-const.c (native_encode_expr): Bail out on bogus offsets.
* gcc.dg/pr67271.c: New testcase.
From-SVN: r227825
2015-09-16 Richard Biener <rguenther@suse.de>
PR middle-end/67442
* fold-const.c (extract_muldiv_1): Properly extend multiplication
result before builting a tree via wide_int_to_tree.
* gcc.dg/torture/pr67442.c: New testcase.
From-SVN: r227818
If the compiler supports split-stack but we are using a gold linker that
does not, as happens on PPC with current GCC but old gold, then we need
to compile the Go code with -fno-split-stack to avoid a linker error
avoid the inability to call from split-stack code to non-split-stack
code.
Reviewed-on: https://go-review.googlesource.com/14598
From-SVN: r227811
2015-09-15 Max Filippov <jcmvbkbc@gmail.com>
gcc/
* config/xtensa/xtensa.h (DWARF_ALT_FRAME_RETURN_COLUMN): New
definition.
(DWARF_FRAME_REGISTERS): Reserve space for one extra register in
call0 ABI.
libgcc/
* config/xtensa/linux-unwind.h (xtensa_fallback_frame_state):
Add support for call0 ABI.
From-SVN: r227809
2015-09-15 Max Filippov <jcmvbkbc@gmail.com>
gcc/
* config/xtensa/xtensa.c (xtensa_call_tls_desc): Use a10 or a2
to pass TLS call argument, according to current ABI.
* config/xtensa/xtensa.md (tls_call pattern): Use callx8 or
callx0 for TLS call, according to current ABI.
From-SVN: r227808
* tree-eh.c (lower_try_finally_dup_block): Clear location information
on stack restore statements.
(decide_copy_try_finally): Do not consider a stack restore statement as
coming from sources.
From-SVN: r227805
PR c/67580
* c-decl.c (tag_exists_p): New function.
* c-parser.c (c_parser_declaration_or_fndef): Give a hint when
struct/union/enum keywords are missing.
* c-tree.h (tag_exists_p): Declare.
* gcc.dg/pr67580.c: New test.
From-SVN: r227803
PPC has split-stack support in current GCC, but old version of gold will
reject attempts to link PPC split-stack and non-split-stack code
together. Test for that, and don't compile the C code with
-fsplit-stack if it doesn't work.
Reviewed-on: https://go-review.googlesource.com/14594
From-SVN: r227802
PR tree-optimization/47679
* tree-ssa-dom.c (expr_hash_elt): Now a class with ctors/dtors,
methods and private members.
(avail_exprs_stack): Similarly. Change type of global
from a pair of expr_hash_elt_t to the new class.
(expr_elt_hasher::hash): Corresponding changes.
(expr_elt_hasher::equal): Similarly.
(avail_expr_hash): Similarly.
(pass_dominator::execute): Similarly.
(dom_opt_dom_walker::thread_across_edge): Similarly.
(record_cond): Similarly.
(dom_opt_dom_walker::before_dom_children): Similarly.
(dom_opt_dom_walker::after_dom_children): Similarly.
(lookup_avail_expr): Likewise.
(initialize_hash_element): Now a expr_hash_elt constructor.
(initialize_hash_element_from_expr): Similarly.
(free_expr_hash_elt_contents): Now a dtor for class expr_hash_elt.
(free_expr_hash_elt): Call dtor for the element.
(remove_local_expressions_from_table): Now the "pop_to_marker"
method in the available_exprs_stack class.
(avail_expr_stack::record_expr): Method factored out.
(print_expr_hash_elt): Now a method in the expr_hash_elt class.
Fix formatting.
(hashable_expr_equal_p): Fix formatting.
From-SVN: r227801
gcc/ChangeLog:
* input.h (location_get_source_line): Drop "expanded_location"
param in favor of a file and line number.
* input.c (location_get_source_line): Likewise.
(dump_location_info): Update for change in signature of
location_get_source_line.
* diagnostic.c (diagnostic_print_caret_line): Likewise.
gcc/c-family/ChangeLog:
* c-format.c (location_from_offset): Update for change in
signature of location_get_source_line.
* c-indentation.c (get_visual_column): Likewise.
(line_contains_hash_if): Likewise.
From-SVN: r227800
* config/arm/arm.c (arm_gen_constant): Use HOST_WIDE_INT_M1U instead
of -1 when shifting. Change type of val to unsigned HOST_WIDE_INT.
Update prototype.
From-SVN: r227798
2015-09-15 Richard Biener <rguenther@suse.de>
PR tree-optimization/67470
* tree-ssa-loop-im.c (execute_sm_if_changed): Preserve PHI
structure for PHI hoisting by inserting a forwarder block
if appropriate.
* gcc.dg/torture/pr67470.c: New testcase.
From-SVN: r227797
* c-decl.c (lookup_label): Return NULL_TREE instead of 0.
(lookup_tag): Change the type of THISLEVEL_ONLY to bool.
Return NULL_TREE instead of 0.
(lookup_name): Return NULL_TREE instead of 0.
(lookup_name_in_scope): Likewise.
(shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
(parser_xref_tag): Use false instead of 0.
(start_struct): Use true instead of 1.
(start_enum): Use true instead of 1 and NULL_TREE instead of 0.
From-SVN: r227791
2015-09-15 Richard Biener <rguenther@suse.de>
PR middle-end/67563
* gimple-fold.c (gimplify_and_update_call_from_tree): Do not
transfer EH info from old to new stmt.
(replace_call_with_value): Likewise.
(replace_call_with_call_and_fold): Likewise.
(gimple_fold_builtin_memory_op): Likewise.
(gimple_fold_builtin_memset): Likewise.
(gimple_fold_builtin_stpcpy): Likewise.
(gimple_fold_call): Likewise.
* gcc.dg/pr67563.c: New testcase.
From-SVN: r227788
This avoids linker warnings when linking against glibc, as apparently
arm64 GNU/Linux does not support the ustat system call.
Also update to automake 1.11.6, as that is the new GCC standard.
Reviewed-on: https://go-review.googlesource.com/14567
From-SVN: r227777
This patch rewrites the shrink-wrapping algorithm, allowing non-linear
pieces of CFG to be duplicated for use without prologue instead of just
linear pieces.
* shrink-wrap.c (requires_stack_frame_p): Fix formatting.
(dup_block_and_redirect): Delete function.
(can_dup_for_shrink_wrapping): New function.
(fix_fake_fallthrough_edge): New function.
(try_shrink_wrapping): Rewrite function.
(convert_to_simple_return): Call fix_fake_fallthrough_edge.
From-SVN: r227775
The flag diagnostic_context::some_warnings_are_errors controls whether
to give the message "all warnings being treated as errors". However, when
warnings are buffered and then discarded, this flag is not reset. It turns
out we do not need this flag at all, since we already count explicitly how
many warnings were converted into errors, and this number is kept up to
date for the buffered diagnostics used by Fortran.
gcc/ChangeLog:
2015-09-14 Manuel López-Ibáñez <manu@gcc.gnu.org>
PR fortran/67460
* diagnostic.c (diagnostic_initialize): Do not set
some_warnings_are_errors.
(diagnostic_finish): Use DK_WERROR count instead.
(diagnostic_report_diagnostic): Do not set
some_warnings_are_errors.
* diagnostic.h (struct diagnostic_context): Remove
some_warnings_are_errors.
gcc/testsuite/ChangeLog:
2015-09-14 Manuel López-Ibáñez <manu@gcc.gnu.org>
PR fortran/67460
* gfortran.dg/pr67460.f90: New test.
From-SVN: r227760
When evaluating a constant expression, the gofrontend would incorrectly
force each operand to be represented as the resulting type before
checking if the operation was valid with the untyped constants.
According to the language specification on constant
expressions(http://golang.org/ref/spec#Constant_expressions): "Untyped
boolean, numeric, and string constants may be used as operands wherever
it is legal to use an operand of boolean, numeric, or string type,
respectively."
Fixesgolang/go#11566.
Reviewed-on: https://go-review.googlesource.com/12716
From-SVN: r227758
gen_rtx_CONST_VECTOR ensures that there is a single instance of:
(const_vector:M [(const_int -1) ... (const_int -1)])
for each M, so pointer equality with CONSTM1_RTX is enough. Also,
HOST_BITS_PER_WIDE_INT == 32 is doubly dead: HOST_WIDE_INT is always
64 bits now, and we always use const_int rather than const_double
or const_wide_int for all-ones values (or any other value that
fits in a signed HOST_WIDE_INT).
gcc/
* config/sparc/predicates.md (const_all_ones_operand): Use
CONSTM1_RTX to simplify definition.
From-SVN: r227757