Commit Graph

149523 Commits

Author SHA1 Message Date
Senthil Kumar Selvaraj f03f023275 Fix bougs PR 78170 failure for avr
The test defines int bitfields that are more than 16 bits wide, and this
fails for the avr with its 16 bit integer size. Therefore, require
effective target int32plus.

gcc/testsuite/

2016-11-03  Senthil Kumar Selvaraj  <senthil_kumar.selvaraj@atmel.com>

	* gcc.c-torture/execute/pr78170.c: Require int32plus.

From-SVN: r241809
2016-11-03 08:04:40 +00:00
GCC Administrator 92c036832b Daily bump.
From-SVN: r241808
2016-11-03 00:16:18 +00:00
Uros Bizjak 7ce53bd943 i386.c (ix86_init_libfuncs): New.
* config/i386/i386.c (ix86_init_libfuncs): New.  Call
	darwin_rename_builtins here.
	(ix86_expand_divmod_libfunc): New.
	(TARGET_INIT_LIBFUNCS): Unconditionally define to ix86_init_libfuncs.
	(TARGET_EXPAND_DIVMOD_LIBFUNC): Define.

From-SVN: r241805
2016-11-02 23:25:44 +01:00
Uros Bizjak 183624479f Makefile.in (LIB2_DIVMOD_FUNCS): Add _divmoddi4.
* Makefile.in (LIB2_DIVMOD_FUNCS): Add _divmoddi4.
	* libgcc2.c (__divmoddi4): New function.
	* libgcc2.h (__divmoddi4): Declare.
	* libgcc-std.ver.in (GCC_7.0.0): New. Add __PFX_divmoddi4
	and __PFX_divmodti4.

From-SVN: r241804
2016-11-02 23:23:13 +01:00
Cesar Philippidis 6668eb4593 nvptx.c (PTX_GANG_DEFAULT): Set to zero.
gcc/
	* config/nvptx/nvptx.c (PTX_GANG_DEFAULT): Set to zero.

	libgomp/
	* plugin/plugin-nvptx.c (nvptx_exec): Interrogate board attributes
	to determine default geometry.
	* testsuite/libgomp.oacc-c-c++-common/loop-auto-1.c: Set gang
	dimension.


Co-Authored-By: Nathan Sidwell <nathan@acm.org>

From-SVN: r241803
2016-11-02 15:10:02 -07:00
Max Filippov bd17a9dfab xtensa: don't xfail gcc.c-torture/compile/20001226-1.c
With jump trampolines implemented in binutils since 2.25 and enabled by
default this test no longer fails on xtensa.

2016-11-02  Max Filippov  <jcmvbkbc@gmail.com>
gcc/testsuite/
	* gcc.c-torture/compile/20001226-1.c: Don't xfail on xtensa.

From-SVN: r241801
2016-11-02 18:36:52 +00:00
Max Filippov 9ae4ef4cd3 xtensa: fix ICE on pr59037.c test
xtensa gcc gets ICE on pr59037.c test because its xtensa_output_literal
function cannot handle integer literals of sizes other than 4 and 8,
whereas the test uses 16-byte int vector.
Split integer literal formatting into the recursive function
xtensa_output_integer_literal_parts capable of handling literals of any
power of 2 size not less than 4.

2016-11-02  Max Filippov  <jcmvbkbc@gmail.com>
gcc/
	* config/xtensa/xtensa.c (xtensa_output_integer_literal_parts):
	New function.
	(xtensa_output_literal): Use xtensa_output_integer_literal_parts
	to format MODE_INT and MODE_PARTIAL_INT literals.

From-SVN: r241800
2016-11-02 18:34:43 +00:00
Segher Boessenkool 302fd2cc3f rs6000: Disable shrink-wrap-separate for abi=spe (PR78168)
With the SPE ABI, if we wrap GPRs we need to handle the upper half of the
extended 64-bit registers as well, which we cannot easily do.  So, this
patch disables separate shrink-wrapping for the SPE ABI.


	PR target/78168
	* config/r6000/rs6000.c (rs6000_get_separate_components): Return
	NULL if TARGET_SPE_ABI.

From-SVN: r241799
2016-11-02 18:06:04 +01:00
Kyrylo Tkachov b231822dae Fix for big-endian gcc.c-torture/execute/pr55750.c
* gimple-ssa-store-merging.c (encode_tree_to_bitpos): Don't forget to
	clear padding bits even when they're less than a byte.

From-SVN: r241798
2016-11-02 16:03:13 +00:00
Tamar Christina 2b01aad6dc Fix failing vminnm/vmaxnm test on ARM.
* gcc.target/arm/simd/vmaxnm_f32_1.c (dg-require-effective-target):
	Check for arm_v8_neon_hw.
	* gcc.target/arm/simd/vmaxnmq_f32_1.c (dg-require-effective-target):
	Likewise.
	* gcc.target/arm/simd/vminnm_f32_1.c (dg-require-effective-target):
	Likewise.
	* gcc.target/arm/simd/vminnmq_f32_1.c(dg-require-effective-target):
	Likewise.

From-SVN: r241797
2016-11-02 15:57:11 +00:00
Richard Biener aa55dc0ca3 gimple-ssa-store-merging.c: Include gimplify-me.h.
2016-11-02  Richard Biener  <rguenther@suse.de>

	* gimple-ssa-store-merging.c: Include gimplify-me.h.
	(imm_store_chain_info::output_merged_stores): Force base_addr
	to be proper GIMPLE for a MEM_REF address.
	(pass_store_merging::execute): Restrict negative bitpos
	handling to non-MEM_REF bases.  Remove TREE_THIS_VOLATILE
	check.  Take into account non-NULL_TREE offset if the base
	is already addressable.

	* gcc.dg/store_merging_8.c: New testcase.

From-SVN: r241796
2016-11-02 15:00:48 +00:00
Fritz O. Reese 3df19fa0d4 New warning -Wargument-mismatch for function argument mismatches.
gcc/fortran/
	* lang.opt, invoke.texi: New argument -Wargument-mismatch.
	* interface.c (compare_parameter, compare_actual_formal,
	gfc_check_typebound_override, argument_rank_mismatch): Control argument
	mismatch warnings with -Wargument-mismatch.
	* resolve.c (resolve_structure_cons, resolve_global_procedure): Ditto.

	gcc/testsuite/gfortran.dg/
	* warn_argument_mismatch_1.f90: New test.

From-SVN: r241795
2016-11-02 14:56:41 +00:00
Fritz Reese eab1ee2254 Allow warning flags to associate through gfc_error.
gcc/fortran/
	* gfortran.h (gfc_error): New declaration for gfc_error with 'opt'.
	* error.c (gfc_error): Add optional 'opt' argument.
	* error.c (gfc_notify_std): Call fully-qualified gfc_error.

From-SVN: r241794
2016-11-02 14:46:33 +00:00
Wilco Dijkstra 5304d04437 Add LE/BE SHA1H patterns with a V2SI input.
Add LE/BE SHA1H patterns with a V2SI input.  This avoids unnecessary
DUPs when using intrinsics like vsha1h_u32 (vgetq_lane_u32 (x, 0)).

    gcc/
        * config/aarch64/aarch64-simd.md (aarch64_crypto_sha1hv4si): 
        New pattern.
        (aarch64_be_crypto_sha1hv4si): New pattern.

From-SVN: r241791
2016-11-02 14:00:22 +00:00
Wilco Dijkstra 45a6c1e363 The add expander still contains some expansion code that was required for the previous prolog/epilog code...
The add expander still contains some expansion code that was required for the
previous prolog/epilog code, but which is no longer needed.  I also noticed
that the current version splits off immediates from frame addressing
instructions, which doesn't seem a good idea.  Avoiding this resulted in small
codesize improvements.

    gcc/
        * config/aarch64/aarch64.md (add<mode>3): Remove
        redundant code.  Don't split frame based additions.

From-SVN: r241790
2016-11-02 13:56:07 +00:00
Richard Biener b5926e23e4 gimple-ssa-store-merging.c (struct store_immediate_info): Remove redundant val and dest members.
2016-11-02  Richard Biener  <rguenther@suse.de>

	* gimple-ssa-store-merging.c (struct store_immediate_info): Remove
	redundant val and dest members.
	(store_immediate_info::store_immediate_info): Adjust.
	(merged_store_group::merged_store_group): Adjust.
	(merged_store_group::apply_stores): Likewise.
	(struct imm_store_chain_info): Add base_addr field.
	(imm_store_chain_info::imm_store_chain_info): New constructor.
	(imm_store_chain_info::terminate_and_process_chain): Do not pass base.
	(imm_store_chain_info::output_merged_store): Likewise.  Use
	addr_base which is already the address.
	(imm_store_chain_info::output_merged_stores): Likewise.
	(pass_tree_store_merging::terminate_all_aliasing_chains): Take
	imm_store_chain_info instead of base.  Fix alias check.
	(pass_tree_store_merging::terminate_and_release_chain): Likewise.
	(imm_store_chain_info::coalesce_immediate_stores): Adjust.
	(pass_store_merging::execute): Refuse to operate on TARGET_MEM_REF.
	use the address of the base and adjust for other changes.

From-SVN: r241789
2016-11-02 13:05:07 +00:00
David Edelsohn 4b69fb136e prod-options.c: XFAIL AIX.
* gcc.dg/debug/dwarf2/prod-options.c: XFAIL AIX.
        * gcc.dg/debug/dwarf2/pr71855.c: XFAIL AIX.
        * gcc.dg/addr_equal_1.c: XFAIL AIX.
        * gcc.dg/pr65779.c: XFAIL AIX.
        * gcc.dg/pr70405.c: XFAIL AIX.

From-SVN: r241787
2016-11-02 08:42:19 -04:00
David Edelsohn 075be4a1f9 inline-var-1.C: XFAIL AIX.
* g++.dg/debug/dwarf2/inline-var-1.C: XFAIL AIX.
        * g++.dg/debug/dwarf2/ref-2.C: XFAIL AIX.
        * g++.dg/debug/dwarf2/constexpr-var-1.C: XFAIL AIX.

From-SVN: r241786
2016-11-02 08:39:06 -04:00
Rainer Orth fdb1aa55d0 Fix linker detection in check_gc_sections_available
* lib/target-supports.exp (check_gc_sections_available): Use
	-print-prog-name=ld to determine linker used.

From-SVN: r241783
2016-11-02 10:27:23 +00:00
Martin Liska 4adbcdb4ba Fix host_size_t_cst_p predicat
* fold-const-call.c (host_size_t_cst_p): Test whether
	t is convertible to size_t.
	* gcc.dg/tree-ssa/builtins-folding-gimple-ub.c (main): Add
	test case.

From-SVN: r241780
2016-11-02 09:56:04 +00:00
Kyrylo Tkachov 4b2c06f49f PR tree-optimization/78170: Truncate sign-extended padding when encoding bitfields
PR tree-optimization/78170
	* gimple-ssa-store-merging.c (encode_tree_to_bitpos): Truncate padding
	introduced by native_encode_expr on little-endian as well.

	* gcc.c-torture/execute/pr78170.c: New test.

From-SVN: r241779
2016-11-02 09:28:35 +00:00
Kyrylo Tkachov 63e523d6f0 PR tree-optimization/78162: Reject negative offsets in store merging early
PR tree-optimization/78162
	* gimple-ssa-store-merging.c (execute): Mark stores with bitpos < 0
	as invalid.

	* gcc.c-torture/compile/pr78162.c: New test.

From-SVN: r241778
2016-11-02 09:25:22 +00:00
Kyrylo Tkachov 04ddfe064b [AArch64] Add function comments to some prologue/epilogue helpers
* config/aarch64/aarch64.c (aarch64_register_saved_on_entry): Add
	function comment.
	(aarch64_next_callee_save): Likewise.
	(aarch64_pushwb_single_reg): Likewise.
	(aarch64_gen_storewb_pair): Likewise.
	(aarch64_push_regs): Likewise.
	(aarch64_gen_loadwb_pair): Likewise.
	(aarch64_pop_regs): Likewise.
	(aarch64_gen_store_pair): Likewise.
	(aarch64_gen_load_pair): Likewise.
	(aarch64_save_callee_saves): Likewise.
	(aarch64_restore_callee_saves): Likewise.

From-SVN: r241777
2016-11-02 08:57:08 +00:00
Richard Biener da42ac7bc5 re PR tree-optimization/78035 (Inconsistency between address comparison and alias analysis)
2016-11-02  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/78035
	PR tree-optimization/77964
	* gimple-pretty-print.c (pp_points_to_solution): Print
	vars_contains_interposable.
	* tree-ssa-alias.c: Include varasm.h.
	(ptrs_compare_unequal): Check vars_contains_interposable and
	decl_binds_to_current_def_p.
	(dump_points_to_solution): Dump vars_contains_interposable.
	* tree-ssa-alias.h (struct pt_solution): Add vars_contains_interposable
	flag.
	* tree-ssa-structalias.c: Include varasm.h.
	(set_uids_in_ptset): Record whether vars contains a
	not decl_binds_to_current_def_p variable in vars_contains_interposable.
	(ipa_escaped_pt): Update initializer.

	* gcc.target/i386/pr78035.c: New testcase.

From-SVN: r241776
2016-11-02 08:29:48 +00:00
Richard Biener 3cea049a4f re PR middle-end/78047 (Chromium apparently gets miscompiled)
2016-11-02  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/78047
	* tree-ssa-structalias.c (push_fields_onto_fieldstack): Initialize
	fake field at offset zero conservatively regarding to may_have_pointers.

From-SVN: r241775
2016-11-02 08:13:29 +00:00
Richard Biener 4280df0abc tree-vrp.c (evrp_dom_walker::before_dom_children): Call infer_value_range on stmt ops and update value-ranges.
2016-11-02  Richard Biener  <rguenther@suse.de>

	* tree-vrp.c (evrp_dom_walker::before_dom_children): Call
	infer_value_range on stmt ops and update value-ranges.
	Dump visited stmts and blocks.
	(evrp_dom_walker::push_value_range): Dump changes.
	(evrp_dom_walker::pop_value_range): Likewise.
	(evrp_dom_walker::try_find_new_range): Avoid noop changes.

	* gcc.dg/tree-ssa/vrp111.c: New testcase.
	* gcc.dg/tree-ssa/pr20702.c: Disable EVRP.
	* gcc.dg/tree-ssa/pr21086.c: Likewise.
	* gcc.dg/tree-ssa/pr58480.c: Likewise.
	* gcc.dg/tree-ssa/vrp08.c: Likewise.

From-SVN: r241774
2016-11-02 08:11:48 +00:00
Trevor Saunders 9815687d8e remove cast from prev_nonnote_insn_bb
gcc/ChangeLog:

2016-11-01  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>

	* emit-rtl.c (prev_nonnote_insn_bb): Change argument type to
	rtx_insn *.
	* rtl.h (prev_nonnote_insn_bb): Adjust prototype.

From-SVN: r241773
2016-11-02 03:46:17 +00:00
Trevor Saunders 2d93cd2005 remove cast in delete_insn_chain
gcc/ChangeLog:

2016-11-01  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>

	* cfgrtl.c (delete_insn_chain): Change argument type to rtx_insn *
	and adjust for that.
	* cfgrtl.h (delete_insn_chain): Adjust prototype.

From-SVN: r241772
2016-11-02 03:46:10 +00:00
Trevor Saunders 466d19802a remove cast to rtx_insn * in remove_note
gcc/ChangeLog:

2016-11-01  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>

	* config/rl78/rl78.c (gen-and_emit_move): Change argument type
	to rtx_insn *.
	(transcode_memory_rtx): Likewise.
	(move_to_acc): Likewise.
	(move_from_acc): Likewise.
	(move_acc_to_reg): Likewise.
	(move_to_x): Likewise.
	(move_to_hl): Likewise.
	(move_to_de): Likewise.
	* config/rs6000/rs6000.c (emit_frame_save): Likewise.
	(rs6000_emit_savres_rtx): Likewise.
	(rs6000_emit_prologue): Likewise.
	* reorg.c (update_reg_unused_notes): Likewise.
	* rtl.h (remove_note): Adjust prototype.
	* rtlanal.c (remove_note): Make argument type rtx_insn *.

From-SVN: r241771
2016-11-02 03:45:59 +00:00
Trevor Saunders 4b6ab43387 split up some variables to use rtx_insn * more
gcc/ChangeLog:

2016-11-01  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>

	* config/alpha/alpha.c (alpha_legitimize_address_1): Split up
	variables so some can be rtx_insn *.
	(alpha_emit_xfloating_libcall): Likewise.
	* config/mips/mips.c (mips_call_tls_get_addr): Likewise.
	(mips_legitimize_tls_address): Likewise.
	* optabs.c (expand_binop): Likewise.
	* reload1.c (gen_reload): Likewise.

From-SVN: r241770
2016-11-02 03:45:45 +00:00
Trevor Saunders 88f9bb4dcb split up the trial variable in reorg.c:relax_delay_slots to use rtx_insn * more
gcc/ChangeLog:

2016-11-01  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>

	* reorg.c (relax_delay_slots): Split up the trial variable.

From-SVN: r241769
2016-11-02 03:45:29 +00:00
Trevor Saunders 9b2ea071ab use rtx_insn * in various places where it is obvious
gcc/ChangeLog:

2016-11-01  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>

	* config/arc/arc.c (arc_emit_call_tls_get_addr): Make the type
	of variables rtx_insn *.
	* config/arm/arm.c (arm_call_tls_get_addr): Likewise.
	(legitimize_tls_address): Likewise.
	* config/bfin/bfin.c (hwloop_optimize): Likewise.
	(bfin_gen_bundles): Likewise.
	* config/c6x/c6x.c (reorg_split_calls): Likewise.
	(c6x_reorg): Likewise.
	* config/frv/frv.c (frv_reorder_packet): Likewise.
	* config/i386/i386.c (ix86_split_idivmod): Likewise.
	* config/ia64/ia64.c (ia64_expand_compare): Likewise.
	* config/m32c/m32c.c (m32c_prepare_shift): Likewise.
	* config/mn10300/mn10300.c: Likewise.
	* config/rl78/rl78.c: Likewise.
	* config/s390/s390.c (s390_fix_long_loop_prediction): Likewise.
	* config/sh/sh-mem.cc (sh_expand_cmpstr): Likewise.
	(sh_expand_cmpnstr): Likewise.
	(sh_expand_strlen): Likewise.
	(sh_expand_setmem): Likewise.
	* config/sh/sh.md: Likewise.
	* emit-rtl.c (emit_pattern_before): Likewise.
	* except.c: Likewise.
	* final.c: Likewise.
	* jump.c: Likewise.

From-SVN: r241768
2016-11-02 03:44:50 +00:00
Josh Conner 3f95ca6c0f MAINTAINERS (Write After Approval): Update email address,
2016-11-01  Josh Conner  <joshconner@google.com>

	* MAINTAINERS (Write After Approval): Update email address,

From-SVN: r241767
2016-11-02 02:10:45 +00:00
Jason Merrill 2bc78e3ce5 c-cppbuiltin.c (c_cpp_builtins): Update __cpp_inheriting_constructors.
* c-cppbuiltin.c (c_cpp_builtins): Update
	__cpp_inheriting_constructors.

From-SVN: r241766
2016-11-01 22:10:38 -04:00
Jason Merrill 31f7f784fe Implement P0136R1, Rewording inheriting constructors.
gcc/c-family/
	* c.opt (-fnew-inheriting-ctors): New.
	* c-opts.c: Default to on for ABI 11+.
gcc/cp/
	* call.c (enum rejection_reason_code): Add rr_inherited_ctor.
	(inherited_ctor_rejection): New.
	(add_function_candidate): Reject inherited ctors for copying.
	(enforce_access): Use strip_inheriting_ctors.
	(print_z_candidate): Likewise.  Handle rr_inherited_ctor.
	(convert_like_real): Avoid copying inheriting ctor parameters.
	(build_over_call): Likewise.  A base ctor inheriting from vbase
	has no parms.  Sorry about varargs.
	(joust): A local constructor beats inherited with the same convs.
	* class.c (add_method): Handle hiding inheriting ctors.
	(one_inherited_ctor): Handle new semantics.
	(add_implicitly_declared_members): Pass using_decl down.
	(build_clone): A base ctor inheriting from vbase has no parms.
	* cp-tree.h (DECL_INHERITED_CTOR): Store this instead of the base.
	(SET_DECL_INHERITED_CTOR): Likewise.
	(DECL_INHERITED_CTOR_BASE): Adjust.
	* constexpr.c: Adjust.
	* error.c (dump_function_decl): Decorate inheriting ctors.
	* init.c (emit_mem_initializers): Suppress access control in
	inheriting ctor.
	* mangle.c (write_special_name_constructor): Handle new inheriting
	ctor mangling.
	* method.c (strip_inheriting_ctors, inherited_ctor_binfo)
	(ctor_omit_inherited_parms, binfo_inherited_from): New.
	(synthesized_method_walk): Use binfo_inherited_from.  Suppress
	access control in inheriting ctor.
	(deduce_inheriting_ctor): Deleted if ambiguous ctor inheritance.
	(maybe_explain_implicit_delete): Explain ambigous ctor inheritance.
	(add_one_base_init, do_build_copy_constructor): Adjust.
	(locate_fn_flags, explain_implicit_non_constexpr): Adjust.
	(implicitly_declare_fn): Adjust.
	(get_inherited_ctor): Remove.
	* name-lookup.c (do_class_using_decl): Check for indirect ctor
	inheritance.
	* optimize.c (cdtor_comdat_group): Adjust for new mangling.
	(maybe_clone_body): Handle omitted parms in base clone.
	(maybe_thunk_body): Don't thunk if base clone omits parms.
	* pt.c (tsubst_decl): Adjust.
	(instantiate_template_1): Suppress access control in inheriting
	ctor.
	(fn_type_unification): Do deduction with inherited ctor.
	* tree.c (special_function_p): Adjust.
gcc/
	* tree-inline.c (copy_tree_body_r): Only copy the taken branch of
	a COND_EXPR with constant condition.
libiberty/
	* cp-demangle.c (d_ctor_dtor_name): Handle inheriting constructor.

From-SVN: r241765
2016-11-01 21:50:29 -04:00
GCC Administrator be9f7afb32 Daily bump.
From-SVN: r241764
2016-11-02 00:16:21 +00:00
David Edelsohn 1b1d9303bc * gfortran.dg/pr70937.f90: require-effective-target lto.
From-SVN: r241761
2016-11-01 19:31:44 -04:00
Mark Wielaard a3f3eec079 libiberty: Fix memory leak in ada_demangle when symbol cannot be demangled.
When a symbol cannot be demangled in ada_demangle a new demangled VEC
will be allocated without deleting the demangled VEC already in use.

Running testsuite/test-demangle under valgrind will show the leak for
this entry in testsuite/demangle-expected:

    # Elaborated flag (not demangled)
    --format=gnat
    x_E
    <x_E>

 11 bytes in 1 blocks are definitely lost in loss record 1 of 1
    at 0x4C27BE3: malloc (vg_replace_malloc.c:299)
    by 0x413FE7: xmalloc (xmalloc.c:148)
    by 0x4025EC: ada_demangle (cplus-dem.c:930)
    by 0x402C59: cplus_demangle (cplus-dem.c:892)
    by 0x400FEC: main (test-demangle.c:317)

libiberty/ChangeLog:

	* cplus-dem.c (ada_demangle): Initialize demangled to NULL and
	XDELETEVEC demangled when unknown.

From-SVN: r241760
2016-11-01 23:13:10 +00:00
Jakub Jelinek be6218568d dwarf2out.c (gen_variable_die): Remove again origin_die variable and its initialization.
* dwarf2out.c (gen_variable_die): Remove again origin_die variable
	and its initialization.

From-SVN: r241759
2016-11-01 23:56:48 +01:00
Rainer Orth 04ec7059b5 Fix dwarf2out.c non-HAVE_AS_LEB128 bootstrap failure
* dwarf2out.c (output_rnglists): Wrap basebuf, len in
	HAVE_AS_LEB128.

From-SVN: r241758
2016-11-01 22:20:58 +00:00
Ian Lance Taylor 307dde6fcc libgo: fix GOARCH_PHYSPAGESIZE for ia64
From Andreas Schwab.
    
    Reviewed-on: https://go-review.googlesource.com/32537

From-SVN: r241757
2016-11-01 21:45:32 +00:00
Thomas Koenig 5b7c051940 re PR fortran/78178 (ICE in WHERE statement with diagnostic)
2016-11-01  Thomas Koenig  <tkoenig@gcc.gnu.org>

	PR fortran/78178
	* match.c (match_simple_where):  Fill in locus for assigment
	in simple WHERE statement.

2016-11-01  Thomas Koenig  <tkoenig@gcc.gnu.org>

	PR fortran/69544
	* gfortran.dg/where_6.f90:  New test.

From-SVN: r241756
2016-11-01 21:16:46 +00:00
Jakub Jelinek 70d288130f dwarf2out.c (add_name_and_src_coords_attributes): Add NO_LINKAGE_NAME argument, don't call add_linkage_name if it is true.
* dwarf2out.c (add_name_and_src_coords_attributes): Add NO_LINKAGE_NAME
	argument, don't call add_linkage_name if it is true.
	(gen_variable_die): For C++ inline static data members, consider the
	initial call when old_die is NULL to be declaration and call
	add_name_and_src_coords_attributes in that case with true as
	NO_LINKAGE_NAME.  Add DW_AT_inline attribute if needed.
	(gen_member_die): For C++ inline static data members, emit a
	definition DIE right away in DW_TAG_compile_unit context.
cp/
	* cp-objcp-common.c (cp_decl_dwarf_attribute): Handle DW_AT_inline.
testsuite/
	* g++.dg/debug/dwarf2/inline-var-1.C: New test.

From-SVN: r241753
2016-11-01 19:35:06 +01:00
John David Anglin e592dd625d re PR target/78166 (hash.c:1887:1: error: unrecognizable insn)
PR target/78166
	* config/pa/pa.md: Add new shift/add patterns to handle
	(plus (mult (reg) (mem_shadd_operand)) (reg)) source operand.

From-SVN: r241749
2016-11-01 18:15:57 +00:00
Max Filippov ad89d820bf xtensa: Fix PR target/78118
It started failing after the following commit: 32e90dc6a0cda45 ("PR
rtl-optimization/61047").

The change that made xtensa backend go ICE looks completely unrelated,
and indeed, the issue is caused by the side effect of
compute_frame_size() function call hidden in the
INITIAL_ELIMINATION_OFFSET macro. This call updates the value of the
xtensa_current_frame_size static variable, used in "return" instruction
predicate. Prior to the change the value of xtensa_current_frame_size was
set to 0 after the end of epilogue generation, which enabled the "return"
instruction for the CALL0 ABI, but after the change the additional
INITIAL_ELIMINATION_OFFSET calls make xtensa_current_frame_size non-zero
and "return" pattern unavailable.

Get rid of the global xtensa_current_frame_size and
xtensa_callee_save_size variables by moving them into the
machine_function structure. Implement predicate for the "return" pattern
as a function. Don't communicate completion of epilogue generation
through zeroing of xtensa_current_frame_size, add explicit epilogue_done
variable to the machine_function structure. Don't update stack frame
layout after the completion of reload.

2016-11-01  Max Filippov  <jcmvbkbc@gmail.com>
gcc/
	* config/xtensa/xtensa-protos.h
	(xtensa_use_return_instruction_p): New prototype.
	* config/xtensa/xtensa.c (xtensa_current_frame_size,
	xtensa_callee_save_size): Remove.
	(struct machine_function): Add new fields: current_frame_size,
	callee_save_size, frame_laid_out and epilogue_done.
	(compute_frame_size, xtensa_expand_prologue,
	xtensa_expand_epilogue): Replace xtensa_callee_save_size with
	cfun->machine->callee_save_size and xtensa_current_frame_size
	with cfun->machine->current_frame_size.
	(compute_frame_size): Update cfun->machine->frame_laid_out and
	don't update frame layout after reload completion.
	(xtensa_expand_epilogue): Set cfun->machine->epilogue_done
	instead of zeroing xtensa_current_frame_size.
	(xtensa_use_return_instruction_p): New function.
	* config/xtensa/xtensa.h (xtensa_current_frame_size): Remove
	declaration.
	(INITIAL_ELIMINATION_OFFSET): Use return value of
	compute_frame_size instead of xtensa_current_frame_size value.
	* config/xtensa/xtensa.md ("return" pattern): Use new predicate
	function xtensa_use_return_instruction_p instead of inline code.

From-SVN: r241748
2016-11-01 17:16:33 +00:00
Jakub Jelinek aaec3d850a tree.h (BLOCK_IN_COLD_SECTION_P): Define.
* tree.h (BLOCK_IN_COLD_SECTION_P): Define.
	* final.c (final_scan_insn): Set BLOCK_IN_COLD_SECTION_P.
	* dwarf2out.c (rnglist_idx): New variable.
	(struct dw_ranges): Add label, idx and maybe_new_sec fields.
	(DEBUG_RNGLISTS_SECTION): Define.
	(ranges_base_label): New variable.
	(size_of_die) <case dw_val_class_range_list>: If using
	DW_FORM_rnglistx, count size of uleb128 of range list index.
	(value_format) <case dw_val_class_range_list>: For
	-gdwarf-5 -gsplit-dwarf return DW_FORM_rnglistx.
	(output_range_list_offset): Handle -gdwarf-5 .debug_rnglists
	offsets.  Multiply dwarf < 5 offsets by 2 * DWARF_ADDR_SIZE.
	(add_ranges_num): Remove useless prototype.  Don't multiply
	by 2 * DWARF2_ADDR_SIZE.  Add maybe_new_sec argument, adjust
	for new fields added to dw_ranges struct.
	(add_ranges): Add maybe_new_sec argument and pass it
	through to add_ranges_num.
	(note_rnglist_head): New function.
	(add_ranges_by_labels): Pass true as maybe_new_sec to
	add_ranges_num, call note_rnglist_head on the head of the list.
	(output_ranges): Add function comment.  Switch to
	.debug_ranges section here and emit .Ldebug_ranges0 label.
	(index_rnglists, output_rnglists): New functions.
	(gen_subprogram_die): Formatting fixes.
	(add_high_low_attributes): Don't divide offsets
	by 2 * DWARF2_ADDR_SIZE.  Call note_rnglist_head on the
	first list element or when pointing into the middle of
	a list.  Pass true as second argument to add_ranges on the
	first block fragment after cold/hot section switch.
	(init_sections_and_labels): For -gdwarf-5 use .debug_rnglists
	section instead of .debug_ranges.  Initialize
	ranges_base_label if -gdwarf-5 -gsplit-dwarf.
	(dwarf2out_finish): For -gdwarf-5 -gsplit-dwarf call
	index_rnglists and add DW_AT_rnglists_base attr.  Don't switch
	to dwarf_ranges_section here or emit .Ldebug_ranges0 label.
	Call output_rnglists for -gdwarf-5.
	(dwarf2out_c_finalize): Clear rnglist_idx.

From-SVN: r241747
2016-11-01 17:54:49 +01:00
Jakub Jelinek f10e37a1c1 hashtab.h: Use standard GPLv3 with runtime exception boilerplate.
* hashtab.h: Use standard GPLv3 with runtime exception
	boilerplate.

From-SVN: r241746
2016-11-01 17:47:50 +01:00
Thomas Koenig 7f4266d4fd re PR fortran/69544 (Internal compiler error with -Wall and where)
2016-11-01  Thomas Koenig  <tkoenig@gcc.gnu.org>

	PR fortran/69544
	* match.c (gfc_match_where):  Fill in locus for assigment
	in simple WHERE statement.

2016-11-01  Thomas Koenig  <tkoenig@gcc.gnu.org>

	PR fortran/69544
	* gfortran.dg/where_5.f90:  New test.

From-SVN: r241745
2016-11-01 16:18:18 +00:00
Fritz Reese a14b1c1c11 Mark fallthrough cases with gcc_fallthrough.
* gcc/combine.c (simplify_compare_const): Add gcc_fallthrough.

From-SVN: r241744
2016-11-01 15:29:51 +00:00
Ian Lance Taylor 69907c4ad5 runtime: recreate function called by cgo -gccgo
When using cgo -gccgo calls to C.GoString, C.GoStringN, and C.GoBytes
    are turned into calls to __go_byte_array_to_string and
    __go_string_to_byte_array.  Those functions were removed when the string
    code was copied from Go 1.7, but we still need them for cgo.  While cgo
    should be updated, old versions will exist for some time.
    
    Reviewed-on: https://go-review.googlesource.com/32474

From-SVN: r241743
2016-11-01 14:07:43 +00:00