1. 19 Nov, 2014 37 commits
    • rs6000: Fix signed integer overflows · 2d302f47
      bootstrap-ubsan on gcc112 shows a couple of signed integer overflows:
      
      config/rs6000/constraints.md:143:33: runtime error: signed integer overflow: 9223372036854775807 + 32768 cannot be represented in type 'long int'
      config/rs6000/predicates.md:396:22: runtime error: signed integer overflow: 9223372036854775807 + 2147516416 cannot be represented in type 'long int'
      config/rs6000/predicates.md:856:11: runtime error: negation of -9223372036854775808 cannot be represented in type 'long int'; cast to an unsigned type to negate this value to itself
      config/rs6000/predicates.md:862:12: runtime error: negation of -9223372036854775808 cannot be represented in type 'long int'; cast to an unsigned type to negate this value to itself
      config/rs6000/predicates.md:865:11: runtime error: negation of -9223372036854775808 cannot be represented in type 'long int'; cast to an unsigned type to negate this value to itself
      config/rs6000/predicates.md:868:12: runtime error: negation of -9223372036854775808 cannot be represented in type 'long int'; cast to an unsigned type to negate this value to itself
      config/rs6000/predicates.md:914:11: runtime error: negation of -9223372036854775808 cannot be represented in type 'long int'; cast to an unsigned type to negate this value to itself
      config/rs6000/predicates.md:917:12: runtime error: negation of -9223372036854775808 cannot be represented in type 'long int'; cast to an unsigned type to negate this value to itself
      config/rs6000/predicates.md:940:11: runtime error: negation of -9223372036854775808 cannot be represented in type 'long int'; cast to an unsigned type to negate this value to itself
      config/rs6000/predicates.md:946:12: runtime error: negation of -9223372036854775808 cannot be represented in type 'long int'; cast to an unsigned type to negate this value to itself
      config/rs6000/predicates.md:949:11: runtime error: negation of -9223372036854775808 cannot be represented in type 'long int'; cast to an unsigned type to negate this value to itself
      config/rs6000/predicates.md:955:12: runtime error: negation of -9223372036854775808 cannot be represented in type 'long int'; cast to an unsigned type to negate this value to itself
      
      2014-11-19  Markus Trippelsdorf  <markus@trippelsdorf.de>
      
      	* config/rs6000/constraints.md: Avoid signed integer overflows.
      	* config/rs6000/predicates.md: Likewise.
      
      From-SVN: r217785
      Markus Trippelsdorf committed
    • Fix up accidentally twice-applied patch. · 31b0bf51
      From-SVN: r217784
      Marek Polacek committed
    • re PR middle-end/63762 ([ARM]GCC generates UNPREDICTABLE STR with Rn = Rt when… · 9d6e10c7
      re PR middle-end/63762 ([ARM]GCC generates UNPREDICTABLE STR with Rn = Rt when hard-float abi is used)
      
      2014-11-19  Renlin Li  <Renlin.Li@arm.com>
      
              PR middle-end/63762
              * ira.c (ira): Update preferred class. 
      
              * gcc.dg/pr63762.c: New test.
      
      From-SVN: r217783
      Renlin Li committed
    • MAINTAINERS (OS Port Maintainers): Add overdue maintainership note from 2 years ago. · dd308ed8
      	* MAINTAINERS (OS Port Maintainers): Add overdue maintainership note
      	from 2 years ago.
      
      From-SVN: r217782
      Maxim Kuvyrkov committed
    • gimple.h (gimple_build_assign_with_ops): Add unary arg overload. · 00d66391
      	* gimple.h (gimple_build_assign_with_ops): Add unary arg overload.
      	(gimple_assign_set_rhs_with_ops_1): Renamed to ...
      	(gimple_assign_set_rhs_with_ops): ... this.  Adjust binary arg
      	inline overload to use it.  Add unary arg overload.
      	* gimple.c (gimple_build_assign_with_ops): New unary arg overload.
      	(gimple_assign_set_rhs_from_tree): Use
      	gimple_assign_set_rhs_with_ops instead of
      	gimple_assign_set_rhs_with_ops_1.
      	(gimple_assign_set_rhs_with_ops_1): Renamed to ...
      	(gimple_assign_set_rhs_with_ops): ... this.
      	* ipa-split.c (split_function): Remove last NULL argument
      	from gimple_build_assign_with_ops call.
      	* tree-ssa-loop-im.c
      	(move_computations_dom_walker::before_dom_children): Likewise.
      	* tsan.c (instrument_builtin_call): Likewise.
      	* tree-vect-stmts.c (vect_init_vector, vectorizable_mask_load_store,
      	vectorizable_conversion, vectorizable_load): Likewise.
      	* tree-vect-loop.c (vect_is_simple_reduction_1,
      	get_initial_def_for_induction): Likewise.
      	* tree-loop-distribution.c (generate_memset_builtin): Likewise.
      	* tree-vect-patterns.c (vect_handle_widen_op_by_const,
      	vect_recog_widen_mult_pattern, vect_operation_fits_smaller_type,
      	vect_recog_over_widening_pattern, vect_recog_rotate_pattern,
      	vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern,
      	vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast,
      	adjust_bool_pattern, vect_recog_bool_pattern): Likewise.
      	* tree-ssa-phiopt.c (conditional_replacement, abs_replacement,
      	neg_replacement): Likewise.
      	* asan.c (build_shadow_mem_access, maybe_create_ssa_name,
      	maybe_cast_to_ptrmode, asan_expand_check_ifn): Likewise.
      	* tree-vect-slp.c (vect_get_constant_vectors): Likewise.
      	* omp-low.c (lower_rec_input_clauses, expand_omp_for_generic,
      	expand_omp_for_static_nochunk, expand_omp_for_static_chunk,
      	simd_clone_adjust): Likewise.
      	* tree-vect-loop-manip.c (vect_create_cond_for_align_checks): Likewise.
      	* gimple-ssa-strength-reduction.c (introduce_cast_before_cand,
      	replace_one_candidate): Likewise.
      	* gimple-builder.c (build_type_cast): Likewise.
      	* tree-ssa-forwprop.c (simplify_rotate): Likewise.
      	(forward_propagate_addr_expr_1): Remove last NULL argument
      	from gimple_assign_set_rhs_with_ops call.
      	(simplify_vector_constructor): Use gimple_assign_set_rhs_with_ops
      	instead of gimple_assign_set_rhs_with_ops_1.
      	* tree-ssa-reassoc.c (maybe_optimize_range_tests): Remove last NULL
      	argument from gimple_build_assign_with_ops call.
      	(repropagate_negates): Remove last NULL argument from
      	gimple_assign_set_rhs_with_ops call.
      	* ubsan.c (ubsan_expand_null_ifn, ubsan_expand_objsize_ifn): Remove
      	last NULL argument from gimple_build_assign_with_ops call.
      	(instrument_bool_enum_load): Likewise.  Remove last NULL argument
      	from gimple_assign_set_rhs_with_ops call.
      	* tree-ssa-math-opts.c (build_and_insert_cast, convert_mult_to_fma):
      	Remove last NULL argument from gimple_build_assign_with_ops call.
      	(bswap_replace): Likewise.  Use gimple_assign_set_rhs_with_ops instead
      	of gimple_assign_set_rhs_with_ops_1.
      	(convert_plusminus_to_widen): Use gimple_assign_set_rhs_with_ops
      	instead of gimple_assign_set_rhs_with_ops_1.
      	* gimple-fold.c (replace_stmt_with_simplification): Likewise.
      	(rewrite_to_defined_overflow, gimple_build): Remove last NULL argument
      	from gimple_build_assign_with_ops call.
      	* tree-ssa-strlen.c (handle_pointer_plus): Remove last NULL argument
      	from gimple_assign_set_rhs_with_ops call.
      	* tree-vrp.c (simplify_truth_ops_using_ranges,
      	simplify_bit_ops_using_ranges): Remove last NULL argument from
      	gimple_assign_set_rhs_with_ops call.
      	(simplify_float_conversion_using_ranges,
      	simplify_internal_call_using_ranges): Remove last NULL argument from
      	gimple_build_assign_with_ops call.
      
      From-SVN: r217781
      Jakub Jelinek committed
    • [AArch64] Adjust generic move costs · 3969c510
        2014-11-19  Wilco Dijkstra  <wdijkstr@arm.com>
      
          PR target/61915
          * config/aarch64/aarch64.c (generic_regmove_cost): Increase FP move cost.
      
      From-SVN: r217780
      Wilco Dijkstra committed
    • Fixing the mess I did with the two previous commits. Sorry! · be60a120
      	PR sanitizer/62132
      	* c-c++-common/asan/misalign-1.c: Pass -fno-omit-frame-pointer on
      	darwin, adjust dg-output.
      	* c-c++-common/asan/misalign-2.c: Likewise.
      
      From-SVN: r217779
      François-Xavier Coudert committed
    • re PR sanitizer/63690 (ICE: tree check: expected class 'expression', have… · c71a55f8
      re PR sanitizer/63690 (ICE: tree check: expected class 'expression', have 'constant' (string_cst) with -fsanitize=undefined)
      
      	PR sanitizer/63690
      	* ubsan.c (instrument_object_size): Check for MEM_REF.
      
      	* gcc.dg/ubsan/pr63690.c: New test.
      
      From-SVN: r217778
      Marek Polacek committed
    • re PR sanitizer/62132 (FAIL: c-c++-common/asan/misalign-[12].c after r213807 on… · 3b5b7762
      re PR sanitizer/62132 (FAIL: c-c++-common/asan/misalign-[12].c after r213807 on x86_64-apple-darwin13 with -m32)
      
      	PR sanitizer/62132
      	* c-c++-common/asan/misalign-1.c: Pass -fno-omit-frame-pointer on
      	darwin, adjust dg-output.
      	* c-c++-common/asan/misalign-2.c: Likewise.
      
      From-SVN: r217777
      François-Xavier Coudert committed
    • re PR sanitizer/62132 (FAIL: c-c++-common/asan/misalign-[12].c after r213807 on… · 7b7874d2
      re PR sanitizer/62132 (FAIL: c-c++-common/asan/misalign-[12].c after r213807 on x86_64-apple-darwin13 with -m32)
      
      	PR sanitizer/62132
      	* c-c++-common/asan/misalign-1.c: Pass -fno-omit-frame-pointer on
      	darwin, adjust dg-output.
      	* c-c++-common/asan/misalign-2.c: Likewise.
      
      From-SVN: r217776
      Francois-Xavier Coudert committed
    • MAINTAINERS (Write After Approval): Revert my previous change. · ac8698a1
      	* MAINTAINERS (Write After Approval): Revert my previous change.
      
      From-SVN: r217775
      Alex Velenko committed
    • MAINTAINERS (Write After Approval): Revert my previous change. · 8dab9330
      2014-11-19  Renlin Li  <Renlin.Li@arm.com>
      
              * MAINTAINERS (Write After Approval): Revert my previous change.
      
      From-SVN: r217774
      Renlin Li committed
    • re PR regression/63868 (Multiple failures in the libgomp test suite between r217458 and r217501.) · 844b0125
      	PR regression/63868
      	* cgraph.c (cgraph_node::create): Guard g->have_offload with
      	ifdef ENABLE_OFFLOADING.
      	* omp-low.c (create_omp_child_function): Likewise.
      	(expand_omp_target): Guard node->mark_force_output and offload_funcs
      	with ifdef ENABLE_OFFLOADING.
      	* varpool.c (varpool_node::get_create): Guard g->have_offload and
      	offload_vars with ifdef ENABLE_OFFLOADING.
      
      From-SVN: r217773
      Ilya Verbin committed
    • re PR target/59593 ([arm big-endian] using "ldrh" access a immediate which… · 0096508a
      re PR target/59593 ([arm big-endian] using "ldrh" access a  immediate  which stored in a memory by word)
      
              PR target/59593
              * config/arm/arm.md (define_attr "arch"): Add v6t2.
              (define_attr "arch_enabled"): Add test for the above.
              (*movhi_insn_arch4): Add new alternative.
      
      Co-Authored-By: Shanyao Chen <chenshanyao@huawei.com>
      
      From-SVN: r217772
      Felix Yang committed
    • Allow the static chain to be set from C · 74893f25
      We need to be able to set the static chain on a few calls within the
      Go runtime, so expose this with __builtin_call_with_static_chain.
      
              * c-family/c-common.c (c_common_reswords): Add
              __builtin_call_with_static_chain.
              * c-family/c-common.h (RID_BUILTIN_CALL_WITH_STATIC_CHAIN): New.
              * c/c-parser.c (c_parser_postfix_expression): Handle it.
              * doc/extend.texi (__builtin_call_with_static_chain): Document it.
      
      From-SVN: r217771
      Richard Henderson committed
    • Allow the front-end to create calls with a static chain · f2d3d07e
      And, at the same time, allow indirect calls to have a static chain.
      We'll always eliminate the static chain if we can prove it's unused.
      
              * calls.c (prepare_call_address): Allow decl or type for first arg.
              (expand_call): Pass type to prepare_call_address if no decl.
              * gimple-fold.c (gimple_fold_call): Eliminate the static chain if
              the function doesn't use it; fold it otherwise.
              * gimplify.c (gimplify_call_expr): Gimplify the static chain.
              * tree-cfg.c (verify_gimple_call): Allow a static chain on indirect
              function calls.
      
      From-SVN: r217770
      Richard Henderson committed
    • Make TARGET_STATIC_CHAIN allow a function type · c21df29b
      As opposed to always being a decl.  This is a prerequisite
      to allowing the static chain to be loaded for indirect calls.
      
              * targhooks.c (default_static_chain): Remove check for
              DECL_STATIC_CHAIN.
              * config/moxie/moxie.c (moxie_static_chain): Likewise.
              * config/i386/i386.c (ix86_static_chain): Allow decl or type
              as the first argument.
              * config/xtensa/xtensa.c (xtensa_static_chain): Change the name
              of the unused first parameter.
              * doc/tm.texi (TARGET_STATIC_CHAIN): Document the first parameter
              may be a type.
              * target.def (static_chain): Likewise.
      
      From-SVN: r217769
      Richard Henderson committed
    • This is simple patch to add more conditional macros defined in ACLE 2.0. · 45b70a73
      2014-10-17  Renlin Li  <Renlin.Li@arm.com>
      
          * config/aarch64/aarch64.h (TARGET_CPU_CPP_BUILTINS): Define __ARM_FP_FAST,
          __ARM_FEATURE_FMA, __ARM_FP, __ARM_FEATURE_NUMERIC_MAXMIN, __ARM_NEON_FP.
      
      From-SVN: r217768
      Renlin Li committed
    • MAINTAINERS (Write After Approval): Add myself. · 1be22083
      2014-11-19  Renlin Li  <Renlin.Li@arm.com>
      
              * MAINTAINERS (Write After Approval): Add myself.
      
      From-SVN: r217767
      Renlin Li committed
    • re PR middle-end/63879 (ICE compiling Linux Kernel fs/ext3/namei.c with -fsanitize=undefined) · 3902bce0
      	PR sanitizer/63879
      	* fold-const.c (negate_expr_p) <case NEGATE_EXPR>: Return
      	!TYPE_OVERFLOW_SANITIZED.
      	(fold_negate_expr) <case INTEGER_CST>: Fold when overflow
      	does not trap and when overflow wraps, or when SANITIZE_SI_OVERFLOW
      	is 0.
      
      	* c-c++-common/ubsan/pr63879-1.c: New test.
      	* c-c++-common/ubsan/pr63879-2.c: New test.
      
      From-SVN: r217766
      Marek Polacek committed
    • collect2.c (main): Don't call fatal_error before diagnostic_initialize. · 877088b7
      gcc/
      2014-11-19  Ilya Tocar  <ilya.tocar@intel.com>
      
      	* collect2.c (main): Don't call fatal_error before
      	diagnostic_initialize.
      	* lto-wrapper.c (main): Likewise.
      
      From-SVN: r217765
      Ilya Tocar committed
    • * MAINTAINERS: Added myself to maintainers. · 59392f46
      From-SVN: r217762
      Alex Velenko committed
    • Fix tail-merge pass for dead type-unsafe code · 8024d4b6
      2014-11-19  Tom de Vries  <tom@codesourcery.com>
      
      	PR tree-optimization/62167
      	* tree-ssa-tail-merge.c (stmt_local_def): Handle statements with vuse
      	conservatively.
      	(gimple_equal_p): Don't use vn_valueize to compare for lhs equality of
      	assigns.
      
      	* gcc.dg/pr51879-12.c: Add xfails.
      	* gcc.dg/pr62167-run.c: New test.
      	* gcc.dg/pr62167.c: New test.
      
      From-SVN: r217761
      Tom de Vries committed
    • e.53.5.c: Require vect_simd_clones effective target. · 4a19f719
      	* testsuite/libgomp.c/examples-4/e.53.5.c: Require
      	vect_simd_clones effective target.
      	* testsuite/libgomp.fortran/examples-4/e.53.5.f90: Ditto.
      
      From-SVN: r217760
      Uros Bizjak committed
    • re PR tree-optimization/63915 (gomp/pr60823-2.c:31:1: error: dead STMT in EH table) · 2865f32a
      	PR tree-optimization/63915
      	* tree-vect-stmts.c (vectorizable_simd_clone_call): Pass
      	true instead of false as last argument to gsi_replace.
      
      	* c-c++-common/gomp/pr60823-4.c: New test.
      
      From-SVN: r217759
      Jakub Jelinek committed
    • re PR sanitizer/63520 (ICE: in get_biv_step, at loop-iv.c:824 with -fsanitize=undefined on ppc64) · 5620052d
      	PR sanitizer/63520
      	* internal-fn.c (expand_ubsan_result_store): New function.
      	(expand_addsub_overflow, expand_neg_overflow, expand_mul_overflow):
      	Use it instead of just emit_move_insn.
      
      	* c-c++-common/ubsan/pr63520.c: New test.
      
      From-SVN: r217758
      Jakub Jelinek committed
    • re PR tree-optimization/63844 (open mp parallelization prevents vectorization) · a2a2fe4b
      2014-11-19  Richard Biener  <rguenther@suse.de>
      
      	PR tree-optimization/63844
      	* omp-low.c (fixup_child_record_type): Use a restrict qualified
      	referece type for the receiver parameter.
      
      From-SVN: r217757
      Richard Biener committed
    • re PR c++/57654 ([c++11] static class member reference-to-a-reference will not compile) · 6df34b29
      2014-11-19  Paolo Carlini  <paolo.carlini@oracle.com>
      
      	PR c++/57654
      	* g++.dg/cpp0x/constexpr-ref7.C: New.
      
      From-SVN: r217756
      Paolo Carlini committed
    • re PR sanitizer/63913 (ICE: verify_gimple failed: statement marked for throw,… · d4698839
      re PR sanitizer/63913 (ICE: verify_gimple failed: statement marked for throw, but doesn't with -fnon-call-exceptions -fsanitize=bool)
      
      	PR sanitizer/63913
      	* ubsan.c: Include tree-eh.h.
      	(instrument_bool_enum_load): Handle loads that can throw.
      
      	* g++.dg/ubsan/pr63913.C: New test.
      
      From-SVN: r217755
      Jakub Jelinek committed
    • * gcc.dg/pure-2.c: Update line numbers. · 8f7d0ab9
      From-SVN: r217754
      Andreas Schwab committed
    • re PR rtl-optimization/63843 (wrong code generation at -O1 and higher) · 05f9c675
      	PR rtl-optimization/63843
      	* simplify-rtx.c (simplify_binary_operation_1) <case ASHIFTRT>: For
      	optimization of ashiftrt of subreg of lshiftrt, check that code
      	is ASHIFTRT.
      
      	* gcc.c-torture/execute/pr63843.c: New test.
      
      From-SVN: r217753
      Jakub Jelinek committed
    • attribs.c (decl_attributes): Remove always true condition, TREE_TYPE(x) will… · 26c87b1a
      attribs.c (decl_attributes): Remove always true condition, TREE_TYPE(x) will never compare equal to a TYPE_DECL.
      
      2014-11-18  Andrew MacLeod  <amacleod@redhat.com>
      
      	* attribs.c (decl_attributes): Remove always true condition,
      	TREE_TYPE(x) will never compare equal to a TYPE_DECL.
      
      From-SVN: r217750
      Andrew MacLeod committed
    • re PR c++/63924 (Constexpr constructible expression "is not constexpr" when used… · 052beba4
      re PR c++/63924 (Constexpr constructible expression "is not constexpr" when used in a template non-type argument)
      
      	PR c++/63924
      	* constexpr.c (cxx_eval_constant_expression) [PARM_DECL]: A load
      	from a variable of empty class type is constant.
      
      From-SVN: r217749
      Jason Merrill committed
    • constexpr.c (cxx_eval_statement_list): Handle statement-expressions. · 58611fb6
      	* constexpr.c (cxx_eval_statement_list): Handle statement-expressions.
      	(potential_constant_expression_1): Handle STMT_EXPR.
      
      From-SVN: r217748
      Jason Merrill committed
    • constexpr.c (cxx_eval_constant_expression): Give jump_target a default argument. · 5a804683
      	* constexpr.c (cxx_eval_constant_expression): Give jump_target a
      	default argument.
      	(lots): Omit NULL jump_target arguments.
      
      From-SVN: r217747
      Jason Merrill committed
    • constexpr.c (struct constexpr_ctx): Add quiet field. · 2b3ab879
      	* constexpr.c (struct constexpr_ctx): Add quiet field.
      	(cxx_eval_outermost_constant_expr, is_sub_constant_expr): Set it.
      	(lots): Replace allow_non_constant parameter with ctx->quiet.
      
      From-SVN: r217746
      Jason Merrill committed
    • Daily bump. · 643266a5
      From-SVN: r217745
      GCC Administrator committed
  2. 18 Nov, 2014 3 commits
    • [Patch] PR target/63937 TARGET_USE_BY_PIECES_INFRASTRUCTURE_P should take an… · 445d7826
      [Patch] PR target/63937 TARGET_USE_BY_PIECES_INFRASTRUCTURE_P should take an unsigned HOST_WIDE_INT size argument
      
      gcc/
      
      	PR target/63937
      	* target.def (use_by_pieces_infrastructure_p): Take unsigned
      	HOST_WIDE_INT as the size parameter.
      	* targhooks.c (default_use_by_pieces_infrastructure_p): Likewise.
      	* targhooks.h (default_use_by_pieces_infrastructure_p): Likewise.
      	* config/arc/arc.c (arc_use_by_pieces_infrastructure_p)): Likewise.
      	* config/mips/mips.c (mips_use_by_pieces_infrastructure_p)): Likewise.
      	* config/s390/s390.c (s390_use_by_pieces_infrastructure_p)): Likewise.
      	* config/sh/sh.c (sh_use_by_pieces_infrastructure_p)): Likewise.
      	* config/aarch64/aarch64.c
      	(aarch64_use_by_pieces_infrastructure_p)): Likewise.
      	* doc/tm.texi: Regenerate.
      
      gcc/testsuite/
      
      	PR target/63937
      	* gcc.dg/memset-2.c: New.
      
      From-SVN: r217742
      James Greenhalgh committed
    • re PR sanitizer/63813 ([UBSAN] ICE in ubsan_type_descriptor, at ubsan.c:346) · c39a5e99
      	PR sanitizer/63813
      	* c-ubsan.c (ubsan_maybe_instrument_reference_or_call): Change type
      	argument to ptype, set type to TREE_TYPE (ptype).  Don't call
      	get_pointer_alignment for non-pointers.  Use ptype, or if it is
      	reference type, corresponding pointer type, as type of kind
      	argument.
      	(ubsan_maybe_instrument_reference,
      	ubsan_maybe_instrument_member_call): Adjust callers.
      
      	* g++.dg/ubsan/pr63813.C: New test.
      
      From-SVN: r217741
      Jakub Jelinek committed
    • re PR tree-optimization/61042 (ICE on valid code at -O3 on x86_64-linux-gnu) · d236c803
      	PR tree-optimization/61042
      	* gcc.c-torture/compile/pr61042.c: New test.
      
      From-SVN: r217740
      Jakub Jelinek committed