* gcc.c (record_temp_file): Release name string.
* ifcvt.c (noce_convert_multiple_sets): Use auto_vec instead
of vec.
* lra-lives.c (free_live_range_list): Utilize
lra_live_range_pool for allocation and deallocation.
(create_live_range): Likewise.
(copy_live_range): Likewise.
(lra_merge_live_ranges): Likewise.
(remove_some_program_points_and_update_live_ranges): Likewise.
(lra_create_live_ranges_1): Release point_freq_vec that can
be not freed from previous iteration of the function.
* tree-eh.c (lower_try_finally_switch): Use auto_vec instead of
vec.
* tree-sra.c (sra_deinitialize): Release all vectors in
base_access_vec.
* tree-ssa-dom.c (free_dom_edge_info): Make the function extern.
* tree-ssa-threadupdate.c (remove_ctrl_stmt_and_useless_edges):
Release edge_info for a removed edge.
(thread_through_all_blocks): Free region vector.
* tree-ssa.h (free_dom_edge_info): Declare function extern.
From-SVN: r230027
gcc/c/ChangeLog:
PR debug/67192
* c-typeck.c (c_finish_loop): For unconditional loops, set the
location of the backward-goto to the start of the loop body.
gcc/testsuite/ChangeLog:
PR debug/67192
* gcc.dg/guality/pr67192.c (f3, f4): New functions.
(main): Invoke them.
From-SVN: r230024
gcc/
* optabs.c (expand_vec_cond_expr): Always get sign from type.
* tree.c (wide_int_to_tree): Support negative values for boolean.
(build_nonstandard_boolean_type): Use signed type for booleans.
From-SVN: r230022
2015-11-09 Richard Biener <rguenther@suse.de>
PR tree-optimization/56118
* tree-vectorizer.h (vect_find_last_scalar_stmt_in_slp): Declare.
* tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Export.
* tree-vect-data-refs.c (vect_slp_analyze_node_dependences): New
function.
(vect_slp_analyze_data_ref_dependences): Instead of computing
all dependences of the region DRs just analyze the code motions
SLP vectorization will perform. Remove SLP instances that
cannot have their store/load motions applied.
(vect_analyze_data_refs): Allow DRs without a vectype
in BB vectorization.
* gcc.dg/vect/no-tree-sra-bb-slp-pr50730.c: Adjust.
From-SVN: r230020
PR rtl-optimization/67749
* ifcvt.c (noce_try_cmove_arith): Do not emit move in IF-ELSE
case before emitting the two blocks. Instead modify the register
in the corresponding final insn of the basic block.
From-SVN: r230014
2015-11-09 Thomas Preud'homme <thomas.preudhomme@arm.com>
gcc/
* gcc.target/arm/thumb2-slow-flash-data.c: Add missing typespec for
labelref and check use of constant pool by looking for .word and
similar directives.
From-SVN: r230010
While cmps and movs allow a segment override of the ds:esi
source, the es:edi source/destination cannot be overriden.
Simplify things in the backend for now by disallowing
segments for string insns entirely.
* config/i386/i386.c (ix86_check_no_addr_space): New.
(decide_alg): Add have_as parameter.
(alg_usable_p): Likewise; disable rep algorithms if set.
(ix86_expand_set_or_movmem): Notice if either MEM has a
non-default address space.
(ix86_expand_strlen): Likewise.
* config/i386/i386.md (strmov, strset): Likewise.
(*strmovdi_rex_1): Use ix86_check_no_addr_space.
(*strmovsi_1, *strmovqi_1, *rep_movdi_rex64, *rep_movsi, *rep_movqi,
*strsetdi_rex_1, *strsetsi_1, *strsethi_1, *strsetqi_1,
*rep_stosdi_rex64, *rep_stossi, *rep_stosqi, *cmpstrnqi_nz_1,
*cmpstrnqi_1, *strlenqi_1): Likewise.
From-SVN: r230002
* dwarf2out.c (modified_type_die): Pass the address space number
through TARGET_ADDR_SPACE_DEBUG to produce the dwarf address class.
* target.def (TARGET_ADDR_SPACE_DEBUG): New.
* targhooks.c (default_addr_space_debug): New.
* targhooks.h (default_addr_space_debug): Declare.
* doc/tm.texi.in (TARGET_ADDR_SPACE_DEBUG): Mark it.
* doc/tm.texi: Rebuild.
From-SVN: r230000
* gimple.c (check_loadstore): Return false when 0 is a valid address.
* fold-const.c (const_unop) [ADDR_SPACE_CONVERT_EXPR]: Do not fold
null when 0 is valid in the source address space.
* target.def (TARGET_ADDR_SPACE_ZERO_ADDRESS_VALID): New.
* targhooks.c (default_addr_space_zero_address_valid): New.
* targhooks.h (default_addr_space_zero_address_valid): Declare.
* doc/tm.texi.in (TARGET_ADDR_SPACE_ZERO_ADDRESS_VALID): Mark it.
* doc/tm.texi: Rebuild.
From-SVN: r229999
[PATCH] Minor refactoring in tree-ssanames.c & freelists verifier
* tree-into-ssa.c (names_to_release): No longer static.
* tree-into-ssa.h (names_to_release): Declare.
* tree-ssanames.c (verify_ssaname_freelists): New debug function.
(release_free_names_and_compact_live_names): New function extracted
from pass_release_ssa_names::execute.
(pass_release_ssa_names::execute): Use it.
Co-Authored-By: Nathan Sidwell <nathan@acm.org>
From-SVN: r229995
2015-11-08 Steven g. Kargl <kargl@gcc.gnu.org>
PR fortran/68053
* decl.c (add_init_expr_to_sym): Try to reduce initialization expression
before testing for a constant value.
2015-11-08 Steven g. Kargl <kargl@gcc.gnu.org>
PR fortran/68053
* gfortran.dg/pr68053.f90: New test.
From-SVN: r229992
Using the standard gnulib obstack source requires importing quite a
lot of other files from gnulib, and requires build changes.
include/
* obstack.h (__attribute_pure__): Expand _GL_ATTRIBUTE_PURE.
libiberty/
* obstack.c (__alignof__): Expand alignof_type from alignof.h.
(obstack_exit_failure): Don't use exitfail.h.
(_): Include libintl.h when HAVE_LIBINTL_H and nls enabled.
Provide default. Don't include gettext.h.
(_Noreturn): Define.
* obstacks.texi: Adjust node references to external libc info files.
From-SVN: r229988
This copies obstack.[ch] from gnulib, and updates the docs. The next
patch should be applied if someone repeats the import at a later date.
include/
* obstack.h: Import current gnulib file.
libiberty/
* obstack.c: Import current gnulib file.
* obstacks.texi: Updated doc, from glibc's manual/memory.texi.
From-SVN: r229987
New obstack uses sensible types, size_t instead of int for length
params. Since libsanitizer does not use prototypes from obstack.h to
call the real functions, it's necessary to update the libsanitizer
function declarations emitted by the INTERCEPTOR macro.
* sanitizer_common/sanitizer_common_interceptors.inc: Update size
params for _obstack_begin_1, _obstack_begin, _obstack_newchunk
interceptors.
* configure.ac: Substitute OBSTACK_DEFS.
* asan/Makefile.am: Add OBSTACK_DEFS to DEFS.
* tsan/Makefile.am: Likewise.
* configure: Regenerate.
* Makefile.in: Regenerate.
* asan/Makefile.in: Regenerate.
* interception/Makefile.in: Regenerate.
* libbacktrace/Makefile.in: Regenerate.
* lsan/Makefile.in: Regenerate.
* sanitizer_common/Makefile.in: Regenerate.
* tsan/Makefile.in: Regenerate.
* ubsan/Makefile.in: Regenerate.
From-SVN: r229986
Fixes a compile error with both old and new obstacks due to
obstack_chunk_free having the wrong signature. Also, setting chunk
size and alignment before obstack_init is pointless since they are
overwritten.
* vtv_malloc.cc (obstack_chunk_free): Correct param type.
(__vtv_malloc_init): Use obstack_specify_allocation.
From-SVN: r229985
New obstack.h casts obstack_next_free to (void *), resulting in it
being a non-lvalue, and warnings on pointer arithmetic.
gcc/
* gensupport.c (add_mnemonic_string): Make len param a size_t.
(gen_mnemonic_setattr): Make "size" var a size_t. Use
obstack_blank_fast to shrink obstack. Cast obstack_next_free
return value.
gcc/objc/
* objc-encoding.c (encode_aggregate_within): Cast obstack_next_free
return value.
From-SVN: r229984
The code mistakenly thinks any cond_jump has two successors. This is
not true if both destinations are the same, as can happen with weird
patterns as in the PR.
PR rtl-optimization/68182
* gcc/bb-reorder.c (reorder_basic_blocks_simple): Treat a conditional
branch with only one successor just like unconditional branches.
From-SVN: r229983
* tree-ssa-threadupdate.c (register_jump_thraed): Assert that a
non-FSM path has no edges marked with EDGE_DFS_BACK.
(ssa_redirect_edges): No longer call mark_loop_for_removal.
(thread_single_edge, def_split_header_continue_p): Remove.
(bb_ends_with_multiway_branch): Likewise.
(thread_through_loop_header): Remove cases of threading from
latch through the header. Simplify knowing we won't thread
the latch.
(thread_through_all_blocks): Simplify knowing that only the FSM
threader needs to handle backedges.
From-SVN: r229982
gcc/
PR c++/67942
* cp/init.c (warn_placement_new_too_small): Convert integer
operand of POINTER_PLUS_EXPR to ssize_t to determine its signed
value.
c-family/
* c.opt (Wplacement-new): Add a period to the end of
a sentence.
From-SVN: r229959
gcc/fortran/ChangeLog:
2015-11-08 Andre Vehreschild <vehre@gcc.gnu.org>
PR fortran/68218
* trans-array.c (gfc_array_init_size): Add gfc_evaluate_now() when
array spec in allocate is a function call.
gcc/testsuite/ChangeLog:
2015-11-08 Andre Vehreschild <vehre@gcc.gnu.org>
PR fortran/68218
* gfortran.dg/allocate_with_arrayspec_1.f90: New test.
From-SVN: r229956
2015-11-08 Steven G. Kargl <kargl@gc.gnu.org>
PR fortran/68224
* array.c (match_array_element_spec): Check of invalid NULL().
While here, fix nearby comments.
2015-11-08 Steven G. Kargl <kargl@gc.gnu.org>
PR fortran/68224
* gfortran.dg/pr68224.f90: New test.
From-SVN: r229955
2015-11-08 Paul Thomas <pault@gcc.gnu.org>
PR fortran/68196
* class.c (has_finalizer_component): Prevent infinite recursion
through this function if the derived type and that of its
component are the same.
* trans-types.c (gfc_get_derived_type): Do the same for proc
pointers by ignoring the explicit interface for the component.
PR fortran/66465
* check.c (same_type_check): If either of the expressions is
BT_PROCEDURE, use the typespec from the symbol, rather than the
expression.
2015-11-08 Paul Thomas <pault@gcc.gnu.org>
PR fortran/68196
* gfortran.dg/proc_ptr_47.f90: New test.
PR fortran/66465
* gfortran.dg/pr66465.f90: New test.
From-SVN: r229954
2015-11-07 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/68153
* check.c (gfc_check_reshape): Improve check for valid SHAPE argument.
2015-11-07 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/68153
* gfortran.dg/pr68153.f90: New test.
From-SVN: r229939
2015-11-07 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/68151
* match.c (match_case_selector): Check for invalid type.
2015-11-07 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/68151
* gfortran.dg/pr68151.f90: New test.
From-SVN: r229938
For x86, STC still gives better results for optimise-for-size than
"simple" does. So use STC at -Os as well.
PR rtl-optimization/67864
* common/config/i386/i386-common.c (ix86_option_optimization_table)
<OPT_freorder_blocks_algorithm_>: Use REORDER_BLOCKS_ALGORITHM_STC
at -Os and up.
From-SVN: r229937