Commit Graph

131334 Commits

Author SHA1 Message Date
GCC Administrator 157f342916 Daily bump.
From-SVN: r213089
2014-07-27 00:16:51 +00:00
Tobias Burnus f1d935dce6 Follow up to r213079.
2014-07-26  Tobias Burnus  <burnus@net-b.de>

        PR fortran/61881
        PR fortran/61888
        PR fortran/57305
        * intrinsic.texi (SIZEOF): Document changed behavior
        for polymorphic arrays.

From-SVN: r213085
2014-07-26 19:56:39 +02:00
Marek Polacek be97a9d038 re PR c/61077 (_Atomic in the return type or argument types of main not diagnosed)
PR c/61077
	* gcc.dg/pr61077.c: Use \[^\n\]* instead of .* in the regexp.

From-SVN: r213084
2014-07-26 16:33:19 +00:00
Uros Bizjak 7b7f941a96 re PR target/47230 (gcc fails to bootstrap on alpha in stage2 with "relocation truncated to fit: GPREL16 against ...")
PR target/47230
	* configure.ac (alpha*-*-linux*): Use mh-alpha-linux.
	* configure: Regenerate.

config/ChangeLog:

	PR target/47230
	* mh-alpha-linux: New file.

From-SVN: r213081
2014-07-26 17:11:14 +02:00
Eric Botcazou 04db05482e Minor tweaks.
From-SVN: r213080
2014-07-26 10:16:49 +00:00
Tobias Burnus 69c3654cc6 check.c (gfc_check_sizeof): Permit for assumed type if and only if it has an array descriptor.
2014-07-26  Tobias Burnus  <burnus@net-b.de>

        * check.c (gfc_check_sizeof): Permit for assumed type if and
        only if it has an array descriptor.
        * intrinsic.c (do_ts29113_check): Permit SIZEOF.
        (add_functions): SIZEOF is an Inquiry function.
        * intrinsic.texi (SIZEOF): Add note that only contiguous
        arrays are permitted.
        * trans-expr.c (gfc_conv_intrinsic_to_class): Handle assumed
        rank.
        * trans-intrinsic.c (gfc_conv_intrinsic_sizeof): Handle
        assumed type + array descriptor, CLASS and assumed rank.
        (gfc_conv_intrinsic_storage_size): Handle class arrays.

2014-07-26  Tobias Burnus  <burnus@net-b.de>

        * gfortran.dg/sizeof_2.f90: Change dg-error.
        * gfortran.dg/sizeof_4.f90: New.
        * gfortran.dg/storage_size_1.f08: Correct expected
        value.

From-SVN: r213079
2014-07-26 11:49:00 +02:00
Richard Sandiford 2da068d5c0 ira-costs.c (find_costs_and_classes): For -O0...
gcc/
	* ira-costs.c (find_costs_and_classes): For -O0, use the best class
	as the allocation class if it isn't likely to be spilled.

From-SVN: r213078
2014-07-26 09:48:24 +00:00
Richard Sandiford 093a6c996e rtl.h (tls_referenced_p): Declare.
gcc/
	* rtl.h (tls_referenced_p): Declare.
	* rtlanal.c (tls_referenced_p_1, tls_referenced_p): New functions.
	* config/mips/mips.c (mips_tls_symbol_ref_1): Delete.
	(mips_cannot_force_const_mem): Use tls_referenced_p.
	* config/pa/pa-protos.h (pa_tls_referenced_p): Delete.
	* config/pa/pa.h (CONSTANT_ADDRESS_P): Use tls_referenced_p
	instead of pa_tls_referenced_p.
	* config/pa/pa.c (hppa_legitimize_address, pa_cannot_force_const_mem)
	(pa_emit_move_sequence, pa_emit_move_sequence): Likewise.
	(pa_legitimate_constant_p): Likewise.
	(pa_tls_symbol_ref_1, pa_tls_referenced_p): Delete.
	* config/rs6000/rs6000.c (rs6000_tls_referenced_p): Delete.
	(rs6000_cannot_force_const_mem, rs6000_emit_move)
	(rs6000_address_for_altivec): Use tls_referenced_p instead of
	rs6000_tls_referenced_p.
	(rs6000_tls_symbol_ref_1): Delete.

From-SVN: r213077
2014-07-26 09:47:33 +00:00
Marc Glisse 82e3a71995 re PR target/44551 ([missed optimization] AVX vextractf128 after vinsertf128)
2014-07-26  Marc Glisse  <marc.glisse@inria.fr>

	PR target/44551
gcc/
	* simplify-rtx.c (simplify_binary_operation_1) <VEC_SELECT>:
	Optimize inverse of a VEC_CONCAT.
gcc/testsuite/
	* gcc.target/i386/pr44551-1.c: New file.

From-SVN: r213076
2014-07-26 09:00:31 +00:00
GCC Administrator e39a648296 Daily bump.
From-SVN: r213071
2014-07-26 00:17:02 +00:00
Xinliang David Li 2243ba5138 Make FDO more tolerant to source changes
From-SVN: r213068
2014-07-26 00:06:56 +00:00
Edward Smith-Rowland 37545fa722 Implement N4051 - Allow typename in a template template parameter
cp/

2014-07-25  Edward Smith-Rowland  <3dw4rd@verizon.net>

	Implement N4051 - Allow typename in a template template parameter
	* parser.c (cp_parser_type_parameter_key): New funtion;
	(cp_parser_token_is_type_parameter_key): Ditto;
	(cp_parser_type_parameter): Look for type-parameter-key for all versions
	but pedwarn for less than cxx1z.


testsuite/

2014-07-25  Edward Smith-Rowland  <3dw4rd@verizon.net>

	Implement N4051 - Allow typename in a template template parameter
	* lib/target-supports.exp (check_effective_target_c++1y): Now
	means C++1y and up.
	(check_effective_target_c++1y_down): New.
	(check_effective_target_c++1z_only): New.
	(check_effective_target_c++1z): New.
	* g++.dg/cpp1z/typename-tmpl-tmpl-parm.C: New.
	* g++.dg/cpp1z/typename-tmpl-tmpl-parm-neg.C: New.
	* g++.dg/cpp1z/typename-tmpl-tmpl-parm-.C: New.

From-SVN: r213065
2014-07-25 22:35:24 +00:00
Tobias Burnus a634323ae0 simplify.c (gfc_simplify_storage_size): Use proper integer kind for the returned value.
2014-07-25  Tobias Burnus  <burnus@net-b.de>

        * simplify.c (gfc_simplify_storage_size): Use proper
        integer kind for the returned value.

2014-07-25  Tobias Burnus  <burnus@net-b.de>

        * gfortran.dg/storage_size_5.f90: New.

From-SVN: r213060
2014-07-25 21:09:56 +02:00
Jan Hubicka a4b0388b24 lto-streamer-out.c (struct sccs): Turn to ...
* lto-streamer-out.c (struct sccs): Turn to ...
	(class DFS): ... this one; refactor the DFS walk so it can
	be re-done on per-SCC basis.
	(DFS::DFS): New constructor.
	(DFS::~DFS): New destructor.
	(hash_tree): Add new MAP argument holding in-SCC hash values;
	remove POINTER_TYPE hashing hack.
	(scc_entry_compare): Rename to ...
	(DFS::scc_entry_compare): ... this one.
	(hash_scc): Rename to ...
	(DFS::hash_scc): ... this one; pass output_block instead
	of streamer_cache; work harder to get unique and stable SCC
	hashes.
	(DFS_write_tree): Rename to ...
	(DFS::DFS_write_tree): ... this one; add SINGLE_P parameter.
	(lto_output_tree): Update.

Co-Authored-By: Richard Biener <rguenther@suse.de>

From-SVN: r213059
2014-07-25 16:58:21 +00:00
Nathan Sidwell 770f687ddb libgcov-driver.c (set_gcov_dump_complete, [...]): Remove global functions polluting user's namespace.
* libgcov-driver.c (set_gcov_dump_complete,
	reset_gcov_dump_complete, get_gcov_dump_complete): Remove global
	functions polluting user's namespace.
	(gcov_exit): Set variable directly.
	(gcov_clear): Reset variable directly.
	* libgcov-interface.c (get_gcov_dymp_complete,
	reset_gov_dump_complete): Remove declarations.
	(__gcov_reset, __gcov_dump): Don't call them.

From-SVN: r213058
2014-07-25 15:02:17 +00:00
Andi Kleen e8326772b3 Convert lto streamer out hashing to inchash
No substantial changes, although the hash values will be slightly
different.

v2: add_flag moved to inchash. Some minor changes.

gcc/:

2014-07-25  Andi Kleen  <ak@linux.intel.com>

	* lto-streamer-out.c (hash_tree): Convert to inchash.

From-SVN: r213057
2014-07-25 13:39:49 +00:00
Andi Kleen 56fdfd3e85 Convert the tree.c type hashing over to inchash
v2: Use commutative interface. Be much nearer to the old
code.

gcc/:

2014-07-25  Andi Kleen  <ak@linux.intel.com>

	* tree.c (build_type_attribute_qual_variant): Use inchash.
	(type_hash_list): Dito.
	(attribute_hash_list): Dito
	(iterative_hstate_expr): Dito.
	(iterative_hash_expr): Dito.
	(build_range_type_1): Dito.
	(build_array_type_1): Dito.
	(build_function_type): Dito.
	(build_method_type_directly): Dito.
	(build_offset_type): Dito.
	(build_complex_type): Dito.
	(make_vector_type): Dito.
	* tree.h (iterative_hash_expr): Add compat wrapper.
	(iterative_hstate_expr): Add.

gcc/lto/:

2014-07-25  Andi Kleen  <ak@linux.intel.com>

	* lto.c (hash_canonical_type): Call iterative_hstate_expr.

From-SVN: r213056
2014-07-25 13:39:36 +00:00
Andi Kleen 0bd8bb0476 Convert LTO type hashing to the new inchash interface
Should not really change any behavior, it's just a more abstract
interface, but uses the same underlying hash functions.

gcc/lto/:

2014-07-25  Andi Kleen  <ak@linux.intel.com>

	* lto.c (hash_canonical_type): Convert to inchash.
	(iterative_hash_canonical_type): Dito.

From-SVN: r213055
2014-07-25 13:39:24 +00:00
Andi Kleen 6d8eb96b44 Add an abstract incremental hash data type
Some files in gcc, like lto or tree, do large scale incremential hashing.
The current jhash implementation of this could be likely improved
by using an incremential hash that does not do a full rehashing
for every new value added.

This patch adds a new "inchash" class that abstracts the internal
state of the hash. This makes it easier to plug in new hashes
and also cleans up the code a bit.

Right now it is just implemented in the same way as the old
iterative hash in tree.c. The previous iterative hash code
from tree.c moved into a new separate file. Also I fixed up all
users to include the new header.

It should not really significantly change any hashing by itself,
it's mostly a cleanup at this point.

v2: Remove begin. Add commutative interface.
Add merge hash interface.  Add add_flag.

gcc/:

2014-07-25  Andi Kleen  <ak@linux.intel.com>

	* Makefile.in (OBJS): Add inchash.o.
	(PLUGIN_HEADERS): Add inchash.h.
	* ipa-devirt.c: Include inchash.h.
	* lto-streamer-out.c: Dito.
	* tree-ssa-dom.c: Dito.
	* tree-ssa-pre.c: Dito.
	* tree-ssa-sccvn.c: Dito.
	* tree-ssa-tail-merge.c: Dito.
	* asan.c: Dito.
	* tree.c (iterative_hash_hashval_t): Move to ...
	(iterative_hash_host_wide_int): Move to ...
	* inchash.c: Here. New file.
	* tree.h (iterative_hash_hashval_t): Move to ...
	(iterative_hash_host_wide_int): Move to ...
	* inchash.h: Here. New file.

gcc/lto/:

2014-07-25  Andi Kleen  <ak@linux.intel.com>

	* lto.c: Include inchash.h

From-SVN: r213054
2014-07-25 13:39:05 +00:00
Uros Bizjak f54860ea96 ffi.c: Do not include stdlib.h.
* src/alpha/ffi.c: Do not include stdlib.h.
	(ffi_closure_osf_inner) <default>: Use FFI_ASSERT instead of abort.

From-SVN: r213049
2014-07-25 11:01:45 +02:00
Richard Biener b250514336 re PR middle-end/61762 (failure to optimize memcpy from constant string)
2014-07-25  Richard Biener  <rguenther@suse.de>

	PR middle-end/61762
	PR middle-end/61894
	* fold-const.c (native_encode_int): Add and handle offset
	parameter to do partial encodings of expr.
	(native_encode_fixed): Likewise.
	(native_encode_real): Likewise.
	(native_encode_complex): Likewise.
	(native_encode_vector): Likewise.
	(native_encode_string): Likewise.
	(native_encode_expr): Likewise.
	* fold-const.c (native_encode_expr): Add offset parameter
	defaulting to -1.
	* gimple-fold.c (fold_string_cst_ctor_reference): Remove.
	(fold_ctor_reference): Handle all reads from tcc_constant
	ctors.

	* gcc.dg/pr61762.c: New testcase.
	* gcc.dg/fold-cstring.c: Likewise.
	* gcc.dg/fold-cvect.c: Likewise.

From-SVN: r213045
2014-07-25 07:44:57 +00:00
Richard Biener 1ed85d52ef tree-inline.c (estimate_move_cost): Mark speed_p argument as possibly unused.
2014-07-25  Richard Biener  <rguenther@suse.de>

	* tree-inline.c (estimate_move_cost): Mark speed_p argument
	as possibly unused.

From-SVN: r213043
2014-07-25 07:28:32 +00:00
Uros Bizjak a3a2efc10e baseline_symbols.txt: Update.
* config/abi/post/alpha-linux-gnu/baseline_symbols.txt: Update.

From-SVN: r213040
2014-07-25 08:47:47 +02:00
Martin Liska 4c1a59cc55 ChangeLog entry moved from config/ChangeLog to gcc/ChangeLog.
From-SVN: r213039
2014-07-25 06:23:42 +00:00
Ed Smith-Rowland 0a9f0ecb4c string_view: Make the literal operators constexpr like the ctors they call.
2014-07-25  Ed Smith-Rowland  <3dw4rd@verizon.net>

	* include/experimental/string_view: Make the literal operators
	constexpr like the ctors they call.

From-SVN: r213037
2014-07-25 03:47:46 +00:00
Richard Henderson b6334cf4bb libitm: Improve aarch64 _ITM_beginTransaction
* config/aarch64/sjlj.S (_ITM_beginTransaction): Use post-inc
        addressing mode in epilogue.

From-SVN: r213035
2014-07-24 19:58:06 -07:00
GCC Administrator 275cfd7258 Daily bump.
From-SVN: r213034
2014-07-25 00:17:09 +00:00
Senthil Kumar Selvaraj 5a3040898c avr-c.c (avr_cpu_cpp_builtins): Add __AVR_DEVICE_NAME__.
* config/avr/avr-c.c (avr_cpu_cpp_builtins): Add __AVR_DEVICE_NAME__.

From-SVN: r213031
2014-07-24 22:41:03 +04:00
Kyle McMartin 6c43e15e96 AArch64: emit .note.GNU-stack
2014-07-24  Kyle McMartin  <kyle@redhat.com>
	* config/aarch64/aarch64-linux.h (TARGET_ASM_FILE_END): Define.

From-SVN: r213028
2014-07-24 11:28:36 -07:00
Uros Bizjak 9df392cf78 intrinsic.texi (Intrinsic Procedures): Move to correct menu position to match sectioning.
* intrinsic.texi (Intrinsic Procedures) <ATOMIC_DEFINE>: Move to
	correct menu position to match sectioning.

From-SVN: r213027
2014-07-24 20:15:53 +02:00
Uros Bizjak 0ffc395f0e go-gcc.cc (Gcc_backend::global_variable_set_init): Rename symtab_get_node to symtab_node::get.
* go-gcc.cc (Gcc_backend::global_variable_set_init): Rename
	symtab_get_node to symtab_node::get.

From-SVN: r213026
2014-07-24 19:58:45 +02:00
Ulrich Weigand 9832651228 rs6000-protos.h (rs6000_special_adjust_field_align_p): Add prototype.
gcc/

	* config/rs6000/rs6000-protos.h (rs6000_special_adjust_field_align_p):
	Add prototype.
	* config/rs6000/rs6000.c (rs6000_special_adjust_field_align_p): New
	function.
	* config/rs6000/sysv4.h (ADJUST_FIELD_ALIGN): Call it.
	* config/rs6000/linux64.h (ADJUST_FIELD_ALIGN): Likewise.
	* config/rs6000/freebsd64.h (ADJUST_FIELD_ALIGN): Likewise.

gcc/testsuite/

	* gcc.target/powerpc/ppc64-abi-warn-3.c: New test.

	* gcc.c-torture/execute/20050316-1.x: Add -Wno-psabi.
	* gcc.c-torture/execute/20050604-1.x: Add -Wno-psabi.
	* gcc.c-torture/execute/20050316-3.x: New file.  Add -Wno-psabi.
	* gcc.c-torture/execute/pr23135.x: Likewise.

From-SVN: r213017
2014-07-24 17:15:12 +00:00
Ulrich Weigand e1089c7a5c rs6000.c (rs6000_function_arg_boundary): In the AIX and ELFv2 ABI...
gcc/

	* config/rs6000/rs6000.c (rs6000_function_arg_boundary): In the AIX
	and ELFv2 ABI, do not use the "mode == BLKmode" check to test for
	aggregate types.  Instead, *all* aggregate types, except for single-
	element or homogeneous float/vector aggregates, are quadword-aligned
	if required by their type alignment.  Issue -Wpsabi note when a type
	is now treated differently than before.

gcc/testsuite/

	* gcc.target/powerpc/ppc64-abi-warn-2.c: New test.

From-SVN: r213016
2014-07-24 17:12:45 +00:00
Ulrich Weigand ff46d64d82 rs6000.c (rs6000_function_arg): If a float argument does not fit fully into floating-point registers...
gcc/

	* config/rs6000/rs6000.c (rs6000_function_arg): If a float argument
	does not fit fully into floating-point registers, and there is still
	space in the register parameter area, use GPRs to pass those parts
	of the argument.  Issue -Wpsabi note if any parameter is now treated
	differently than before.
	(rs6000_arg_partial_bytes): Update.

gcc/testsuite/

	* gcc.target/powerpc/ppc64-abi-warn-1.c: New test.

From-SVN: r213015
2014-07-24 17:11:02 +00:00
Ulrich Weigand c41e1ae6c0 struct-layout-1.exp: Load g++-dg.exp.
gcc/testsuite/

	* g++.dg/compat/struct-layout-1.exp: Load g++-dg.exp.

From-SVN: r213014
2014-07-24 17:09:10 +00:00
Uros Bizjak 288aa22fa1 elf.h: Define TARGET_UNWIND_TABLES_DEFAULT.
* config/alpha/elf.h: Define TARGET_UNWIND_TABLES_DEFAULT.

From-SVN: r213010
2014-07-24 18:44:24 +02:00
DJ Delorie fabf71ba2c cygming-crtbegin.c (deregister_frame_fn): Newly public.
* config/i386/cygming-crtbegin.c (deregister_frame_fn): Newly public.
(__gcc_deregister_frame): Move logic to detect deregister function to...
(__gcc_register_frame): here, so it's consistent with the register logic.

From-SVN: r213009
2014-07-24 12:41:01 -04:00
Martin Liska 037e55737e ADA fixed for symtab_node issues.
* gcc-interface/trans.c (finalize_nrv): Correct cgraph_node (symtab_node)
	function used.
	* gcc-interface/utils.c (rest_of_subprog_body_compilation): Likewise.
	(gnat_write_global_declarations): Likewise.

From-SVN: r213007
2014-07-24 16:14:39 +00:00
Richard Sandiford d4cf94779f rtl.h (target_rtl): Remove lang_dependent_initialized.
gcc/
	* rtl.h (target_rtl): Remove lang_dependent_initialized.
	* toplev.c (initialize_rtl): Don't use it.  Move previously
	"language-dependent" calls to...
	(backend_init): ...here.
	(lang_dependent_init_target): Don't set lang_dependent_initialized.
	Assert that RTL initialization hasn't happend yet.

From-SVN: r213004
2014-07-24 15:18:09 +00:00
Richard Sandiford 2175bf4930 re PR rtl-optimization/61629 (FAIL: gcc.dg/20020312-2.c (internal compiler error))
gcc/
	PR rtl-optimization/61629
	* reginfo.c (reinit_regs): Only call ira_init and recog_init if
	they have already been initialized.

From-SVN: r213003
2014-07-24 15:17:54 +00:00
Richard Sandiford 1a8cb1557a re PR middle-end/61268 (ICE in vt_expand_var_loc_chain, at var-tracking.c:8262)
gcc/
	PR middle-end/61268
	* function.c (assign_parm_setup_reg): Prevent invalid sharing of
	DECL_INCOMING_RTL and entry_parm.
	(get_arg_pointer_save_area): Likewise arg_pointer_save_area.
	* calls.c (load_register_parameters): Likewise argument values.
	(emit_library_call_value_1, store_one_arg): Likewise argument
	save areas.
	* config/i386/i386.c (assign_386_stack_local): Likewise the local
	stack slot.
	* explow.c (validize_mem): Modify the argument in-place.

From-SVN: r213002
2014-07-24 15:17:35 +00:00
Jiong Wang 4b92caa1d6 [AArch64] Optimize epilogue when there is no frame pointer.
From-SVN: r213000
2014-07-24 14:43:15 +00:00
Jiong Wang c5e1f66e59 [AArch64] Optimize prologue when there is no frame pointer.
From-SVN: r212999
2014-07-24 14:41:49 +00:00
Jiong Wang ae13fce333 [AArch64] Infrastructure to allow optional use of write back.
From-SVN: r212997
2014-07-24 14:39:07 +00:00
Jiong Wang 363ffa50f1 [AArch64] Extend frame state to track WB candidates.
From-SVN: r212996
2014-07-24 14:32:54 +00:00
Martin Liska 51705ec128 Another MIPS/R6000 IPA C++ refactoring fix.
* mips.c (mips_start_unique_function): Correct cgraph_node function
	used.
	* rs6000.c (call_ABI_of_interest): Likewise.
	(rs6000_code_end): Likewise.

From-SVN: r212995
2014-07-24 14:17:57 +00:00
Roman Gareev a663102770 [gcc/]
* graphite-isl-ast-to-gimple.c:
	(graphite_create_new_loop): Add calling of isl_id_free to properly
	decrement reference counts.
	
[gcc/testsuite]

	* gcc.dg/graphite/isl-ast-gen-blocks-4.c: New testcase.

From-SVN: r212994
2014-07-24 14:08:29 +00:00
Martin Liska dacd445e14 IPA C++ refactoring fix.
* cgraphunit.c (compile): Correct function used.
        * rs6000.c (rs6000_xcoff_declare_function_name): Correct symtab_node funtion used.
        (rs6000_xcoff_declare_object_name): Likewise.

From-SVN: r212993
2014-07-24 13:54:06 +00:00
Jan Hubicka 52d8a590f5 lto-streamer-out.c (tree_is_indexable): Consider IMPORTED_DECL as non-indexable.
* lto-streamer-out.c (tree_is_indexable): Consider IMPORTED_DECL
	as non-indexable.

From-SVN: r212992
2014-07-24 13:52:49 +00:00
Jan Hubicka 10a3a880c1 re PR lto/61802 (AArch64 execute.exp failures with LTO after r212467)
PR lto/61802
	* varasm.c (bss_initializer_p): Handle offlined ctors.
	(align_variable, get_variable_align): Likewise.
	(make_decl_one_only): Likewise.
	(default_binds_local_p_1): Likewise.
	(decl_binds_to_current_def_p): Likewise.
	(get_variable_section): Get constructor if it is offlined.
	(assemble_variable_contents): Sanity check that the caller
	streamed in the ctor in LTO.

From-SVN: r212991
2014-07-24 13:50:31 +00:00