Commit Graph

95148 Commits

Author SHA1 Message Date
Olivier Hainque
1d3499d85c alpha.c (alpha_sa_size): Force procedure type to PT_STACK when frame_pointer_needed on OpenVMS.
* config/alpha/alpha.c (alpha_sa_size): Force procedure type to
	PT_STACK when frame_pointer_needed on OpenVMS.
	(alpha_pv_save_size, alpha_using_fp): Remove.
	(alpha_vms_can_eliminate): New function. Support for CAN_ELIMINATE
	with proper processing for PT_NULL.
	(alpha_vms_initial_elimination_offset): New function. Support for
	INITIAL_ELIMINATION_OFFSET with proper processing for PT_NULL.
	(alpha_sa_size): Force procedure type to PT_STACK when
	frame_pointer_needed on OpenVMS.
	* config/alpha/alpha-protos.h (alpha_pv_save_size): Remove prototype.
	(alpha_using_fp): Likewise.
	(alpha_vms_can_eliminate): Add prototype.
	(alpha_vms_initial_elimination_offset): Likewise.
	* config/alpha/vms.h (CAN_ELIMINATE, INITIAL_ELIMINATION_OFFSET):
	Call alpha_vms_can_eliminate and alpha_vms_initial_elimination_offset.


Co-Authored-By: Douglas B Rupp <rupp@gnat.com>

From-SVN: r150646
2009-08-11 05:14:48 +00:00
Eric Botcazou
18fd562170 alpha.c (common_object_handler): New function.
* config/alpha/alpha.c (common_object_handler): New function.
	(vms_attribute_table): Declare a single attribute "common_object".
	(vms_output_aligned_decl_common): New global function.
	(SECTION_VMS_OVERLAY): Delete.
	(SECTION_VMS_GLOBAL): Likewise.
	(SECTION_VMS_INITIALIZE): Likewise.
	(vms_asm_named_section): Remove support for above flags.
	(vms_section_type_flags): Delete.
	(TARGET_SECTION_TYPE_FLAGS): Likewise.
	* config/alpha/alpha-protos.h (vms_output_aligned_decl_common): New.
	* config/alpha/vms.h (ASM_OUTPUT_ALIGNED_COMMON): Delete.
	(ASM_OUTPUT_ALIGNED_DECL_COMMON): New macro.


Co-Authored-By: Douglas B Rupp <rupp@gnat.com>

From-SVN: r150645
2009-08-11 05:00:51 +00:00
Benjamin Kosnik
41ca42469f future: Move error handling bits outside macro guard.
2009-08-10  Benjamin Kosnik  <bkoz@redhat.com>

	* include/std/future: Move error handling bits outside macro guard.
	* src/future.cc: Adjust.

	* include/precompiled/stdc++.h: Add future.
	* doc/xml/manual/using.xml: Same.

From-SVN: r150642
2009-08-11 04:30:35 +00:00
Benjamin Kosnik
a00e37691d hashtable.cc: Just definitions.
2009-08-10  Benjamin Kosnik  <bkoz@redhat.com>

	* src/hashtable.cc: Just definitions.
	* src/hashtable_c++0x.cc: Compile C++0x versions.
	* src/hash.cc: Same.
	* src/hash_c++0x.cc: Same.
	src/hash_tr1.cc: Compile TR1 versions.
	src/hashtable_tr1.cc: Same.

	* src/limits_c++0x.cc: Sync build error handling.

	* src/Makefile.am (sources): Change hash.cc to hash_tr1.cc,
	hashtable.cc to hashtable_tr1.cc.
	* src/Makefile.in: Regenerate.

From-SVN: r150641
2009-08-11 01:24:59 +00:00
Benjamin Kosnik
5302002658 functional: Doxygen markup.
2009-08-10  Benjamin Kosnik  <bkoz@redhat.com>

	* include/tr1_impl/functional: Doxygen markup.

	* doc/html/*: Regenerate.

From-SVN: r150640
2009-08-11 00:29:21 +00:00
GCC Administrator
56cd0445fb Daily bump.
From-SVN: r150639
2009-08-11 00:16:39 +00:00
SUGIOKA Toshinobu
092f3f9795 re PR target/41015 (SH: miscompilation for sh4-linux)
PR target/41015
	* longlong.h [__sh__] (udiv_qrnnd): Add T register to clobber list.
	(sub_ddmmss): Likewise.

From-SVN: r150635
2009-08-10 20:57:35 +00:00
Jason Merrill
e8f43da6f9 Implement DR 757...
Implement DR 757: It's OK for a decl to use a type without linkage
	so long as the decl is defined in the current translation unit.
	* decl2.c (no_linkage_decls): New vector.
	(mark_used): Add decls that use types with no linkage.
	(cp_write_global_declarations): Check that they are defined.
	(decl_defined_p, no_linkage_error): New fns.
	* cp-tree.h (DECL_NO_LINKAGE_CHECKED): New macro.
	(struct lang_decl_base): Add flag.
	* decl.c (grokfndecl): Don't check type linkage.
	(grokvardecl): If the type has no linkage, just make sure
	DECL_LANG_SPECIFIC is set.
	* pt.c (check_instantiated_arg): Don't check type linkage.
	* name-lookup.c (is_local_extern): New fn.
	* name-lookup.h: Declare it.

From-SVN: r150634
2009-08-10 16:47:55 -04:00
Benjamin Kosnik
8d1b99e26a future: Fixes for -fno-exceptions.
2009-08-10  Benjamin Kosnik  <bkoz@redhat.com>

	* include/std/future: Fixes for -fno-exceptions.
	* include/bits/functexcept.h: Same.
	* libsupc++/exception_ptr.h: Same.
	* src/pool_allocator.cc: Same.
	* src/future.cc: Same.
	* src/functexcept.cc: Same.
	* config/abi/pre/gnu.ver: New exports.
	* testsuite/30_threads/packaged_task/cons/assign_neg.cc: Adjust.
	* testsuite/30_threads/packaged_task/cons/copy_neg.cc: Same.
	* testsuite/30_threads/unique_future/cons/assign_neg.cc: Same.
	* testsuite/30_threads/unique_future/cons/copy_neg.cc: Same.
	* testsuite/30_threads/shared_future/cons/assign_neg.cc: Same.
	* testsuite/30_threads/promise/cons/assign_neg.cc: Same.
	* testsuite/30_threads/promise/cons/copy_neg.cc: Same.

	* testsuite/23_containers/deque/operators/1.cc: Separate in two...
	* testsuite/23_containers/deque/operators/2.cc: New.

From-SVN: r150633
2009-08-10 18:24:47 +00:00
Andreas Tobler
3507653247 re PR bootstrap/41018 (bootstrap broken on FreeBSD powerpc)
2009-08-10  Andreas Tobler  <a.tobler@schweiz.org>

	PR bootstrap/41018
	* config/rs6000/freebsd.h: Define SVR4_ASM_SPEC. Adjust copyright
	year.

From-SVN: r150632
2009-08-10 20:23:57 +02:00
Manuel López-Ibáñez
812a5d4b7e dg.exp: Test also c-c++-common dir.
2009-08-10  Manuel López-Ibáñez  <manu@gcc.gnu.org>

testsuite/
       * gcc.dg/dg.exp: Test also c-c++-common dir.
       * g++.dg/dg.exp: Likewise.
       * g++.dg/warn/Wconversion-real.C: Delete.
       * gcc.dg/Wconversion-real.c: Move to ...
       * c-c++-common/Wconversion-real.c: ... here.
       * lib/target-supports.exp
       (check_effective_target_c,check_effective_target_c++): New.

From-SVN: r150627
2009-08-10 17:10:50 +00:00
Ulrich Weigand
0159ec792b re PR middle-end/37053 (ICE in reload_cse_simplify_operands, at postreload.c:395)
PR target/37053
	* reload1.c (reload_as_needed): Use cancel_changes to completely
	undo a failed replacement attempt.

From-SVN: r150626
2009-08-10 15:34:09 +00:00
Neil Vachharajani
ee26a76d35 * Moved ChangeLog entry to the correct ChangeLog
From-SVN: r150625
2009-08-10 14:57:24 +00:00
Laurent GUERBY
305418c899 make.adb: Handle multilib
2009-08-10  Laurent GUERBY  <laurent@guerby.net>

        * make.adb: Handle multilib

From-SVN: r150623
2009-08-10 10:52:37 +00:00
Daniel Kraft
94747289e9 re PR fortran/37425 (Fortran 2003: GENERIC bindings as operators)
2009-08-10  Daniel Kraft  <d@domob.eu>

	PR fortran/37425
	* gfortran.dg/typebound_operator_1.f03: New test.
	* gfortran.dg/typebound_operator_2.f03: New test.

2009-08-10  Daniel Kraft  <d@domob.eu>

	PR fortran/37425
	* gfortran.h (struct gfc_namespace): New fields tb_uop_root and tb_op.
	(gfc_find_typebound_user_op): New routine.
	(gfc_find_typebound_intrinsic_op): Ditto.
	(gfc_check_operator_interface): Now public routine.
	* decl.c (gfc_match_generic): Match OPERATOR(X) or ASSIGNMENT(=).
	* interface.c (check_operator_interface): Made public, renamed to
	`gfc_check_operator_interface' accordingly and hand in the interface
	as gfc_symbol rather than gfc_interface so it is useful for type-bound
	operators, too.  Return boolean result.
	(gfc_check_interfaces): Adapt call to `check_operator_interface'.
	* symbol.c (gfc_get_namespace): Initialize new field `tb_op'.
	(gfc_free_namespace): Free `tb_uop_root'-based tree.
	(find_typebound_proc_uop): New helper function.
	(gfc_find_typebound_proc): Use it.
	(gfc_find_typebound_user_op): New method.
	(gfc_find_typebound_intrinsic_op): Ditto.
	* resolve.c (resolve_tb_generic_targets): New helper function.
	(resolve_typebound_generic): Use it.
	(resolve_typebound_intrinsic_op), (resolve_typebound_user_op): New.
	(resolve_typebound_procedures): Resolve operators, too.
	(check_uop_procedure): New, code from gfc_resolve_uops.
	(gfc_resolve_uops): Moved main code to new `check_uop_procedure'.

From-SVN: r150622
2009-08-10 12:51:46 +02:00
Richard Guenther
4f4e722eb6 re PR middle-end/41006 (verify_stmts failed: error: non-trivial conversion at assignment)
2009-08-10  Richard Guenther  <rguenther@suse.de>

	PR middle-end/41006
	* tree-ssa.c (useless_type_conversion_p_1): Fold into ...
	(useless_type_conversion_p): ... here.  Require pointer targets
	to be compatible.

	* gcc.c-torture/compile/pr41006-1.c: New testcase.
	* gcc.c-torture/compile/pr41006-2.c: Likewise.

From-SVN: r150621
2009-08-10 09:22:47 +00:00
Janus Weil
727e85447d re PR fortran/40940 ([F03] CLASS statement)
2009-08-10  Janus Weil  <janus@gcc.gnu.org>

	PR fortran/40940
	* decl.c (gfc_match_type_spec): Match CLASS statement and warn about
	missing polymorphism.
	* gfortran.h (gfc_typespec): Add field 'is_class'.
	* misc.c (gfc_clear_ts): Initialize 'is_class' to zero.
	* resolve.c (type_is_extensible): New function to check if a derived
	type is extensible.
	(resolve_fl_variable_derived): Add error checks for CLASS variables.
	(resolve_typebound_procedure): Disallow non-polymorphic passed-object
	dummy arguments, turning warning into error.
	(resolve_fl_derived): Use 'type_is_extensible'. Disallow non-polymorphic
	passed-object dummy arguments for procedure pointer components,
	turning warning into error. Add error check for CLASS components.

2009-08-10  Janus Weil  <janus@gcc.gnu.org>

	PR fortran/40940
	* gfortran.dg/class_1.f03: New.
	* gfortran.dg/class_2.f03: New.
	* gfortran.dg/proc_ptr_comp_pass_1.f90: Use CLASS instead of TYPE.
	* gfortran.dg/proc_ptr_comp_pass_2.f90: Ditto.
	* gfortran.dg/proc_ptr_comp_pass_3.f90: Ditto.
	* gfortran.dg/typebound_call_10.f03: Ditto.
	* gfortran.dg/typebound_call_2.f03: Ditto.
	* gfortran.dg/typebound_call_3.f03: Ditto.
	* gfortran.dg/typebound_call_4.f03: Ditto.
	* gfortran.dg/typebound_generic_3.f03: Ditto.
	* gfortran.dg/typebound_generic_4.f03: Ditto.
	* gfortran.dg/typebound_proc_1.f08: Ditto.
	* gfortran.dg/typebound_proc_5.f03: Ditto.
	* gfortran.dg/typebound_proc_6.f03: Ditto.

From-SVN: r150620
2009-08-10 11:19:24 +02:00
Arnaud Charlet
477eca006c [multiple changes]
2009-08-10  Vincent Celier  <celier@adacore.com>

	* prj-env.adb (Create_Config_Pragmas_File.Write_Temp_File): Do not use
	the temporary file name in the error message when the temporary file
	cannot be created.

2009-08-10  Yannick Moy  <moy@adacore.com>

	* gnat_ugn.texi: Fix typo

From-SVN: r150619
2009-08-10 10:33:30 +02:00
Arnaud Charlet
68716ad5f6 [multiple changes]
2009-08-10  Robert Dewar  <dewar@adacore.com>

	* exp_ch7.adb: Add ??? comment for last change

2009-08-10  Vincent Celier  <celier@adacore.com>

	* prj-env.adb (Add_To_Buffer): New procedure
	(Create_Config_Pragmas_File): Write to temporary file in one shot
	(Create_Mapping_File): Ditto
	(Set_Ada_Paths): Ditto

From-SVN: r150618
2009-08-10 10:25:49 +02:00
Vincent Celier
6d93ae145e re PR ada/17566 (Gnatxref formatting)
2009-08-10  Vincent Celier  <celier@adacore.com>

	PR ada/17566
	* xref_lib.adb (Print_Xref): Make sure that there is at least one space
	between a declaration name and its type.

From-SVN: r150617
2009-08-10 10:25:05 +02:00
Dodji Seketeli
b1d82db058 re PR c++/40866 (ICE in create_tmp_var, at gimplify.c:504)
2009-08-10  Dodji Seketeli  <dodji@redhat.com>

gcc/ChangeLog:
	PR c++/40866
	* tree-inline.c (copy_statement_list): The resulting copy shouldn't
	loose the original type of the statement list.

gcc/testsuite/ChangeLog:
	PR c++/40866
	* g++.dg/expr/stmt-expr-1.C: New test.

From-SVN: r150615
2009-08-10 09:16:08 +02:00
Douglas B Rupp
5e3fef6ce6 alpha.c: Include libfuncs.h
* config/alpha/alpha.c: Include libfuncs.h
	(avms_asm_output_extern): New function.
	(alpha_init_libfuncs): Init some decc libfuncs.
	* config/alpha/alpha-protos.h (avms_asm_output_external): Declare.
	* config/alpha/vms.h (ASM_OUTPUT_EXTERNAL): Define.
	(DO_CRTL_NAMES): Define.
	(LIB_SPEC): Remove.
	* config/alpha/vms64.h: (POINTERS_EXTEND_UNSIGNED): Remove undef.
	(LONG_TYPE_SIZE): Define.
	(TARGET_OS_CPP_BUILTINS): Define with __LONG_POINTERS=1
	(SUBTARGET_SWITCHES): Define malloc64 switch.
	(TARGET_DEFAULT): Default MASK_MALLOC64 set.
	(MASK_RETURN_ADDR): Define.
	doc/invoke.texi (mmalloc64): Document switch.

From-SVN: r150614
2009-08-10 04:50:23 +00:00
Olivier Hainque
221cf9abf3 alpha.c (struct machine_function): New flag for VMS, uses_condition_handler.
* config/alpha/alpha.c (struct machine_function): New flag for VMS,
	uses_condition_handler.
	(alpha_expand_builtin_establish_vms_condition_handler): New expander.
	(alpha_expand_builtin_revert_vms_condition_handler): New expander.
	(enum alpha_builtin): New ALPHA_BUILTIN_REVERT_VMS_CONDITION_HANDLER
	and ALPHA_BUILTIN_ESTABLISH_VMS_CONDITION_HANDLER values.
	(code_for_builtin): New insn codes for the new alpha_builtins.
	(alpha_init_builtins): Register the new functions as BUILT_IN_MD.
	(alpha_sa_size): Account for uses_condition_handler.
	(alpha_expand_prologue): Likewise.
	(alpha_start_function): Likewise.
	(alpha_expand_epilogue): Likewise.
	* config/alpha/alpha-protos.h: Prototype the new alpha.c builtin
	establish/revert expanders.
	* config/alpha/alpha.h (DWARF_FRAME_REGNUM): Define.
	* config/alpha/alpha.md	(builtin_establish_vms_condition_handler):
	New expander, resorting to the alpha.c associated function.
	(builtin_revert_vms_condition_handler): Likewise.
	* config/alpha/vms-gcc_shell_handler.c: New file. Implements
	__gcc_shell_handler, the static VMS condition handler used as
	an indirection wrapper to the current dynamically established
	handler.
	* config/alpha/vms-unwind.h: Complete rewrite.
	* config/alpha/t-vms (LIB2FUNCS_EXTRA): Add vms-gcc_shell_handler.c
	* config/alpha/vms.h (MD_UNWIND_SUPPORT):
	

Co-Authored-By: Douglas B Rupp <rupp@gnat.com>

From-SVN: r150612
2009-08-10 04:38:02 +00:00
Eric Botcazou
b714133e38 alpha.c (alpha_links): Add 'target' field.
* config/alpha/alpha.c (alpha_links): Add 'target' field.
	(alpha_need_linkage): Handle aliases.  Return function symbol.
	(alpha_use_linkage): Rename 'linkage' argument to 'func'.
	Use ultimate alias target for the linkage name.
	* config/alpha/alpha.md (movmemdi): Use the symbol returned
	by alpha_need_linkage for the function symbol.
	(setmemdi): Likewise.


Co-Authored-By: Douglas B Rupp <rupp@gnat.com>

From-SVN: r150611
2009-08-10 04:12:45 +00:00
Douglas B Rupp
3bd1b1096b alpha.c (TARGET_ASM_UNALIGNED_*_OP): Define if on VMS.
* config/alpha/alpha.c (TARGET_ASM_UNALIGNED_*_OP): Define if on VMS.
	* config/alpha/vms.h (OBJECT_FORMAT_ELF): Define.
	(ASM_WEAKEN_LABEL): Define.
	(CRT_CALL_STATIC_FUNCTION): Define.
	(STARTFILE_SPEC): Add crtbegin.o crtbeginS.o.
	(ENDFILE_SPEC): Define.
	(INIT_SECTION_ASM_OP): Define.
	* config/alpha/vms-dwarf2eh.asm (__EH_FRAME_BEGIN__): Remove.
	* config/alpha/t-vms (EXTRA_PARTS): Add crtbegin.o crtbeginS.o
	crtend.o crtendS.o.
	(MULTILIB_OSDIRNAMES): Define.
	(shlib_version): Define.
	(SHLIB_EXT): Define.
	(SHLIB_OBJS): Define.
	(SHLIB_NAME): Define.
	(SHLIB_MULTILIB): Define.
	(SHLIB_INSTALL): Define.
	(SHLIB_SYMVEC): Define.
	(SHLIB_SYMVECX2): Define.
	(SHLIB_LINK): Define.

From-SVN: r150610
2009-08-10 04:05:54 +00:00
Douglas B Rupp
fe2786f5ef alpha.c (alpha_initialize_trampoline): Initialize VMS trampoline IAW ABI for bounded procedure calls.
* config/alpha/alpha.c (alpha_initialize_trampoline):
	Initialize VMS trampoline IAW ABI for bounded procedure calls.
	(alpha_start_function): Emit transfer address on nested functions
	for VMS trampoline call.
	* config/alpha/t-vms (LIB2FUNCS_EXTRA): Remove vms_tramp.asm
	since no longer used.
	* config/alpha/vms-tramp.asm: Remove.
	* config/alpha/vms.h (TRAMPOLINE_TEMPLATE): Leave undefined
	since now only data initialized at runtime.

From-SVN: r150609
2009-08-10 03:56:39 +00:00
Douglas B Rupp
c889a16f4b vms.h (HANDLE_SYSV_PRAGMA): Define.
* config/alpha/vms.h (HANDLE_SYSV_PRAGMA): Define.
	(LINK_GCC_C_SEQUENCE_SPEC): Define.
	(MD_EXEC_PREFIX): Remove, no longer used.
	(MD_STARTFILE_PREFIX): Likewise.
	(INCLUDE_DEFAULTS): Likewise.
	* config/alpha/t-vms:
	(vms-dwarf2.o, vms-dwarf2eh.o): Use GCC_FOR_TARGET to compile.

From-SVN: r150608
2009-08-10 03:26:59 +00:00
GCC Administrator
ed5655ce41 Daily bump.
From-SVN: r150603
2009-08-10 00:16:46 +00:00
Richard Guenther
a64509053c re PR tree-optimization/41016 (ICE in build_int_cst_wide with -O1)
2009-08-09  Richard Guenther  <rguenther@suse.de>

	PR tree-optimization/41016
	* tree-ssa-ifcombine.c (get_name_for_bit_test): Fix tuplification
	bug.
	(operand_precision): Remove.
	(integral_operand_p): Likewise.
	(recognize_single_bit_test): Adjust.

	* gcc.c-torture/compile/pr41016.c: New testcase.

From-SVN: r150595
2009-08-09 20:10:41 +00:00
Richard Sandiford
f517845606 c-common.c (c_fully_fold_internal): Issue a warning if a binary operation overflows.
gcc/
	* c-common.c (c_fully_fold_internal): Issue a warning if a binary
	operation overflows.  Likewise non-cast unary arithmetic.
	If one arm of a conditional expression is always taken,
	inhibit evaluation warnings for the other arm.  Likewise inhibit
	evaluation warnings for the second && or || operand if the first
	operand is enough to determine the result.
	* c-typeck.c (build_conditional_expr): Apply the same inhibition
	rules here.
	(build_binary_op): Prevent duplicate evaluation warnings.

gcc/testsuite/
	* gcc.dg/overflow-warn-8.c: New test.

From-SVN: r150594
2009-08-09 18:38:04 +00:00
Richard Sandiford
8f048d2f21 tree-out-of-ssa.c (insert_value_copy_on_edge): If the source and destination have different modes...
gcc/
	* tree-out-of-ssa.c (insert_value_copy_on_edge): If the source
	and destination have different modes, Use promote_mode to
	determine the signedness of the conversion.  Assert that the
	promoted source mode matches the destination mode.  Don't pass
	the destination and destination mode to expand_expr if the source
	mode is different.  Simplify conversion logic.

From-SVN: r150592
2009-08-09 15:56:27 +00:00
Ira Rosen
6f4454fcab re PR tree-optimization/41008 (ICE in vect_is_simple_reduction, at tree-vect-loop.c:1708)
PR tree-optimization/41008
	* tree-vect-loop.c (vect_is_simple_reduction): Get operands
	from condition only in case it's a comparison. Adjust checks.

From-SVN: r150591
2009-08-09 12:13:19 +00:00
Francois-Xavier Coudert
0a940ddd90 re PR libfortran/40549 (Building libgfortran as a DLL)
PR libfortran/40549
	* Makefile.in (LTLDFLAGS): Add -no-undefined.
	* Makefile.am: Regenerate.
	* libgfortran.h: Remove unused block of code.

From-SVN: r150590
2009-08-09 11:02:08 +00:00
Tobias Burnus
2b374f5598 re PR fortran/40955 (STDCALL attributes are not saved in the .MOD files)
2009-08-05  Tobias Burnus  <burnus@net-b.de>

        PR fortran/40955
        * gfortran.h (ext_attr_id_t): Add typedef for this enum.
        (gfc_add_ext_attribute): Use it.
        * decl.c (gfc_match_gcc_attributes): Ditto.
        * expr.c (gfc_check_pointer_assign): Ditto.
        * symbol.c (gfc_add_ext_attribute): Ditto.
        (gfc_copy_attr): Copy also ext_attr.
        * resolve.c (resolve_fl_derived,resolve_symbol): Ditto.
        * module.c (mio_symbol_attribute): Save ext_attr in the mod
        * file.

2009-08-05  Tobias Burnus  <burnus@net-b.de>

        PR fortran/40955
        * gfortran.dg/module_md5_1.f90: Update MD5 check sum.

From-SVN: r150589
2009-08-09 10:35:36 +02:00
Bernd Schmidt
2c08497af0 tree-dfa.c (renumber_gimple_stmt_uids_in_blocks): New function.
* tree-dfa.c (renumber_gimple_stmt_uids_in_blocks): New function.
	* tree-flow.h (renumber_gimple_stmt_uids_in_blocks): Declare it.
	* tree-ssa-loop-ivopts.c (comp_cost): Make COST an integer.
	(enum iv_position): Add IP_AFTER_USE and IP_BEFORE_USE.
	(dump_cand): Handle them.
	(struct iv_cand): New members COST_STEP and AINC_USE.
	(stmt_after_increment): Likewise.
	(stmt_after_inc_pos): Renamed from stmt_after_ip_original_pos.  All
	callers changed.  Use gimple_uid comparison instead of scanning.
	(add_candidate_1): When looking for identical candidates, take
	AINC_USE into account.  Set it for new candidates.
	(force_expr_to_var_cost): Cast target_spill_cost to int.
	(get_address_cost): New arguments STMT_AFTER_INC and MAY_AUTOINC.
	All callers changed.  Check for availability of autoinc addressing
	modes, both in general for a given mode, and in the specific use
	case.
	(get_computation_cost_at): New argument CAN_AUTOINC.  All callers
	changed.
	(get_computation_cost): Likewise.
	(autoinc_possible_for_pair, set_autoinc_for_original_candidates,
	add_autoinc_candidates): New static functions.
	(add_candidate): Call add_autoinc_candidates for candidates based on
	a USE_ADDRESS use.
	(find_iv_candidates): Call set_autoinc_for_original_candidates.
	(determine_use_iv_cost_address): If we have an autoinc candidate at
	the matching use, verify autoinc is possible and subtract the cost
	of the candidate's step from the cost.
	(determine_iv_cost): Record the cost of the increment in the COST_STEP
	member of the candidate.
	(tree_ssa_iv_optimize_loop): Swap the calls to determine_iv_costs and
	determine_use_iv_costs.  Call renumber_gimple_stmt_uids_in_blocks.

testsuite/
	* gcc.target/bfin/loop-autoinc.c: New file.

From-SVN: r150588
2009-08-09 07:59:12 +00:00
Douglas B Rupp
a9a25daa5c config.build (ia64-hp-*vms*): New target.
* config.build (ia64-hp-*vms*): New target.
	(alpha64-dec-*vms*,alpha*-dec-*vms*): Fix for config/vms and unify
	with ia64-hp-*vms*.
	* config.gcc (ia64-hp-*vms*): New target.
	(alpha64-dec-*vms*,alpha*-dec-*vms*): Fix for config/vms and unify
	with ia64-hp-*vms*.
	* config.host (ia64-hp-*vms*): New target.
	(alpha64-dec-*vms*,alpha*-dec-*vms*): Fix for config/vms and unify
	with ia64-hp-*vms*.
	* libgcc/config.host (ia64-hp-*vms*): New target.
	(alpha64-dec-*vms*,alpha*-dec-*vms*): Fix for config/vms and unify
	with ia64-hp-*vms*.

From-SVN: r150587
2009-08-09 07:05:11 +00:00
GCC Administrator
affef56364 Daily bump.
From-SVN: r150584
2009-08-09 00:17:07 +00:00
Richard Guenther
55194b0b41 re PR tree-optimization/40991 (ICE: at optimization -02)
2009-08-08  Richard Guenther  <rguenther@suse.de>

	PR tree-optimization/40991
	* tree-ssa-pre.c (eliminate): Delay purging EH edges.

	* g++.dg/torture/pr40991.C: New testcase.

From-SVN: r150580
2009-08-08 15:32:36 +00:00
Laurent GUERBY
9e0567dee2 impdef.a: Tweak timing constants.
2009-08-08  Laurent GUERBY  <laurent@guerby.net>

        * ada/acats/support/impdef.a: Tweak timing constants. Add
        Long_Minimum_Task_Switch and Long_Switch_To_New_Task.
        * ada/acats/tests/c9/c940005.a: Use new timing constants.
        * ada/acats/tests/c9/c940007.a: Likewise.
        * ada/acats/tests/c9/c94001c.ada: Likewise.
        * ada/acats/tests/c9/c94006a.ada: Likewise.
        * ada/acats/tests/c9/c94008c.ada: Likewise.
        * ada/acats/tests/c9/c951002.a: Likewise.
        * ada/acats/tests/c9/c954a01.a: Likewise.
        * ada/acats/tests/c9/c96001a.ada: Likewise.
        * ada/acats/tests/c9/c97307a.ada: Likewise.

From-SVN: r150579
2009-08-08 11:35:44 +00:00
Richard Sandiford
d686d89233 combine.c (gen_lowpart_or_truncate): Exclude CONST_INTs from mode check.
gcc/
	* combine.c (gen_lowpart_or_truncate): Exclude CONST_INTs from
	mode check.  Do truncations in an integer mode.
	(force_to_mode): Handle subregs for all mode types.  Only do
	arithmetic simplifications on integer modes.

From-SVN: r150578
2009-08-08 08:32:24 +00:00
GCC Administrator
1fc00cc90a Daily bump.
From-SVN: r150577
2009-08-08 00:16:56 +00:00
Richard Guenther
0adef8e940 re PR tree-optimization/40999 (ICE in extract_component, at tree-complex.c:625)
2009-08-07  Richard Guenther  <rguenther@suse.de>

	PR tree-optimization/40999
	* tree-ssa-ccp.c (get_symbol_constant_value): Handle CONST_DECLs.
	(maybe_fold_reference): Lookup constant initializers.
	(fold_gimple_assign): Likewise.

	* gfortran.dg/pr40999.f: New testcase.

From-SVN: r150572
2009-08-07 17:02:43 +00:00
Dodji Seketeli
7553122861 re PR c++/39987 (Rejects default argument that is a template via access failure)
2009-08-07  Dodji Seketeli  <dodji@redhat.com>

	PR c++/39987
	* gcc/testsuite/g++.dg/overload/defarg4.C: Oops, forgot to add
	the testcase.

From-SVN: r150568
2009-08-07 15:13:12 +02:00
Paolo Carlini
ac517fcbcc hash.cc (hash<string>::operator()(string), hash<wstring>::operator()(wstring)): Do not decorate as throwing nothing.
2009-08-07  Paolo Carlini  <paolo.carlini@oracle.com>

	* src/hash.cc (hash<string>::operator()(string),
	hash<wstring>::operator()(wstring)): Do not decorate as throwing
	nothing.
	* include/bits/functional_hash.h (hash<error_code>::
	operator()(error_code)): Likewise.

From-SVN: r150566
2009-08-07 10:13:44 +00:00
Javier Miranda
1c939d8175 exp_ch7.adb (Wrap_Transient_Expression): Add missing adjustment of SCIL node.
2009-08-07  Javier Miranda  <miranda@adacore.com>

	* exp_ch7.adb (Wrap_Transient_Expression): Add missing adjustment of
	SCIL node.

From-SVN: r150565
2009-08-07 11:58:18 +02:00
Arnaud Charlet
005ae22564 [multiple changes]
2009-08-07  Robert Dewar  <dewar@adacore.com>

	* sem_warn.adb (Warn_On_Unreferenced_Entity): Fix obvious typo.

2009-08-07  Vincent Celier  <celier@adacore.com>

	* gnatcmd.adb (GNATCmd): If -U is not used, one and only one main is
	specified on the command line and there are switches in the Compiler
	package of the project file, use these compilation switches to invoke
	the tool.

2009-08-07  Ben Brosgol  <brosgol@adacore.com>

	* gnat_ugn.texi: Wordsmithing edits at beginning of gnatcheck chapter.

2009-08-07  Ed Schonberg  <schonberg@adacore.com>

	* sem_ch10.adb (Analyze_Proper_Body): Indicate name of missing subunit
	even if not in main unit, to simplify debugging.

2009-08-07  Arnaud Charlet  <charlet@adacore.com>

	* gcc-interface/Makefile.in: Fix handling of GCC_FOR_TARGET.
	* gcc-interface/Make-lang.in: Update dependencies.

From-SVN: r150564
2009-08-07 11:55:42 +02:00
Arnaud Charlet
fb25a60d96 [multiple changes]
2009-08-07  Robert Dewar  <dewar@adacore.com>

	* types.ads: Minor reformatting
	* sem_ch12.ads (Check_Generic_Child_Unit): Add missing documentation.
	* frontend.adb, sem_warn.adb, sem_warn.ads: Fix spelling of
	Output_Non_Modified_In_Out_Warnings.
	* sem_ch13.adb: Remove ??? comment.

2009-08-07  Vincent Celier  <celier@adacore.com>

	* mlib-prj.adb (Build_Library): Include binder generate object file
	for SAL when library name is only one character.

From-SVN: r150563
2009-08-07 11:42:01 +02:00
Arnaud Charlet
0a69df7c0e [multiple changes]
2009-08-07  Thomas Quinot  <quinot@adacore.com>

	* targparm.adb: Minor reformatting
	* sem.adb: Minor reformatting
	* exp_ch4.adb (Expand_N_Conditional_Expression): Add comment.

2009-08-07  Emmanuel Briot  <briot@adacore.com>

	* prj-conf.adb: Remove duplicate directory separator in the output when
	an object directory does not exist.

2009-08-07  Robert Dewar  <dewar@adacore.com>

	* exp_util.adb: Minor reformatting

2009-08-07  Vincent Celier  <celier@adacore.com>

	* mlib-prj.adb (Build_Library): Fixed bug in name of ALI file (wrong
	length used).

2009-08-07  Ed Schonberg  <schonberg@adacore.com>

	* exp_ch9.adb (Expand_N_Protected_Type_Declaration): In Ravenscar mode,
	detect non-static private components that will violate restriction
	No_Implicit_Heap_Allocation.

2009-08-07  Ben Brosgol  <brosgol@adacore.com>

	* gnat_ugn.texi: Edited Rule Exemption section of gnatcheck chapter.

From-SVN: r150562
2009-08-07 11:29:01 +02:00
Jakub Jelinek
b84b6ee6d9 dwarf2out.c (output_fde): When doing hot/cold partitioning...
* dwarf2out.c (output_fde): When doing hot/cold partitioning, use
	fde->dw_fde_begin as begin label instead of hot/cold label.
	Use LLSDAC label instead of LLSDA for second section lsda.
	(dwarf2out_do_cfi_startproc): Add SECOND argument.  Use LLSDAC
	label instead of LLSDA if it is true.
	(dwarf2out_begin_prologue, dwarf2out_switch_text_section): Adjust
	callers.
	* except.c (add_call_site, dw2_size_of_call_site_table): Add
	SECTION argument.  Use it as index into crtl->eh.call_site_record
	array.
	(dw2_output_call_site_table): Likewise.  Add CS_FORMAT argument,
	use it to determine how to print table entries instead of using
	#ifdef HAVE_AS_LEB128.  For SECTION > 0 use hot resp. cold
	label instead of normal begin label as base.
	(sjlj_assign_call_site_values): Adjust add_call_site caller.
	(convert_to_eh_region_ranges): When doing hot/cold partitioning,
	ensure no EH range spans between sections and that landing pads
	are always in the corresponding section.
	(sjlj_size_of_call_site_table, sjlj_output_call_site_table): Adjust
	for crtl->eh.call_site_record being an array rather than scalar.
	(output_one_function_exception_table): New function, copied
	from output_function_exception_table.  Adjust
	dw2_size_of_call_site_table, dw2_output_call_site_table
	callers.  For SECOND section use *C suffixed labels.
	(output_function_exception_table): Call
	output_one_function_exception_table and, when doing hot/cold
	partitioning, also another time for the second section.
	* opts.c: Include except.h.
	(decode_options): Allow -freorder-blocks-and-partition with
	exceptions, unless SJLJ or TARGET_UNWIND_INFO.
	* Makefile.in (opts.o): Depend on $(EXCEPT_H).
	* function.h (struct rtl_eh): Change call_site_record from
	scalar into array of 2 elements.

	* g++.dg/tree-prof/partition1.C: New test.

From-SVN: r150560
2009-08-07 11:10:13 +02:00
Richard Guenther
60419cc891 tree-ssa.c (useless_type_conversion_p_1): Only for types that require structural equality defer to the langhook.
2009-08-07  Richard Guenther  <rguenther@suse.de>

	* tree-ssa.c (useless_type_conversion_p_1): Only for types
	that require structural equality defer to the langhook.

From-SVN: r150559
2009-08-07 08:54:53 +00:00