Commit Graph

112249 Commits

Author SHA1 Message Date
Georg-Johann Lay 180ee6d101 avr-protos.h (avr_out_addto_sp): New prototype.
* config/avr/avr-protos.h (avr_out_addto_sp): New prototype.
	* config/avr/avr.c (avr_out_addto_sp): New function.
	(adjust_insn_length): Handle ADJUST_LEN_ADDTO_SP.
	* config/avr/avr.md (adjust_len): Add "addto_sp".
	(*movhi_sp): Remove insn.
	(*addhi3_sp_R_pc2, *addhi3_sp_R_pc3): Merge to *addhi3_sp_R.

From-SVN: r179544
2011-10-05 11:16:10 +00:00
Richard Guenther d3878abfcc gimple-fold.c (gimple_fold_stmt_to_constant_1): For ternary ops with an embedded expression valueize and fold that as well.
2011-10-05  Richard Guenther  <rguenther@suse.de>

	* gimple-fold.c (gimple_fold_stmt_to_constant_1): For
	ternary ops with an embedded expression valueize and fold
	that as well.
	* tree-ssa-sccvn.c (try_to_simplify): Also allow SSA name
	results from gimple_fold_stmt_to_constant_1.

From-SVN: r179543
2011-10-05 10:54:14 +00:00
Nick Clifton d75fbd3dbf rx.md (tablejump): Add missing label.
* config/rx/rx.md (tablejump): Add missing label.
	(adddi3_internal): Mark operand 0 as early-clobbered.
	(smaxsi3): Revert previous delta.
	(adc_internal): Fix whitespace in generated asm.
	(adc_flags): Likewise.

From-SVN: r179542
2011-10-05 10:26:58 +00:00
Andreas Krebbel 4d8752f06c expmed.c (expand_mult_highpart_optab): Replace optab_handler with the new widening_optab_handler.
2011-10-05  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>

	* expmed.c (expand_mult_highpart_optab): Replace optab_handler
	with the new widening_optab_handler.

From-SVN: r179541
2011-10-05 10:20:04 +00:00
Richard Guenther eb8f1123d9 re PR middle-end/50609 (FAIL: gcc.c-torture/execute/pr23135.c compilation, -O2 -flto (ICE))
2011-10-05  Richard Guenther  <rguenther@suse.de>

	PR tree-optimization/50609
	* gimple-fold.c (fold_array_ctor_reference): Also handle
	vector typed constructors.
	(fold_ctor_reference): Dispatch to fold_array_ctor_reference
	for vector typed constructors.

From-SVN: r179540
2011-10-05 09:31:40 +00:00
Uros Bizjak 2c893b9dbc i386.c (ix86_emit_binop): New static function.
* config/i386/i386.c (ix86_emit_binop): New static function.
	(ix86_split_lea_for_addr): Use ix86_emit_binop to emit add and shl
	instructions.
	(x86_output_mi_thunk): Use ix86_emit_binop to emit add instructions.

From-SVN: r179537
2011-10-05 10:05:14 +02:00
Uros Bizjak 6f37c8d466 builtin-complex-1.c: Use dg-add-options ieee.
* gcc.dg/torture/builtin-complex-1.c: Use dg-add-options ieee.

From-SVN: r179536
2011-10-05 08:12:39 +02:00
David S. Miller facb3fd739 Add support for more sparc VIS 3.0 instructions.
gcc/

	* config/sparc/sparc.md (UNSPEC_FHADD, UNSPEC_FHSUB,
	UNSPEC_XMUL): New unspecs.
	(muldi3_v8plus): Use output_v8plus_mult.
	(*naddsf3, *nadddf3, *nmulsf3, *nmuldf3, *nmuldf3_extend):
	New VIS 3.0 combiner patterns.
	(fhaddsf_vis, fhadddf_vis, fhsubsf_vis, fhsubdf_vis,
	fnhaddsf_vis, fnhaddf_vis, umulxhi_vis, *umulxhi_sp64,
	umulxhi_v8plus, xmulx_vis, *xmulx_sp64, xmulx_v8plus,
	xmulxhi_vis, *xmulxhi_sp64, xmulxhi_v8plus): New VIS 3.0
	builtins patterns.
	* config/sparc/sparc.c (sparc_vis_init_builtins): Emit new
	builtins.
	(output_v8plus_mult): New function.
	* config/sparc/sparc-protos.h: Declare it.
	* config/sparc/visintrin.h (__vis_fhadds, __vis_fhaddd,
	__vis_fhsubs, __vis_fhsubd, __vis_fnhadds, __vis_fnhaddd,
	__vis_umulxhi, __vis_xmulx, __vis_xmulxhi): New intrinsics.
	* doc/extend.texi: Document new builtins.

gcc/testsuite/

	* gcc.target/sparc/fhalve.c: New test.
	* gcc.target/sparc/fnegop.c: New test.
	* gcc.target/sparc/xmul.c: New test.

From-SVN: r179535
2011-10-04 20:25:58 -07:00
GCC Administrator 9a83cdf714 Daily bump.
From-SVN: r179534
2011-10-05 00:26:24 +00:00
Ian Lance Taylor 1d3e350227 Fix global var initialized to function call with calls as arguments.
From-SVN: r179529
2011-10-04 23:16:32 +00:00
Paolo Carlini 0e83f45aa6 re PR libstdc++/49561 ([C++0x] std::list::size complexity)
2011-10-04  Paolo Carlini  <paolo.carlini@oracle.com>

	PR libstdc++/49561
	* include/bits/stl_list.h (_List_base<>::_List_impl::_M_size):
	Add in C++0x mode.
	(_List_base<>::_List_impl, _List_base<>::_M_get_node,
	_List_base<>::_M_put_node, _List_base<>::_List_base(_List_base&&),
	list<>::size, list<>::swap, list<>::splice): Use it.
	(operator==(const list<>&, const list<>&)): Rewrite in C++0x mode.
	* include/bits/list.tcc (list<>::erase): Likewise.
	(list<>::merge): Adjust in C++0x mode.
	* testsuite/23_containers/list/requirements/dr438/assign_neg.cc:
	Adjust dg-error line number.
	* testsuite/23_containers/list/requirements/dr438/insert_neg.cc:
	Likewise.
	* testsuite/23_containers/list/requirements/dr438/
	constructor_1_neg.cc: Likewise.
	* testsuite/23_containers/list/requirements/dr438/
	constructor_2_neg.cc: Likewise.

From-SVN: r179528
2011-10-04 22:19:44 +00:00
Paolo Carlini 6caf3f7f12 48698.cc (g): Fix return type, avoid -Wall warning.
2011-10-04  Paolo Carlini  <paolo.carlini@oracle.com>

	* testsuite/20_util/bind/48698.cc (g): Fix return type, avoid -Wall
	warning.

From-SVN: r179526
2011-10-04 21:42:43 +00:00
Richard Henderson 75799b9884 c-typeck.c (c_build_vec_shuffle_expr): Fix uninitialized variable.
* c-typeck.c (c_build_vec_shuffle_expr): Fix uninitialized variable.
Avoid save_expr unless two_arguments.

From-SVN: r179525
2011-10-04 14:04:10 -07:00
Jonathan Wakely 73f0503101 alloc_traits.h (__alloc_traits::max_size): Define.
2011-10-04  Jonathan Wakely  <jwakely.gcc@gmail.com>

	* include/ext/alloc_traits.h (__alloc_traits::max_size): Define.
	(__alloc_traits::rebind): Define.
	* include/bits/stl_vector.h: Use them.
	* testsuite/util/testsuite_allocator.h (SimpleAllocator): Define.
	* testsuite/23_containers/vector/allocator/minimal.cc: New.
	* testsuite/23_containers/vector/requirements/dr438/assign_neg.cc:
	Adjust dg-error line numbers.
	* testsuite/23_containers/vector/requirements/dr438/insert_neg.cc:
	Likewise.
	* testsuite/23_containers/vector/requirements/dr438/
	constructor_1_neg.cc: Likewise.
	* testsuite/23_containers/vector/requirements/dr438/
	constructor_2_neg.cc: Likewise.

From-SVN: r179523
2011-10-04 21:34:54 +01:00
Janus Weil 97f2673267 re PR fortran/35831 ([F95] Shape mismatch check missing for dummy procedure argument)
2011-10-04  Janus Weil  <janus@gcc.gnu.org>

	PR fortran/35831
	* interface.c (check_dummy_characteristics): Check the array shape.


2011-10-04  Janus Weil  <janus@gcc.gnu.org>

	PR fortran/35831
	* gfortran.dg/dummy_procedure_6.f90: New.

From-SVN: r179520
2011-10-04 20:37:13 +02:00
Ozkan Sezer 0de99d2625 mingw-w64.h (CPP_SPEC): Rename _REENTRANCE to _REENTRANT.
2011-10-04  Ozkan Sezer  <sezeroz@gmail.com>

        * config/i386/mingw-w64.h (CPP_SPEC): Rename _REENTRANCE to
        _REENTRANT.
        * config/i386/mingw32.h (CPP_SPEC): Likewise.

From-SVN: r179511
2011-10-04 18:42:35 +02:00
David S. Miller 1de6359c61 Small -m{cpu,tune}=native fix under Linux/Sparc.
* config/sparc/driver-sparc.c (cpu_names): Fix string for supersparc
	under Linux.

From-SVN: r179510
2011-10-04 08:45:49 -07:00
Jakub Jelinek 80642376c0 re PR middle-end/50604 (verify_gimple failed: type mismatch in binary expression)
PR tree-optimization/50604
	* builtins.c (fold_builtin_strcpy, fold_builtin_stpcpy,
	fold_builtin_strncpy, fold_builtin_stxcpy_chk): Ensure
	last argument to memcpy has size_type_node type instead of
	ssizetype.
	* tree-ssa-strlen.c (handle_builtin_memcpy): Use size_type_node
	instead of TREE_TYPE (len) as type for newlen.

	* gcc.dg/pr50604.c: New test.

From-SVN: r179508
2011-10-04 17:25:53 +02:00
Andi Kleen c17d253c7a Maintain order of LTO sections
Currently when reading in LTO sections from ld -r files they can
get randomly reordered based on hash tables and random IDs.
This causes reordering later when the final code is generated and
also makes crashes harder to reproduce.

This patch maintains explicit lists based on the input order and uses
those lists to preserve that order when starting the rest of the
LTO passes.

This is the first step to working -fno-toplevel-reorder for
LTO. But this needs more changes because the LTO partitioner
can still reorder.

This add two lists: one for the section and another one for
the file_decl_datas. This is needed because the sections are
walked twice through different data structures.

In addition some code becomes slightly cleaner because we don't need
to pass state through abstract callbacks anymore, but
can just use direct type safe calls.

gcc/lto/:

2011-10-02   Andi Kleen <ak@linux.intel.com>

	* lto-object.c (lto_obj_add_section_data): Add list.
	(lto_obj_add_section): Fill in list.
	(ltoobj_build_section_table): Pass through list.
	* lto.c (file_data_list): Declare.
	(create_subid_section_table): Pass arguments directly.
	Fill in list of file_datas.
	(lwstate): Delete.
	(lto_create_files_from_ids): Pass in direct arguments.
	Don't maintain list.
	(lto_file_read): Use explicit section and file data lists.
	(lto_read_all_file_options): Pass in section_list.
	* lto.h (lto_obj_build_section_table): Add list.
	(lto_section_slot): Add next.
	(lto_section_list): Declare.

From-SVN: r179505
2011-10-04 14:12:37 +00:00
Rainer Orth 0d9bbe5476 Don't XFAIL gcc.dg/graphite/interchange-14.c (PR tree-optimization/49662)
From-SVN: r179503
2011-10-04 14:02:29 +00:00
Jakub Jelinek 31330e16d5 re PR tree-optimization/50522 (C++ std::valarray vectorization missed optimization)
PR tree-optimization/50522
	* tree-ssa-alias.c (ptr_deref_may_alias_decl_p): Don't test
	TYPE_RESTRICT.
	(ptr_derefs_may_alias_p): Call pt_solutions_same_restrict_base
	unconditionally.

From-SVN: r179502
2011-10-04 15:36:24 +02:00
Jakub Jelinek f548a3173e fold-const.c (fold_unary_loc): Don't optimize POINTER_PLUS_EXPR casted to TYPE_RESTRICT pointer by casting the...
* fold-const.c (fold_unary_loc): Don't optimize
	POINTER_PLUS_EXPR casted to TYPE_RESTRICT pointer by
	casting the inner pointer if it isn't TYPE_RESTRICT.
	* tree-ssa-forwprop.c (forward_propagate_addr_expr_1): Don't through
	casts from non-TYPE_RESTRICT pointer to TYPE_RESTRICT pointer.

	* gcc.dg/tree-ssa/restrict-4.c: New test.

From-SVN: r179500
2011-10-04 14:34:06 +02:00
Joseph Myers 8cba602747 config.gcc (i[34567]86-*-elf*, [...]): Use i386/t-crtstuff.
* config.gcc (i[34567]86-*-elf*, x86_64-*-elf*): Use
	i386/t-crtstuff.

From-SVN: r179498
2011-10-04 12:24:23 +01:00
Artjoms Sinkarovs 08f215a24f vector-compare-1.c: Fix trailing white spaces.
2011-10-04  Artem Shinkarov  <artyom.shinkaroff@gmail.com>
	* gcc.c-torture/execute/vector-compare-1.c: Fix trailing white
	spaces.
	(main): Use __typeof to get result type of comparison.

From-SVN: r179497
2011-10-04 10:01:32 +00:00
Jan Hubicka 398f05daa1 lto-streamer.h (lto_input_toplevel_asms): Add order_base parameter.
* lto-streamer.h (lto_input_toplevel_asms): Add order_base parameter.
	* lto-streamer-in.c (lto_input_toplevel_asms): Stream in order.
	* lto-streamer-out.c (lto_output_toplevel_asms): Stream out order.
	* lto-cgraph.c (order_base): New static var.
	(lto_output_node): Stream in order.
	(lto_output_varpool_node): Stream out order.
	(input_node): Stream in order.
	(input_varpool_node): Stream out order.
	(input_cgraph_1): Initialize order base; update call of
	lto_input_toplevel_asms.

From-SVN: r179496
2011-10-04 09:46:56 +00:00
Georg-Johann Lay 36a50ab6e0 re PR target/50566 ([avr]: Add support for better logging similar to -mdeb)
PR target/50566
	* config/avr/avr-protos.h (avr_legitimize_reload_address): New
	prototype.
	* config/avr/avr.h (LEGITIMIZE_RELOAD_ADDRESS): Copy worker code
	from here...
	* config/avr/avr.c (avr_legitimize_reload_address) ...to this new
	function.  Log if avr_log.legitimize_reload_address.

From-SVN: r179494
2011-10-04 08:23:03 +00:00
Eric Botcazou 437bcafa1a * config/sparc/sparc.c (sparc_fold_builtin): Use a sequence of tests.
From-SVN: r179493
2011-10-04 07:40:07 +00:00
Andreas Krebbel aecb619723 longlong.h (smul_ppmm, sdiv_qrnnd): Add underscores to the local variables.
2011-10-04  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>

	* longlong.h (smul_ppmm, sdiv_qrnnd): Add underscores to the local
	variables.  Fix second operand of DR.  Swap inputs for sdiv_qrnnd.

From-SVN: r179491
2011-10-04 07:27:01 +00:00
Ira Rosen 26ac357939 * lib/target-supports.exp
(check_effective_target_vect_multiple_sizes):
        Make et_vect_multiple_sizes_saved global.
        (check_effective_target_vect64): Make et_vect64_saved global.

From-SVN: r179490
2011-10-04 07:21:46 +00:00
David S. Miller a4f713f550 More consistent access to sparc %ger register.
* config/sparc/sparc.md (fpack16_vis, fpackfix_vis, fpack32_vis): Make
	GSR_REG an input operand to UNSPEC instead of a parallel USE.
	(faligndata<V64I:mode>_vis): Likewise and use DI mode.
	(alignaddrsi_vis, alignaddrdi_vis, alignaddrlsi_vis, alignaddrldi_vis):
	Reference GSR_REG in DI mode, simplify convoluted expressions by using
	zero_extract.
	(bshuffle<V64I:mode>_vis): Reference GSR_REG in DI mode.

From-SVN: r179489
2011-10-03 23:34:22 -07:00
Maxim Kuvyrkov 57f934115e * tree-eh.c (remove_unreachable_handlers): Obvious cleanup.
From-SVN: r179486
2011-10-04 02:23:17 +00:00
GCC Administrator 65e820e086 Daily bump.
From-SVN: r179484
2011-10-04 00:17:40 +00:00
Joseph Myers 27257365c8 * de.po: Update.
From-SVN: r179478
2011-10-03 21:15:53 +01:00
Jakub Jelinek 7617c0fdfb godump.c (go_output_typedef): Support printing enum values that don't fit in a signed HOST_WIDE_INT.
* godump.c (go_output_typedef): Support printing enum values that
	don't fit in a signed HOST_WIDE_INT.

Co-Authored-By: Ian Lance Taylor <iant@google.com>

From-SVN: r179477
2011-10-03 20:09:56 +00:00
Anatoly Sokolov 586747fca1 cris.c (cris_output_addr_const_extra): Make static.
* config/cris/cris.c (cris_output_addr_const_extra): Make static.
	(TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
	* config/cris/cris.h (OUTPUT_ADDR_CONST_EXTRA): Remove.
	* config/cris/cris-protos.h (cris_output_addr_const_extra): Remove.

From-SVN: r179476
2011-10-03 23:39:50 +04:00
Anatoly Sokolov cb69db4fe4 m68k.c (m68k_output_addr_const_extra): Make static.
* config/m68k/m68k.c (m68k_output_addr_const_extra): Make static.
	(TARGET_OUTPUT_ADDR_CONST_EXTRA): Define.
	* config/m68k/m68k.h (OUTPUT_ADDR_CONST_EXTRA): Remove.
	* config/m68k/m68k-protos.h (m68k_output_addr_const_extra): Remove.

From-SVN: r179474
2011-10-03 23:16:29 +04:00
Jonathan Wakely 491258e638 pointer_to.cc: Define equality operator and use.
2011-10-03  Jonathan Wakely  <jwakely.gcc@gmail.com>

	* testsuite/20_util/pointer_traits/pointer_to.cc: Define equality
	operator and use.

From-SVN: r179473
2011-10-03 20:11:53 +01:00
Steve Ellcey f903e000c3 re PR target/49967 (The -static-libstdc++ does not work on HP-UX (IA64 B.11.23, probably others))
2011-10-03  Steve Ellcey  <sje@cup.hp.com>

	PR target/49967
	* configure.ac (gcc_cv_ld_static_dynamic): Define for *-*-hpux*.
	(gcc_cv_ld_static_option): Ditto.
	(gcc_cv_ld_dynamic_option): Ditto.
	* configure: Regenerate.

From-SVN: r179472
2011-10-03 17:57:40 +00:00
David S. Miller 4f936a37f2 Minor fixup to the sparc bshuffle pattern.
* config/sparc/sparc.md (bshuffle<V64I:mode>_vis): Don't wrap GSR_REG in
	a USE, since it's now a true arg to the UNSPEC.

From-SVN: r179470
2011-10-03 10:55:10 -07:00
Richard Henderson d59b911eec Fix Artem's name spelling, at request.
From-SVN: r179469
2011-10-03 10:11:11 -07:00
Richard Henderson a46e3824b7 Fix broken commit wrt vect-shuffle-N.c tests.
From-SVN: r179468
2011-10-03 10:08:43 -07:00
David S. Miller 2b25763bce Minor fixups to the sparc bmask/bshuffle patterns.
* config/sparc/sparc.md (bmask<P:mode>_vis): Split into explicit 'di'
	and 'si' patterns which describe the GSR changes explicitly in the
	RTL using zero_extract.
	(bshuffle<V64I:mode>_vis): Put the GSR use inside of the unspec.

From-SVN: r179465
2011-10-03 09:41:07 -07:00
Paolo Carlini 1c29961267 hashtable.h (_Hashtable<>::insert(value_type&&), [...]): Don't define here...
2011-10-03  Paolo Carlini  <paolo.carlini@oracle.com>

	* include/bits/hashtable.h (_Hashtable<>::insert(value_type&&),
	insert(const_iterator, value_type&&)): Don't define here...
	* include/bits/unordered_set.h (__unordered_set<>,
	__unordered_multiset<>): ... define here instead.

From-SVN: r179464
2011-10-03 15:28:47 +00:00
Artjoms Sinkarovs f90e8e2eae Vector shuffling patch from Artem Shinkarov.
From-SVN: r179462
2011-10-03 08:13:26 -07:00
Jakub Jelinek e4a5b262e7 re PR tree-optimization/50587 (ICE init_range_entry, at tree-ssa-reassoc.c:1698 caused by recent change)
PR tree-optimization/50587
	* tree-ssa-reassoc.c (init_range_entry): Stop iterating when
	arg0 is not a SSA_NAME.

From-SVN: r179447
2011-10-03 11:06:38 +02:00
Richard Sandiford 93b765d091 ipa-inline-analysis.c (MAX_TIME): Update comment.
gcc/
	* ipa-inline-analysis.c (MAX_TIME): Update comment.

From-SVN: r179446
2011-10-03 08:11:43 +00:00
Jason Merrill 874fc1677e pt.c (tsubst_pack_expansion): Re-use ARGUMENT_PACK_SELECTs.
* pt.c (tsubst_pack_expansion): Re-use ARGUMENT_PACK_SELECTs.
	Change unsubstituted_packs to bool.

From-SVN: r179444
2011-10-03 00:32:35 -04:00
Jason Merrill a558c1e2e1 parser.c (cp_parser_range_for): Don't try to deduce from {} in a template.
* parser.c (cp_parser_range_for): Don't try to deduce from {}
	in a template.

From-SVN: r179443
2011-10-03 00:32:20 -04:00
David S. Miller bb69f33b3a Add missing changelog details in previous commit.
* config/sparc/predicates.md (const_one_operand): Delete.

From-SVN: r179442
2011-10-02 17:52:32 -07:00
Richard Henderson 5422cd26d3 Add missing sparc shift zero extensions, and fix shift attributes.
* config/sparc/sparc.md (ashlsi3, *ashldi3_sp64): Remove
	conditional insn type setting, we always emit a shift.
	(*ashlsi3_extend, *lshrsi3_extend0): New patterns.
	(*lshrsi3_extend): Rename to *lshrsi3_extend1.

Co-Authored-By: David S. Miller <davem@davemloft.net>

From-SVN: r179441
2011-10-02 17:46:54 -07:00