Commit Graph

134329 Commits

Author SHA1 Message Date
Marek Polacek
c71a55f88d 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
2014-11-19 14:32:02 +00:00
François-Xavier Coudert
3b5b776210 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
2014-11-19 14:29:43 +00:00
Francois-Xavier Coudert
7b7874d252 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
2014-11-19 14:28:23 +00:00
Alex Velenko
ac8698a16f MAINTAINERS (Write After Approval): Revert my previous change.
* MAINTAINERS (Write After Approval): Revert my previous change.

From-SVN: r217775
2014-11-19 14:09:26 +00:00
Renlin Li
8dab9330b7 MAINTAINERS (Write After Approval): Revert my previous change.
2014-11-19  Renlin Li  <Renlin.Li@arm.com>

        * MAINTAINERS (Write After Approval): Revert my previous change.

From-SVN: r217774
2014-11-19 14:03:47 +00:00
Ilya Verbin
844b0125ef re PR regression/63868 (Multiple failures in the libgomp test suite between r217458 and r217501.)
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
2014-11-19 13:52:12 +00:00
Felix Yang
0096508a25 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
2014-11-19 13:46:16 +00:00
Richard Henderson
74893f2591 Allow the static chain to be set from C
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
2014-11-19 05:31:24 -08:00
Richard Henderson
f2d3d07ee5 Allow the front-end to create calls with a static chain
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
2014-11-19 05:30:59 -08:00
Richard Henderson
c21df29bcf Make TARGET_STATIC_CHAIN allow a function type
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
2014-11-19 05:30:34 -08:00
Renlin Li
45b70a7372 This is simple patch to add more conditional macros defined in ACLE 2.0.
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
2014-11-19 12:47:26 +00:00
Renlin Li
1be22083b5 MAINTAINERS (Write After Approval): Add myself.
2014-11-19  Renlin Li  <Renlin.Li@arm.com>

        * MAINTAINERS (Write After Approval): Add myself.

From-SVN: r217767
2014-11-19 12:30:32 +00:00
Marek Polacek
3902bce049 re PR middle-end/63879 (ICE compiling Linux Kernel fs/ext3/namei.c with -fsanitize=undefined)
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
2014-11-19 12:03:04 +00:00
Ilya Tocar
877088b765 collect2.c (main): Don't call fatal_error before diagnostic_initialize.
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
2014-11-19 14:48:48 +03:00
Alex Velenko
59392f4648 * MAINTAINERS: Added myself to maintainers.
From-SVN: r217762
2014-11-19 10:47:58 +00:00
Tom de Vries
8024d4b6c9 Fix tail-merge pass for dead type-unsafe code
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
2014-11-19 10:44:58 +00:00
Uros Bizjak
4a19f719d6 e.53.5.c: Require vect_simd_clones effective target.
* 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
2014-11-19 11:30:29 +01:00
Jakub Jelinek
2865f32a96 re PR tree-optimization/63915 (gomp/pr60823-2.c:31:1: error: dead STMT in EH table)
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
2014-11-19 10:50:58 +01:00
Jakub Jelinek
5620052d3d re PR sanitizer/63520 (ICE: in get_biv_step, at loop-iv.c:824 with -fsanitize=undefined on ppc64)
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
2014-11-19 10:49:18 +01:00
Richard Biener
a2a2fe4bfa re PR tree-optimization/63844 (open mp parallelization prevents vectorization)
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
2014-11-19 09:47:19 +00:00
Paolo Carlini
6df34b29ae re PR c++/57654 ([c++11] static class member reference-to-a-reference will not compile)
2014-11-19  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/57654
	* g++.dg/cpp0x/constexpr-ref7.C: New.

From-SVN: r217756
2014-11-19 09:36:40 +00:00
Jakub Jelinek
d469883955 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
2014-11-19 10:27:30 +01:00
Andreas Schwab
8f7d0ab920 * gcc.dg/pure-2.c: Update line numbers.
From-SVN: r217754
2014-11-19 08:48:54 +00:00
Jakub Jelinek
05f9c67507 re PR rtl-optimization/63843 (wrong code generation at -O1 and higher)
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
2014-11-19 09:18:53 +01:00
Andrew MacLeod
26c87b1a64 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
2014-11-19 03:37:34 +00:00
Jason Merrill
052beba43f 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
2014-11-18 22:03:45 -05:00
Jason Merrill
58611fb6fa constexpr.c (cxx_eval_statement_list): Handle statement-expressions.
* constexpr.c (cxx_eval_statement_list): Handle statement-expressions.
	(potential_constant_expression_1): Handle STMT_EXPR.

From-SVN: r217748
2014-11-18 22:03:39 -05:00
Jason Merrill
5a80468364 constexpr.c (cxx_eval_constant_expression): Give jump_target a default argument.
* constexpr.c (cxx_eval_constant_expression): Give jump_target a
	default argument.
	(lots): Omit NULL jump_target arguments.

From-SVN: r217747
2014-11-18 22:03:34 -05:00
Jason Merrill
2b3ab879c7 constexpr.c (struct constexpr_ctx): Add quiet field.
* 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
2014-11-18 22:03:28 -05:00
GCC Administrator
643266a5a5 Daily bump.
From-SVN: r217745
2014-11-19 00:16:31 +00:00
James Greenhalgh
445d78261c [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
2014-11-18 22:45:21 +00:00
Jakub Jelinek
c39a5e9982 re PR sanitizer/63813 ([UBSAN] ICE in ubsan_type_descriptor, at ubsan.c:346)
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
2014-11-18 23:15:42 +01:00
Jakub Jelinek
d236c8038d re PR tree-optimization/61042 (ICE on valid code at -O3 on x86_64-linux-gnu)
PR tree-optimization/61042
	* gcc.c-torture/compile/pr61042.c: New test.

From-SVN: r217740
2014-11-18 23:13:16 +01:00
Bob Dunlop
31f4431254 mt-ospace (CFLAGS_FOR_TARGET): Append -g -Os rather than overwriting.
2014-11-17  Bob Dunlop  <bob.dunlop@xyzzy.org.uk>

        * mt-ospace (CFLAGS_FOR_TARGET): Append -g -Os rather than
        overwriting.
        (CXXFLAGS_FOR_TARGET): Similarly.

From-SVN: r217739
2014-11-18 15:12:52 -07:00
Jason Merrill
f899317ec2 re PR c++/63940 (C++ constexpr errors on AIX)
PR c++/63940
	* constexpr.c (cxx_eval_binary_expression): Don't assume the
	expression was already folded.
	(cxx_eval_unary_expression): Likewise.

From-SVN: r217738
2014-11-18 16:14:49 -05:00
Jan Hubicka
2bf86c845a ipa-cp.c (ipcp_cloning_candidate_p): Use opt_for_fn.
* ipa-cp.c (ipcp_cloning_candidate_p): Use opt_for_fn.
	(ipa_value_from_jfunc, ipa_context_from_jfunc): Skip sanity check.
	(ipa_get_indirect_edge_target_1): Use opt_for_fn.
	(good_cloning_opportunity_p): Likewise.
	(ipa-cp gate): Enable ipa-cp with LTO.
	* ipa-profile.c (ipa_propagate_frequency): Use opt_for_fn.
	* ipa.c (symbol_table::remove_unreachable_nodes): Always build type
	inheritance.
	* ipa-inline-transform.c (inline_transform): Check if there are inlines
	to apply even at -O0.
	* cgraphunit.c (cgraph_node::finalize_function): Use opt_for_fn.
	(analyze_functions): Build type inheritance graph.
	* ipa-inline.c (can_inline_edge_p): Use opt_for_fn.
	(want_early_inline_function_p, want_inline_small_function_p):
	Likewise.
	(check_callers): Likewise.
	(edge_badness): Likewise.
	(inline_small_functions): Always be ready for indirect inlining
	to happend.
	(ipa_inline): Always use want_inline_function_to_all_callers_p.
	(early_inline_small_functions): Use opt_for_fn.
	* ipa-inline-analysis.c (estimate_function_body_sizes): use opt_for_fn.
	(estimate_function_body_sizes): Likewise.
	(compute_inline_parameters): Likewise.
	(estimate_edge_devirt_benefit): Likewise.
	(inline_analyze_function): Likewise.
	* ipa-devirt.c (ipa_devirt): Likewise.
	(gate): Use in_lto_p.
	* ipa-prop.c (ipa_func_spec_opts_forbid_analysis_p): Use opt_for_fn.
	(try_make_edge_direct_virtual_call): Likewise.
	(update_indirect_edges_after_inlining): Likewise.
	(ipa_free_all_structures_after_ipa_cp): Add in_lto_p check.
	* common.opt (findirect-inlining): Turn into optimization.
	* ipa-pure-const.c (add_new_function): Use opt_for_fn.
	(pure_const_generate_summary): Likewise.
	(gate_pure_const): Always enable with in_lto_p.

From-SVN: r217737
2014-11-18 20:44:16 +00:00
Marc Glisse
bb59f396f8 re PR libstdc++/43622 (Incomplete C++ library support for __float128)
2014-11-18  Marc Glisse  <marc.glisse@inria.fr>

	PR libstdc++/43622
gcc/cp/
	* rtti.c (emit_support_tinfos): Handle __float128.
libstdc++-v3/
	* config/abi/pre/float128.ver: New file.
	* configure.ac: Use float128.ver when relevant.
	* configure: Regenerate.
	* testsuite/util/testsuite_abi.cc (check_version): Accept new
	CXXABI_FLOAT128 version.

From-SVN: r217735
2014-11-18 20:20:53 +00:00
Jason Merrill
ac2f8d26b5 re PR c++/63925 (ICE with C++14 constexpr when trying to constexprify std::min)
PR c++/63925
	* constexpr.c (cxx_eval_increment_expression): Use POINTER_PLUS_EXPR.

From-SVN: r217731
2014-11-18 14:09:55 -05:00
Ian Lance Taylor
cafc9af2ea compiler: Initialize variables in declaration order.
Fixes issue 8052.

From-SVN: r217730
2014-11-18 17:29:41 +00:00
Jason Merrill
de6147508b re PR c++/63934 ([C++] internal compiler error: in adjust_temp_type, at cp/constexpr.c:1020)
PR c++/63934
	* constexpr.c (cxx_eval_call_expression): Check DECL_CONSTRUCTOR_P
	rather than VOID_TYPE_P.

From-SVN: r217729
2014-11-18 12:07:24 -05:00
Maciej W. Rozycki
5d2d755e86 mips.md (compression): Add `micromips32' setting.
* config/mips/mips.md (compression): Add `micromips32' setting.
	(enabled, length): Handle it.
	(shift_compression): Replace `micromips' with `micromips32' in
	the `compression' attribute.
	(*add<mode>3, sub<mode>3): Likewise.

From-SVN: r217728
2014-11-18 16:52:02 +00:00
Maciej W. Rozycki
73af680eb9 mips.md (*jump_absolute): Use a branch when in range, a jump otherwise.
* gcc/config/mips/mips.md (*jump_absolute): Use a branch when in
	range, a jump otherwise.

From-SVN: r217727
2014-11-18 16:46:52 +00:00
Maciej W. Rozycki
699aa7d0b0 c11-atomic-exec-5.c (dg-timeout-factor): New setting.
* gcc.dg/atomic/c11-atomic-exec-5.c (dg-timeout-factor): New
	setting.

From-SVN: r217726
2014-11-18 16:34:21 +00:00
Kyrylo Tkachov
58bd290e5b [ARM/AArch64] Improve modeled latency between FP operations and FP->GP register moves
* config/arm/cortex-a15-neon.md (cortex_a15_vfp_to_from_gp):
	Split into...
	(cortex_a15_gp_to_vfp): ...This.
	(cortex_a15_fp_to_gp): ...And this.
	Define and comment bypass from vfp operations to fp->gp moves.

From-SVN: r217725
2014-11-18 16:26:02 +00:00
Martin Liska
7b69b603ec fibonacci_heap is used for var-tracking.
* var-tracking.c (vt_find_locations): New fibonacci_node is used.

From-SVN: r217724
2014-11-18 16:18:46 +00:00
Martin Liska
b5bfe5bdde bt-load is ported to fibonacci_heap.
* bt-load.c (add_btr_def): New fibonacci_heap is used.
	(migrate_btr_defs): Likewise.

From-SVN: r217723
2014-11-18 16:17:28 +00:00
Martin Liska
dd7bda5eb2 tracer ported to new fibonacci_heap data structure.
* tracer.c (tail_duplicate): New fibonacci_heap class is used.

From-SVN: r217722
2014-11-18 16:15:52 +00:00
Martin Liska
8d261514a7 fibonacci_heap is used for bb-reoder purpose.
* bb-reorder.c (mark_bb_visited): New fibonacci_heap is used.
	(find_traces): Likewise.
	(find_traces_1_round): Likewise.

From-SVN: r217721
2014-11-18 16:13:05 +00:00
Martin Liska
4a91004954 New template fibonacci_heap class introduced.
* fibonacci_heap.h: New file.
	(fibonacci_heap::insert): Created from fibheap_insert.
	(fibonacci_heap::empty): Created from fibheap_empty.
	(fibonacci_heap::nodes): Created from fibheap_nodes.
	(fibonacci_heap::min_key): Created from fibheap_min_key.
	(fibonacci_heap::decrease_key): Created from fibheap_replace_key.
	(fibonacci_heap::replace_key_data): Created from fibheap_replace_key_data.
	(fibonacci_heap::extract_min): Created from fibheap_extract_min.
	(fibonacci_heap::min): Created from fibheap_min.
	(fibonacci_heap::replace_data): Created from fibheap_replace_data.
	(fibonacci_heap::delete_node): Created from fibheap_delete_node.
	(fibonacci_heap::union_with): Created from fibheap_union.
	* ipa-inline.c (update_edge_key): New heap API is used.
	(update_caller_keys): Likewise.
	(update_callee_keys): Likewise.
	(lookup_recursive_calls): Likewise.
	(recursive_inlining): Likewise.
	(add_new_edges_to_heap): Likewise.
	(heap_edge_removal_hook): Likewise.
	(inline_small_functions): Likewise.

From-SVN: r217720
2014-11-18 16:09:11 +00:00
Paolo Carlini
1b85e4b23b re PR c++/55942 ([C++11] sorry, unimplemented: calling a member function of the object being constructed in a constant expression)
2014-11-18  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/55942
	* g++.dg/cpp0x/constexpr-55942.C: New.

From-SVN: r217719
2014-11-18 16:02:58 +00:00