109533 Commits

Author SHA1 Message Date
Joseph Myers
c49a696204 common-target-def.h, [...]: New files.
* common/common-target-def.h, common/common-target.def,
	common/common-target.h, common/config/default-common.c,
	common/config/pa/pa-common.c: New files.
	* Makefile.in (common_out_file, common_out_object_file,
	COMMON_TARGET_H, COMMON_TARGET_DEF_H): New.
	(OBJS-libcommon-target): Include $(common_out_object_file).
	(prefix.o): Update dependencies.
	($(common_out_object_file), common/common-target-hooks-def.h,
	s-common-target-hooks-def-h): New.
	(s-tm-texi): Also check timestamp on common-target.def.
	(build/genhooks.o): Update dependencies.
	* config.gcc (common_out_file, target_has_targetm_common): Define.
	* config/pa/som.h (ALWAYS_STRIP_DOTDOT): Replace with
	TARGET_ALWAYS_STRIP_DOTDOT.
	* configure.ac (common_out_object_file): Define.
	(common_out_file, common_out_object_file): Substitute.
	(common): Create directory.
	* configure: Regenerate.
	* doc/tm.texi.in (targetm_common): Document.
	(TARGET_ALWAYS_STRIP_DOTDOT): Add @hook entry.
	* doc/tm.texi: Regenerate.
	* genhooks.c (hook_array): Also include common/common-target.def.
	* prefix.c (tm.h): Don't include.
	(common/common-target.h): Include.
	(ALWAYS_STRIP_DOTDOT): Don't define.
	(update_path): Use targetm_common.always_strip_dotdot instead of
	ALWAYS_STRIP_DOTDOT.
	* system.h (ALWAYS_STRIP_DOTDOT): Poison.

From-SVN: r175052
2011-06-14 21:11:37 +01:00
David Li
22c5fa5fbf dumping cleanup phase 1 -- Removing TODO_dump_func
From-SVN: r175051
2011-06-14 19:39:36 +00:00
Janis Johnson
5d64566169 pr45701-1.c: Require thumb support.
* gcc.target/arm/pr45701-1.c: Require thumb support.
	* gcc.target/arm/pr45701-2.c: Likewise.
	* gcc.target/arm/thumb-branch1.c: Likewise.

From-SVN: r175047
2011-06-14 19:09:36 +00:00
Janis Johnson
1c990129e7 mla-1.c: Ignore warnings about conflicting switches.
* gcc.target/arm/mla-1.c: Ignore warnings about conflicting switches.
	* gcc.target/arm/pr39839.c: Likewise.
	* gcc.target/arm/pr40657-2.c: Likewise.
	* gcc.target/arm/pr40956.c: Likewise.
	* gcc.target/arm/pr41679.c: Likewise.
	* gcc.target/arm/pr42235.c: Likewise.
	* gcc.target/arm/pr42495.c: Likewise.
	* gcc.target/arm/pr42505.c: Likewise.
	* gcc.target/arm/pr42574.c: Likewise.
	* gcc.target/arm/pr46883.c: Likewise.
	* gcc.target/arm/pr46934.c: Likewise.
	* gcc.target/arm/xor-and.c: Likewise.

From-SVN: r175046
2011-06-14 19:08:35 +00:00
Jason Merrill
8722cdee15 * error.c (type_to_string): Print typedef-stripped version too.
From-SVN: r175045
2011-06-14 14:16:16 -04:00
Jason Merrill
84f32ce3b2 re PR c++/49117 (4.5 -> 4.6: user-unfriendly change in "invalid conversion" error message)
PR c++/49117
	* call.c (perform_implicit_conversion_flags): Print source type as
	well as expression.

From-SVN: r175044
2011-06-14 14:16:06 -04:00
Jason Merrill
0171567edc re PR c++/49389 ([C++0x] Wrong value category for pointer-to-member expression with rvalue object expression)
PR c++/49389
	* typeck2.c (build_m_component_ref): Preserve rvalueness.

From-SVN: r175043
2011-06-14 14:15:58 -04:00
Jason Merrill
2bbf86a46b re PR c++/49369 (typeof() strips const from member when used in const method)
PR c++/49369
	* class.c (build_base_path): Fix cv-quals in unevaluated context.

From-SVN: r175042
2011-06-14 14:15:51 -04:00
Jason Merrill
11f449abc6 re PR c++/49290 ([C++0x] ICE in in cxx_eval_indirect_ref, at cp/semantics.c:6795)
PR c++/49290
	* semantics.c (cxx_fold_indirect_ref): Local, more permissive copy
	of fold_indirect_ref_1.
	(cxx_eval_indirect_ref): Use it.

From-SVN: r175041
2011-06-14 14:15:43 -04:00
Jason Merrill
870c3cf85d fix utf-8
From-SVN: r175040
2011-06-14 14:15:36 -04:00
Paolo Carlini
6a97dbf748 valarray (~valarray): Use noexcept.
2011-06-14  Paolo Carlini  <paolo.carlini@oracle.com>

	* include/std/valarray (~valarray): Use noexcept.
	* include/bits/unique_ptr.h (~unique_ptr): Likewise.
	* testsuite/26_numerics/valarray/noexcept_move_construct.cc: New.
	* testsuite/20_util/shared_ptr/cons/noexcept_move_construct.cc:
	Likewise.
	* testsuite/20_util/unique_ptr/cons/noexcept_move_construct.cc:
	Likewise.
	* testsuite/20_util/weak_ptr/cons/noexcept_move_construct.cc:
	Likewise.

From-SVN: r175039
2011-06-14 17:48:29 +00:00
H.J. Lu
fa4657624c Properly expand strlen to Pmode.
2011-06-14  H.J. Lu  <hongjiu.lu@intel.com>

	PR middle-end/47364
	* builtins.c (expand_builtin_strlen): Expand strlen to Pmode
	and properly handle result not in Pmode.

From-SVN: r175034
2011-06-14 09:31:57 -07:00
Rainer Orth
652de9ffb6 huge_struct.c (test_large_fn): Use PRIu8, PRId8 instead of %hhu, %hhd.
* testsuite/libffi.call/huge_struct.c (test_large_fn): Use PRIu8,
	PRId8 instead of %hhu, %hhd.
	* testsuite/libffi.call/ffitest.h [__alpha__ && __osf__] (PRId8,
	PRIu8): Define.
	[__sgi__] (PRId8, PRIu8): Define.

From-SVN: r175032
2011-06-14 15:54:22 +00:00
Robert Millan
7d8d16c3d9 kfreebsd-gnu.h: Resync with `config/i386/linux.h'.
* config/i386/kfreebsd-gnu.h: Resync with `config/i386/linux.h'.
	* config/kfreebsd-gnu.h (GNU_USER_DYNAMIC_LINKER): Resync with
	`config/linux.h'.

	* config/i386/kfreebsd-gnu64.h: New file.
	* config.gcc (x86_64-*-kfreebsd*-gnu): Replace `i386/kfreebsd-gnu.h'
	with `i386/kfreebsd-gnu64.h'.

	* config/i386/linux64.h (GNU_USER_LINK_EMULATION32)
	(GNU_USER_LINK_EMULATION64): New macros.
	* config/i386/gnu-user64.h (LINK_SPEC): Rely on
	`GNU_USER_LINK_EMULATION32' and `GNU_USER_LINK_EMULATION64' instead
	of hardcoding `elf_i386' and `elf_x86_64'.

From-SVN: r175031
2011-06-14 17:32:55 +02:00
Nick Clifton
0ccef3d256 re PR target/49403 (v850e-elf: incompatible pointer type (near initialization for ‘targetm.memory_move_cost’))
PR target/49403
	* config/v850/v850.c (v850_memory_move_cost): Add reg_class_t parameter.

	PR target/49402
	* config.gcc(v850*-*-*): Avoid duplication of v850.opt.

From-SVN: r175030
2011-06-14 15:30:05 +00:00
Jakub Jelinek
1ace6185d2 re PR fortran/49103 (local variables exchange values / wrong code with -O3)
PR fortran/49103
	* tree.h (DECL_NONSHAREABLE): Define.
	(struct tree_decl_common): Change decl_common_unused to
	decl_nonshareable_flag.
	* cfgexpand.c (expand_used_vars_for_block, clear_tree_used):
	Ignore vars with DECL_NONSHAREABLE bit set.
	* tree-cfg.c (gimple_duplicate_bb): Set DECL_NONSHAREABLE
	on stores to automatic aggregate vars.

	* gfortran.dg/pr49103.f90: New test.

From-SVN: r175028
2011-06-14 17:27:24 +02:00
Paolo Carlini
6b14c6d7ff functional: Use noexcept.
2011-06-14  Paolo Carlini  <paolo.carlini@oracle.com>

	* include/std/functional: Use noexcept.
	* include/bits/stl_tempbuf.h: Likewise.

From-SVN: r175026
2011-06-14 15:09:14 +00:00
Tom de Vries
5e59d472ed re PR middle-end/45098 (Missed induction variable optimization)
2011-06-14  Tom de Vries  <tom@codesourcery.com>

	PR target/45098
	* gcc.target/arm/ivopts-3.c: New test.
	* gcc.target/arm/ivopts-4.c: New test.
	* gcc.target/arm/ivopts-5.c: New test.

From-SVN: r175025
2011-06-14 15:05:26 +00:00
Jakub Jelinek
8a76c4a040 re PR rtl-optimization/49390 (GCSE miscompilation)
PR rtl-optimization/49390
	Revert:
	2010-06-29  Bernd Schmidt  <bernds@codesourcery.com>

	* cse.c (exp_equiv_p): For MEMs, if for_gcse, only compare
	MEM_ALIAS_SET.

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

From-SVN: r175023
2011-06-14 16:59:52 +02:00
Zdenek Dvorak
b4a9343cf5 re PR middle-end/45098 (Missed induction variable optimization)
2011-06-14  Zdenek Dvorak  <ook@ucw.cz>
	    Tom de Vries  <tom@codesourcery.com>

	PR target/45098
	* cfgloop.h (nb_iterations_upper_bound, nb_iterations_estimate):
	Document changed semantics.
	(max_stmt_executions, max_stmt_executions_int): Declare.
	* tree-data-ref.c (estimated_loop_iterations)
	(estimated_loop_iterations_int): Move functions...
	* tree-ssa-loop-niter.c (estimated_loop_iterations)
	(estimated_loop_iterations_int): here.
	(record_estimate): Change nb_iterations_upper_bound and
	nb_iterations_estimate semantics.
	(max_stmt_executions, max_stmt_executions_int): New function.
	* tree-data-ref.c (estimated_loop_iterations_tree): Rename to ...
	(max_stmt_executions_tree): this.
	(analyze_miv_subscript): Use max_stmt_executions_tree instead of
	estimated_loop_iterations_tree.
	tree-ssa-loop-ivopts.c (avg_loop_niter): Use
	max_stmt_executions_int instead of estimated_loop_iterations_int.
	* predict.c (predict_loops): Idem.
	* tree-parloops.c (parallelize_loops): Idem.
	* tree-data-ref.c (analyze_siv_subscript_cst_affine)
	(compute_overlap_steps_for_affine_1_2, analyze_subscript_affine_affine)
	(init_omega_for_ddr_1): Idem.
	* tree-ssa-loop-prefetch.c (determine_loop_nest_reuse)
	(loop_prefetch_arrays): Idem
	* graphite-sese-to-poly.c (build_loop_iteration_domains): Use
	max_stmt_executions instead of estimated_loop_iterations.
	* tree-data-ref.c (estimated_loop_iterations_tree): Idem.
	* tree-vrp.c (adjust_range_with_scev): Use estimated_loop_iterations
	instead of nb_iterations_upper_bound.

Co-Authored-By: Tom de Vries <tom@codesourcery.com>

From-SVN: r175022
2011-06-14 14:29:58 +00:00
Jan Hubicka
d2640c430f * ipa.c (cgraph_address_taken_from_non_vtable_p): Check the ref type.
From-SVN: r175021
2011-06-14 14:25:57 +00:00
Ian Lance Taylor
de38eefaa7 Change builtin make to runtime call at lowering time.
Use kindNoPointers as 6g does.

	* Make-lang.in (go/expressions.o): Depend on $(GO_RUNTIME_H).

From-SVN: r175020
2011-06-14 13:51:16 +00:00
Rainer Orth
6868b351c7 * g++.dg/torture/pr48954.C: Use dg-require-effective-target lto.
From-SVN: r175019
2011-06-14 13:41:27 +00:00
Richard Henderson
40873cdd57 re PR debug/48459 (avr: Assertion failure with -gdwarf-2)
PR debug/48459
        * dwarf2out.c (frame_pointer_fb_offset_valid): New.
        (based_loc_descr): Assert it's true.
        (compute_frame_pointer_to_fb_displacement): Set it, rather than
        aborting immediately.

From-SVN: r175018
2011-06-14 06:31:43 -07:00
Sanjin Liu
73e8cb24c2 invoke.texi: Re-add missing -mcpu docs for Faraday cores.
2011-06-14  Sanjin Liu	<scliu@faraday-tech.com>
	    Mingfeng Wu  <mingfeng@faraday-tech.com>

	* doc/invoke.texi: Re-add missing -mcpu docs for Faraday cores.

Co-Authored-By: Mingfeng Wu <mingfeng@faraday-tech.com>

From-SVN: r175017
2011-06-14 12:55:14 +00:00
Jan Hubicka
f835f0a785 * ipa-cp.c (ipcp_iterate_stage): Revert accidental commit.
From-SVN: r175016
2011-06-14 12:51:55 +00:00
Jan Hubicka
ee6f1177c2 cgraph.c (cgraph_make_decl_local): Handle DECL_ONE_ONLY similarly to DECL_COMDAT.
* cgraph.c (cgraph_make_decl_local): Handle DECL_ONE_ONLY
	similarly to DECL_COMDAT.
	* cgraphunit.c (cgraph_analyze_function): Likewise.
	* ipa.c (function_and_variable_visibility): Likewise.

From-SVN: r175015
2011-06-14 12:48:06 +00:00
Jan Hubicka
618abf9a1a lto-streamer-out.c (lto_output_ts_binfo_tree_pointers): Do not output BINFO_VIRTUALS when streaming for ltrans unit.
* lto-streamer-out.c (lto_output_ts_binfo_tree_pointers): Do not output
	BINFO_VIRTUALS when streaming for ltrans unit.

From-SVN: r175014
2011-06-14 12:46:12 +00:00
Olivier Hainque
ea96399965 irix6-unwind.h: New file.
2011-06-14  Olivier Hainque  <hainque@adacore.com>
	    Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

	* config/mips/irix6-unwind.h: New file.
	* config.host (mips-sgi-irix6.5*): Set md_unwind_header.

Co-Authored-By: Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>

From-SVN: r175013
2011-06-14 12:20:08 +00:00
Georg-Johann Lay
37e1a18f04 cmpsi-2.c: Undo 172757.
testsuite/
	* gcc.c-torture/execute/cmpsi-2.c: Undo 172757.
	* gcc.c-torture/execute/cmpsi-2.x: New file.
	* gcc.c-torture/execute/pr45262.c: Undo 172757.
	* gcc.c-torture/execute/pr45262.x: New file.
	* gcc.c-torture/compile/pr46534.c: Skip for AVR.
	* gcc.c-torture/compile/pr49029.c: Add dg-require-effective-target
	int32plus
	* gcc.c-torture/compile/pr49163.c: Ditto.

From-SVN: r175012
2011-06-14 10:45:17 +00:00
Eric Botcazou
10c63ba47c Fix long lines
From-SVN: r175011
2011-06-14 07:47:01 +00:00
Ira Rosen
456e13231b vect-16.c: Rename to...
* gcc.dg/vect/vect-16.c: Rename to...
	* gcc.dg/vect/no-fast-math-vect16.c: ...this.
	* gcc.dg/vect/vect-peel-3.c: Adjust misalignment values
	for double-word vectors.
	* gcc.dg/vect/vect-peel-4.c: Likewise.
	* gcc.dg/vect/bb-slp-10.c: Replace vect_hw_misalign with
	vect_element_align.
	* gcc.dg/vect/vect.exp: Run no-fast-math-* tests with
	-fno-fast-math.

From-SVN: r175009
2011-06-14 07:00:37 +00:00
Ian Lance Taylor
3b8dffe701 Change builtin make to runtime call at lowering time.
Use kindNoPointers as 6g does.

	* Make-lang.in (go/expressions.o): Depend on $(GO_RUNTIME_H).

From-SVN: r175008
2011-06-14 05:53:10 +00:00
GCC Administrator
8365a060e6 Daily bump.
From-SVN: r175006
2011-06-14 00:19:12 +00:00
Jan Kratochvil
5fe8e1e9ab cp-demangle.c (d_print_comp): Suppress d_print_mod for DMGL_RET_POSTFIX.
libiberty/
	* cp-demangle.c (d_print_comp) <DEMANGLE_COMPONENT_FUNCTION_TYPE>:
	Suppress d_print_mod for DMGL_RET_POSTFIX.
	* testsuite/demangle-expected: New testcases for --ret-postfix.

From-SVN: r175001
2011-06-13 22:34:19 +00:00
Jan Kratochvil
f019462c62 demangle.h (DMGL_RET_POSTFIX): Extend the comment.
include/
	* demangle.h (DMGL_RET_POSTFIX): Extend the comment.
	(DMGL_RET_DROP): New.

libiberty/
	* cp-demangle.c (d_print_comp) <DEMANGLE_COMPONENT_FUNCTION_TYPE>: Do
	not pass DMGL_RET_POSTFIX or DMGL_RET_DROP.  Support DMGL_RET_DROP.
	* testsuite/demangle-expected: New testcases for --ret-drop.
	* testsuite/test-demangle.c: Document --ret-drop in a comment.
	(main): New variable ret_drop, fill it, call cplus_demangle with it.

From-SVN: r175000
2011-06-13 22:32:40 +00:00
Jan Kratochvil
743a99db07 cp-demangle.c (struct d_print_info): Remove field options.
libiberty/
	* cp-demangle.c (struct d_print_info): Remove field options.
	(d_print_init): Remove parameter options.
	(cplus_demangle_print_callback): Update all the callers.
	(d_print_comp, d_print_mod_list, d_print_mod, d_print_function_type)
	(d_print_array_type, d_print_expr_op, d_print_cast, d_print_subexpr):
	Add parameter options, update all the callers.

From-SVN: r174999
2011-06-13 22:30:02 +00:00
David Edelsohn
a45fe02fe7 [multiple changes]
2011-06-13  David Edelsohn  <dje.gcc@gmail.com>

        * config/rs6000/rs6000.md (movdi_mfpgpr): Remove POWER mnemonic.
        (movdi_internal64): Same.

2011-06-13  Edmar Wienskoski  <edmar@freescale.com>

        * config/rs6000/rs6000.md (save_gpregs_<mode>): Replaced pattern
        with a set of similar patterns, where the MATCH_OPERAND for the
        function argument is replaced with individual references to hardware
        registers.
        (save_fpregs_<mode>): Ditto
        (restore_gpregs_<mode>): Ditto
        (return_and_restore_gpregs_<mode>): Ditto
        (return_and_restore_fpregs_<mode>): Ditto
        (return_and_restore_fpregs_aix_<mode>): Ditto

From-SVN: r174997
2011-06-13 14:24:39 -04:00
Edmar Wienskoski
8b160d504a * gcc.target/powerpc/outofline_rnreg.c: New testcase.
From-SVN: r174995
2011-06-13 14:10:31 -04:00
Jan Hubicka
317a064665 ipa-inline.c (reset_edge_caches): Walk aliases.
* ipa-inline.c (reset_edge_caches): Walk aliases.
	(update_caller_keys): Do not test inlinability of aliases.
	* ipa-inline-analysis.c (do_estimate_edge_time): Look through alias.
	(do_estimate_growth): Fix typo.

From-SVN: r174992
2011-06-13 15:34:59 +00:00
Jan Hubicka
8775a18b96 ipa-utils.c (postorder_stack): New structure.
* ipa-utils.c (postorder_stack): New structure.
	(ipa_reverse_postorder): Handle aliases.

From-SVN: r174991
2011-06-13 15:31:22 +00:00
Walter Lee
db1d217c76 * configure.ac (tilepro-*-*) New case.
(tilegx-*-*): Likewise.
	* configure: Regenerate.

From-SVN: r174990
2011-06-13 15:24:21 +00:00
Jan Hubicka
6c69a0297a ipa-inline-transform.c (+can_remove_node_now_p_1): Break out from...
* ipa-inline-transform.c (+can_remove_node_now_p_1): Break out from...
	(can_remove_node_now_p): ... here; handle same comdat groups.
	(clone_inlined_nodes): Update use of can_remove_node_now_p add TODO.
	(inline_call): Update use of can_remove_node_now_p.

From-SVN: r174989
2011-06-13 13:12:23 +00:00
H.J. Lu
32dccc18a1 Correct typos.
From-SVN: r174988
2011-06-13 06:10:13 -07:00
H.J. Lu
ec25ed43d6 Remove duplicated lines.
2011-06-13  H.J. Lu  <hongjiu.lu@intel.com>

	* gcc.dg/h8300-bit-insn-ice2.2: Remove duplicated lines.

From-SVN: r174987
2011-06-13 06:05:52 -07:00
Kaushik Phatak
495f8c142d h8300.md (bsetqi_msx, [...]): Added condition to disallow non-identical memory locations.
* config/h8300/h8300.md (bsetqi_msx, bclrqi_msx, bnotqi_msx): Added 
	condition to disallow non-identical memory locations.
	(*andqi3_2, andqi3_1, iorqi3_1, xorqi3_1): Reorder insn to give
	preference to bit manipulation instructions.
	* gcc.dg/h8300-bit-insn-ice2.2: New testcase.

From-SVN: r174986
2011-06-13 09:31:41 +00:00
Jan Hubicka
9aa3f5c58c cgraph.c (cgraph_for_node_thunks_and_aliases, [...]): Fix thinko in recursive walking.
* cgraph.c (cgraph_for_node_thunks_and_aliases,
	cgraph_for_node_and_aliases): Fix thinko in recursive walking.
	(nonremovable_p): New function.
	(cgraph_can_remove_if_no_direct_calls_p): New function.
	(used_from_object_file_p): New functoin.
	(cgraph_will_be_removed_from_program_if_no_direct_calls): Look for references
	from aliases.
	* cgraph.h (cgraph_can_remove_if_no_direct_calls_p): Bring offline.
	* ipa-inline.c (check_caller_edge): New function.
	(want_inline_function_called_once_p): Use it; accept aliases called once, too.
	* ipa-inline-analysis.c (do_estimate_growth): Remove FIXME.

From-SVN: r174985
2011-06-13 09:19:09 +00:00
Ramana Radhakrishnan
30cecf17a9 re PR target/48454 (gfortran.dg/char_result_13.f90 fails with -O3 -funroll-loops -mvectorize-with-neon-quad)
PR target/48454

Fix vmovn lengths.

2011-06-13  Ramana Radhakrishnan  <ramana.radhakrishnan@linaro.org>

	PR target/48454
	* config/arm/neon.md (vec_pack_trunc<mode>): Set the lengths
	correctly for the case with Quad vectors.

From-SVN: r174984
2011-06-13 09:09:14 +00:00
Thomas Koenig
4f21f0daa3 frontend-passes.c (remove_trim): New function.
2011-06-13  Thomas Koenig  <tkoenig@gcc.gnu.org>

	* frontend-passes.c (remove_trim):  New function.
	(optimize_assignment):  Use it.
	(optimize_comparison):  Likewise.  Return correct status
	for previous change.

2011-06-13  Thomas Koenig  <tkoenig@gcc.gnu.org>

	* gfortran.dg/trim_optimize_8.f90:  New test case.

From-SVN: r174983
2011-06-13 08:36:47 +00:00
Jakub Jelinek
29f8523742 re PR tree-optimization/49352 (-fcompare-debug failure with -O2 -ftree-vectorize)
PR tree-optimization/49352
        * tree-vect-loop.c (vect_is_slp_reduction): Don't count debug
        uses at all, make sure loop_use_stmt after the loop is a def
        stmt of a used SSA_NAME that is the only one defined inside
        of the loop.  Don't check for COND_EXPR and GIMPLE_BINARY_RHS.
        (vect_is_simple_reduction_1): Call vect_is_slp_reduction only
        if check_reduction is true.


Co-Authored-By: Ira Rosen <ira.rosen@linaro.org>

From-SVN: r174982
2011-06-13 06:10:20 +00:00