Commit Graph

103039 Commits

Author SHA1 Message Date
Jonathan Wakely 5c0f24d0db re PR c++/45645 (pr44972.C fails with error: ‘__assert_fail’ was not declared in this scope)
2010-09-21  Jonathan Wakely  <redi@gcc.gnu.org>
	    Jack Howarth  <howarth@bromo.med.uc.edu>

	PR c++/45645
	* g++.dg/torture/pr44972.C: Use portable assert().


Co-Authored-By: Jack Howarth <howarth@bromo.med.uc.edu>

From-SVN: r164479
2010-09-21 14:12:58 +00:00
Jack Howarth d80148b8d4 configure.ac: Set LIBMATHSPEC to -lm except on darwin.
2010-09-21  Jack Howarth <howarth@bromo.med.uc.edu>

	* libjava/configure.ac: Set LIBMATHSPEC to -lm except on darwin.
	* libjava/libgcj.spec.in: Use LIBMATHSPEC.
	* libjava/configure: Regenerate.

From-SVN: r164478
2010-09-21 14:01:43 +00:00
Bernd Schmidt c9cdcaa590 iterators.md (qhs_extenddi_op): New mode_attr.
* config/arm/iterators.md (qhs_extenddi_op): New mode_attr.
	(qhs_extenddi_cstr): Likewise.
	* config/arm/arm.md (zero_extend<mode>di2, extend<mode>di2): Use
	them for the source operand.

From-SVN: r164477
2010-09-21 13:11:03 +00:00
Uros Bizjak 903c31ee41 i386.c (ix86_split_ashl): Rename single_width variable to half_width.
* config/i386/i386.c (ix86_split_ashl): Rename single_width variable
	to half_width.  Use GET_MODE_BITSIZE to calculate mode size.
	(ix86_split_ashr): Ditto.
	(ix86_split_lshr): Ditto.

From-SVN: r164476
2010-09-21 13:42:06 +02:00
Richard Guenther ce2b1d68a3 re PR tree-optimization/45580 (Building WebKit fails with compiler catching SIGSEGV in gimple_fold_obj_type_ref_known_binfo())
2010-09-21  Richard Guenther  <rguenther@suse.de>

	PR tree-optimization/45580
	* tree-ssa-propagate.c (substitute_and_fold): Always replace
	regular uses.
	* gimple-fold.c (gimple_fold_obj_type_ref): For a BINFO without
	virtuals fold the call into a regular indirect one.

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

From-SVN: r164474
2010-09-21 09:52:00 +00:00
GCC Administrator 1c7f2bc8dd Daily bump.
From-SVN: r164472
2010-09-21 00:19:32 +00:00
Uros Bizjak b379f67789 gcc-dg.exp (clanup-stack-usage): Really remove .su files.
* lib/gcc-dg.exp (clanup-stack-usage): Really remove .su files.

From-SVN: r164466
2010-09-21 00:15:17 +02:00
Janus Weil 48dbbcd6e2 re PR fortran/45438 ([OOP] ICE with -fcheck=pointer)
2010-09-20  Janus Weil  <janus@gcc.gnu.org>

	PR fortran/45438
	* trans-expr.c (gfc_conv_procedure_call): Fix pointer checking for
	TBPs, PPCs and pointer/allocatable components.

2010-09-20  Janus Weil  <janus@gcc.gnu.org>

	PR fortran/45438
	* gfortran.dg/pointer_check_7.f90: New.

From-SVN: r164462
2010-09-20 23:42:54 +02:00
Eric Botcazou ad78b8a688 re PR rtl-optimization/42775 (GCC fails to rebuild itself with STAGE1_CFLAGS=-O1)
PR rtl-optimization/42775
	* cfgrtl.c (rest_of_pass_free_cfg): Recompute notes if delay slot
	scheduling is enabled.

From-SVN: r164458
2010-09-20 21:29:48 +00:00
Jakub Jelinek 220c5f0c7f re PR rtl-optimization/45728 (ICE: in gen_lowpart_general, at rtlhooks.c:59 at -O1 when comparing union members)
PR rtl-optimization/45728
	* expr.c (expand_expr_real_1): If op0 isn't REG or MEM, try
	gen_lowpart_common first and if that fails, force_reg first
	before calling gen_lowpart.

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

From-SVN: r164456
2010-09-20 22:41:08 +02:00
Jakub Jelinek 0a7a6af67e re PR rtl-optimization/45678 (crash on vector code with -m32 -msse)
PR middle-end/45678
	* cfgexpand.c (expand_one_stack_var_at): Use
	crtl->max_used_stack_slot_alignment as max_align, instead
	of maximum of that and PREFERRED_STACK_BOUNDARY.
	Don't call update_stack_alignment.

From-SVN: r164454
2010-09-20 22:37:10 +02:00
Eric Botcazou 523e82a7a3 langhooks.h (struct lang_hooks_for_types): Remove hash_types field.
* langhooks.h (struct lang_hooks_for_types): Remove hash_types field.
	* langhooks-def.h (LANG_HOOKS_HASH_TYPES): Delete.
	(LANG_HOOKS_FOR_TYPES_INITIALIZER): Remove LANG_HOOKS_HASH_TYPES.
	* system.h (LANG_HOOKS_HASH_TYPES): Poison.
	* tree.c (type_hash_canon): Do not test lang_hooks.types.hash_types.
	(build_nonstandard_integer_type): Likewise.
	(build_range_type_1): New function, built from...
	(build_range_type): ...this.  Call build_range_type_1.
	(build_nonshared_range_type): New function.
	(build_array_type_1): New function, built from...
	(build_array_type: ...this.  Call build_array_type_1.
	(build_nonshared_array_type): New function.
	* tree.h (build_nonshared_range_type): Declare.
	(build_nonshared_array_type): Likewise.
ada/
	* gcc-interface/decl.c (gnat_to_gnu_entity): Replace calls to
	build_array_type with calls to build_nonshared_array_type.
	(substitute_in_type): Likewise.
	* gcc-interface/misc.c (LANG_HOOKS_HASH_TYPES): Delete.
	(LANG_HOOKS_TYPE_HASH_EQ): Define.
	(gnat_post_options): Add 'static' keyword.
	(gnat_type_hash_eq): New static function.
	* gcc-interface/utils.c (fntype_same_flags_p): New function.
	(create_subprog_type): Call it.
	(create_index_type): Call build_nonshared_range_type and tidy up.
	(create_range_type): Likewise.
	* gcc-interface/gigi.h (fntype_same_flags_p): Declare.

From-SVN: r164452
2010-09-20 20:11:35 +00:00
Ralf Wildenhues 8d03ad011a re PR libstdc++/45711 (Building with "--enable-libstdcxx-debug" fails during install)
Fix PR libstdc++/45711.

libstdc++-v3/:
	PR libstdc++/45711
	* src/Makefile.am (stamp-debug): Also adjust possibly-relative
	file names in MKDIR_P, and, for consistency, also top_build_prefix.
	* src/Makefile.in: Regenerate.

From-SVN: r164451
2010-09-20 19:33:12 +00:00
Anatoly Sokolov d163e655d5 arm.h (CLASS_LIKELY_SPILLED_P): Remove.
* config/arm/arm.h (CLASS_LIKELY_SPILLED_P): Remove.
	* config/arm/arm.c (TARGET_CLASS_LIKELY_SPILLED_P): Define.
	(arm_class_likely_spilled_p): New function.

From-SVN: r164450
2010-09-20 23:30:31 +04:00
Uros Bizjak 382eb33c14 i386.c (ix86_expand_ashl_const): Rewrite using indirect functions.
* config/i386/i386.c (ix86_expand_ashl_const): Rewrite using
	indirect functions.
	(ix86_split_ashl): Ditto.
	(ix86_split_ashr): Ditto.
	(ix86_split_lshr): Ditto.
	(ix86_adjust_counter): Ditto.

From-SVN: r164449
2010-09-20 21:04:02 +02:00
Paul Thomas 15c2ef5ad3 re PR fortran/45081 (ICE in gfc_conv_array_initializer, at fortran/trans-array.c:4208)
2010-09-20  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/45081
	* simplify.c (is_constant_array_expr): Allow structure array
	elements as well as constants.
	(gfc_simplify_pack, gfc_simplify_reshape, gfc_simplify_spread,
	gfc_simplify_transpose, gfc_simplify_unpack): Copy the derived
	type of source to the result.

2010-09-20  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/45081
	* gfortran.dg/derived_array_intrinsics_1.f90 : New test.

From-SVN: r164448
2010-09-20 18:55:12 +00:00
Nicola Pero abc88a0827 In gcc/:
* c-family/c-common.h (constant_string_class): Documented with
       comment identical to the one in c-common.c.

From-SVN: r164447
2010-09-20 18:32:08 +00:00
H.J. Lu c2310fc4e1 Add "\\".
2010-09-20  H.J. Lu  <hongjiu.lu@intel.com>

	* g++.dg/tree-ssa/pr45605.C: Add "\\".

From-SVN: r164446
2010-09-20 11:03:28 -07:00
Jakub Jelinek 9bedc09b13 dwarf2out.c (any_cfis_emitted): New static variable.
* dwarf2out.c (any_cfis_emitted): New static variable.
	(add_fde_cfi): Set it.
	(dwarf2out_frame_debug): Clear it before processing,
	if it is set afterwards, flush any queued reg saves.

From-SVN: r164443
2010-09-20 18:49:58 +02:00
Jakub Jelinek fbbe0995b8 re PR debug/45124 (No DW_AT_accessibility for public DIEs in DW_TAG_class_type)
PR debug/45124
	* dwarf2out.c (add_accessibility_attribute): Assume
	DW_ACCESS_private as the default for dwarf_version > 2
	and DW_TAG_class_type parent.
	(gen_inheritance_die): Assume DW_ACCESS_public as the default
	for dwarf_version > 2 and parent other than DW_TAG_class_type.

From-SVN: r164442
2010-09-20 18:48:29 +02:00
Rafael Carre cce470f93d re PR target/45726 (Thumb2 instruction emitted for incompatible CPU)
2010-09-20  Rafael Carre   <rafael.carre@gmail.com>

	PR target/45726
	* arm.md (arm_movt): Only enable on machines with MOVT.

From-SVN: r164441
2010-09-20 16:21:57 +00:00
Jie Zhang 47d8f18da2 arm.c (arm_address_offset_is_imm): New.
* config/arm/arm.c (arm_address_offset_is_imm): New.
	(arm_early_store_addr_dep): New.
	(arm_early_load_addr_dep): New.
	* config/arm/arm-protos.h (arm_early_store_addr_dep): Declare.
	(arm_early_load_addr_dep): Declare.
	(arm_address_offset_is_imm): Declare.
	* config/arm/cortex-m4.md: New file.
	* config/arm/cortex-m4-fpu.md: New file.
	* config/arm/arm.md: Include cortex-m4.md and cortex-m4-fpu.md.
	(attr generic_sched): Exclude cortexm4.
	(attr generic_vfp): Exclude cortexm4.

From-SVN: r164440
2010-09-20 16:00:29 +00:00
Richard Guenther 06baaba377 re PR tree-optimization/45704 (load byte instruction is used for volatile int)
2010-09-20  Richard Guenther  <rguenther@suse.de>

	PR middle-end/45704
	* gimplify.c (gimplify_modify_expr_rhs): Preserve volatileness.

	* gcc.dg/torture/pr45704.c: New testcase.

From-SVN: r164439
2010-09-20 15:54:03 +00:00
Jan Hubicka 64e0f5ff1f re PR tree-optimization/45605 (Missed devirtualization)
PR tree-optimize/45605
	* cgraph.h (const_value_known_p): Declare.
	(varpool_decide_const_value_known): Remove.
	* tree-ssa-ccp.c (get_base_constructor): Use it.
	* lto-cgraph.c (compute_ltrans_boundary): Likewise.
	* expr.c (string_constant): Likewise.
	* tree-ssa-loop-ivcanon.c (constant_after_peeling): Likewise.
	* ipa.c (ipa_discover_readonly_nonaddressable_var,
	function_and_variable_visibility): Likewise.
	* gimplify.c (gimplify_call_expr): Likewise.
	* gimple-fold.c (get_symbol_constant_value): Likewise.
	* varpool.c (varpool_decide_const_value_known): Replace by...
	(const_value_known_p): ... this one; handle other kinds of DECLs
	too and work for automatic vars.
	(varpool_finalize_decl): Use const_value_known_p.

	* lto.c (lto_promote_cross_file_statics): Use const_value_known_p.

	* g++.dg/tree-ssa/pr45605.C: New testcase.

From-SVN: r164438
2010-09-20 15:48:42 +00:00
Rafael Carre 4ce9b2b20f re PR target/45726 (Thumb2 instruction emitted for incompatible CPU)
2010-09-20  Rafael Carre   <rafael.carre@gmail.com>

	PR target/45726
	* arm.md (arm_movtas_ze): Only enable on machine with MOVT.

From-SVN: r164436
2010-09-20 15:25:44 +00:00
Michael Matz ef98b8a5d5 re PR testsuite/45706 (gcc.dg/vect/vect-114.c)
PR testsuite/45706
	* gcc.dg/vect/pr43432.c: Don't override dg-options, defaults are
	enough.

From-SVN: r164435
2010-09-20 14:45:30 +00:00
Richard Guenther 565b88862d re PR middle-end/45705 (Useless store not optimized away)
2010-09-20  Richard Guenther  <rguenther@suse.de>

	PR tree-optimization/45705
	* tree-ssa-dom.c (optimize_stmt): Perform redundant store elimination.

	* gcc.dg/tree-ssa/ssa-dom-dse-1.c: New testcase.

From-SVN: r164434
2010-09-20 14:40:10 +00:00
Michael Matz 5e979df369 re PR testsuite/45706 (gcc.dg/vect/vect-114.c)
PR testsuite/45706
	* lib/target-supports.exp (check_effective_target_vect_perm):
	Add i?86-*-*.

From-SVN: r164433
2010-09-20 14:12:04 +00:00
Jakub Jelinek 2960be837a re PR rtl-optimization/45695 (-O1 wrong-code by cmove)
PR rtl-optimization/45695
	* combine.c (try_combine): When splitting a two set pattern,
	make sure the pattern which will be put into i2 doesn't use REGs
	or MEMs set by insns in between i2 and i3.

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

From-SVN: r164431
2010-09-20 15:24:23 +02:00
GCC Administrator 4ee472e528 Daily bump.
From-SVN: r164429
2010-09-20 00:17:26 +00:00
Jan Hubicka d1f6261f39 re PR lto/44246 (ICE with -fwhopr/-flto when using strlen and strcat without previous declaration)
PR lto/44246
	* lto-cgraph.c (input_cgraph_1, input_varpool_1): Avoid
	processing same node twice.
	* gcc.c-torture/compile/pr44246.c:New file.

From-SVN: r164425
2010-09-19 21:49:28 +00:00
Eric Botcazou a963da4d48 trans.c (gnat_pushdecl): Do not do anything special for PARM_DECLs.
* gcc-interface/trans.c (gnat_pushdecl): Do not do anything special
	for PARM_DECLs.
	(end_subprog_body): If the body is a BIND_EXPR, make its associated
	block the top-level one.
	(build_function_stub): Build a statement group for the whole function.
	* gcc-interface/utils.c (Subprogram_Body_to_gnu): If copy-in/copy-out
	is used, create the enclosing block early and process first the OUT
	parameters.

From-SVN: r164422
2010-09-19 14:55:28 +00:00
Anatoly Sokolov 0b1821788c bfin.h (CLASS_LIKELY_SPILLED_P): Remove.
* config/bfin/bfin.h (CLASS_LIKELY_SPILLED_P): Remove.
	* config/bfin/bfin.c (TARGET_CLASS_LIKELY_SPILLED_P): Define.
	(bfin_class_likely_spilled_p): New function

From-SVN: r164421
2010-09-19 18:53:05 +04:00
Ira Rosen 039d9ea184 re PR tree-optimization/45714 (Vectorization of double pow function causes a segmentation fault)
PR tree-optimization/45714
	* tree-vect-stmts.c (vect_transform_stmt): Use a dummy statement 
	created in vectorizable_call instead of the original statement in 
	def stmt updates.

From-SVN: r164420
2010-09-19 14:23:40 +00:00
Eric Botcazou 66de86b074 decl.c (gnat_to_gnu_entity): Do not generate debug info for individual enumerators.
* gcc-interface/decl.c (gnat_to_gnu_entity) <E_Enumeration_Type>: Do
	not generate debug info for individual enumerators.

From-SVN: r164418
2010-09-19 14:03:39 +00:00
Eric Botcazou 12e8621893 decl.c (gnat_to_gnu_entity): Use record type instead of enumeral type as the dummy type built for the...
* gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Use record
	type instead of enumeral type as the dummy type built for the template
	type of fat pointers.

From-SVN: r164417
2010-09-19 13:55:36 +00:00
Eric Botcazou 2231f17fa0 gigi.h (get_elaboration_procedure): Declare.
* gcc-interface/gigi.h (get_elaboration_procedure): Declare.
	(gnat_zaplevel): Likewise.
	* gcc-interface/decl.c (gnat_to_gnu_entity): Do not force global
	binding level for an external constant.
	<E_Constant>: Force the local context and create a fake scope before
	translating the defining expression of an external constant.
	<object>: Treat external constants at the global level explicitly for
	renaming declarations.
	(elaborate_expression_1): Force the variable to be static if the
	expression is global.
	* gcc-interface/trans.c (get_elaboration_procedure): New function.
	(call_to_gnu): Use it.
	(gnat_to_gnu): Likewise.
	<N_Object_Declaration>: Do not test Is_Public to force the creation of
	an initialization variable.
	(add_decl_expr): Discard the statement if the declaration is external.
	* gcc-interface/utils.c (gnat_pushdecl): Do not put the declaration in
	the current block if it is external.
	(create_var_decl_1): Do not test Is_Public to set TREE_STATIC.
	(gnat_zaplevel): New global function.

From-SVN: r164416
2010-09-19 13:48:51 +00:00
Eric Botcazou a10623fb71 decl.c (gnat_to_gnu_entity): Explicitly test _LEVEL variables against zero in all cases.
* gcc-interface/decl.c (gnat_to_gnu_entity): Explicitly test _LEVEL
	variables against zero in all cases.
	(rest_of_type_decl_compilation): Likewise.
	* gcc-interface/trans.c (gigi): Pass properly typed constants to
	create_var_decl.
	(call_to_gnu): Fix formatting.
	(Handled_Sequence_Of_Statements_to_gnu): Likewise.
	(Exception_Handler_to_gnu_zcx): Likewise.
	(gnat_to_gnu) <N_Object_Declaration>: Short-circuit handling of
	constant
	expressions in presence of a freeze node.

From-SVN: r164415
2010-09-19 13:18:26 +00:00
Eric Botcazou 50a6af053a decl.c (gnat_to_gnu_entity): Look into expressions for external constants that are aggregates.
* gcc-interface/decl.c (gnat_to_gnu_entity) <E_Constant>: Look into
	expressions for external constants that are aggregates.
	* gcc-interface/utils2.c (build_simple_component_ref): If the field
	is an inherited component in an extension, look through the extension.

From-SVN: r164414
2010-09-19 13:12:13 +00:00
Uros Bizjak b146446c53 i386-protos.h (split_double_mode): New prototype.
* config/i386/i386-protos.h (split_double_mode): New prototype.
	(split_di, split_ti): Remove prototypes.
	* config/i386/i386.c (split_double_mode): New function.
	(split_di, split_ti): Remove.
	(ix86_expand_branch): Use split_double_mode.
	(ix86_split_to_parts): Ditto.
	(ix86_split_ashl): Ditto.
	(ix86_split_ashr): Ditto.
	(ix86_split_lshr): Ditto.
	(ix86_force_to_memory): Ditto.
	* config/i386/i386.md: Use split_double_mode in double-mode splitters.

From-SVN: r164413
2010-09-19 14:42:32 +02:00
Ralf Wildenhues 6e687a9ad7 Uglify C++ headers some more.
libstdc++-v3/:
	* include/ext/throw_allocator.h
	(hash<__gnu_cxx::throw_value_limit>::operator()): Uglify local.
	(hash<__gnu_cxx::throw_value_random>::operator()): Likewise.
	* include/parallel/set_operations.h (__symmetric_difference_func):
	Uglify remaining arguments to __count, __first_empty, _M_invoke.
	(__difference_func): Likewise for __count.
	* include/profile/impl/profiler_node.h
	(__object_info_base::__write): Uglify parameter.

From-SVN: r164411
2010-09-19 09:44:24 +00:00
Paolo Carlini 61e60481d0 hash_bytes.cc: Compile load_bytes and shift_mix only when __SIZEOF_SIZE_T__ == 8.
2010-09-19  Paolo Carlini  <paolo.carlini@oracle.com>

	* src/hash_bytes.cc: Compile load_bytes and shift_mix only when
	__SIZEOF_SIZE_T__ == 8.

From-SVN: r164410
2010-09-19 08:52:50 +00:00
GCC Administrator 1f77459495 Daily bump.
From-SVN: r164409
2010-09-19 00:17:20 +00:00
Jan Hubicka 9b389a5e64 re PR tree-optimization/45453 (ICE: verify_cgraph_node failed: inlined_to pointer set for noninline callers with -O2 -fno-early-inlining)
PR tree-optimization/45453
	* cgraphunit.c (cgraph_finalize_function): Consider comdat & external
	virtual functions are reachable.
	* ipa-inline.c (cgraph_clone_inlined_nodes): Likewise.
	* ipa.c (cgraph_remove_unreachable_nodes): Likewise.
	* ipa-prop.c (ipa_modify_formal_parameters): Clear DECL_VIRTUAL_P
	when modifying function.

	* g++.dg/tree-ssa/pr45453.C: New testcase.

From-SVN: r164405
2010-09-18 23:13:17 +00:00
Thomas Koenig 1151446c17 frontend-passes.c (gfc_expr_walker): Also handle EXPR_SUBSTRING.
2010-09-19  Thomas Koenig  <tkoenig@gcc.gnu.org>

	* frontend-passes.c (gfc_expr_walker):  Also
	handle EXPR_SUBSTRING.

From-SVN: r164404
2010-09-18 22:45:13 +00:00
Thomas Koenig 46f19baf76 frontend-passes.c (gfc_expr_walker): Handle constructors and references.
2010-09-17  Thomas Koenig  <tkoenig@gcc.gnu.org>

	* frontend-passes.c (gfc_expr_walker):  Handle
	constructors and references.

From-SVN: r164403
2010-09-18 22:22:38 +00:00
Jan Hubicka 1389294cc3 re PR tree-optimization/45605 (Missed devirtualization)
PR tree-optimization/45605
	* cgraphunit.c (cgraph_analyze_functions): Allocate bitmap obstack.
	* gimple-fold.c (static_object_in_other_unit_p): New function.
	(canonicalize_constructor_val): Use it.
	(get_symbol_constant_value): Be reaqdy for canonicalize_constructor_val
	returning NULL.
	(gimple_fold_obj_type_ref_known_binfo): Use static_object_in_other_unit_p.

From-SVN: r164402
2010-09-18 21:25:29 +00:00
Jason Merrill 6eb208a69c call.c (compare_ics): Do lvalue/rvalue reference binding comparison for ck_list, too.
* call.c (compare_ics): Do lvalue/rvalue reference binding
	comparison for ck_list, too.

From-SVN: r164401
2010-09-18 17:22:10 -04:00
Richard Guenther 6a78fd06c5 re PR tree-optimization/45709 (internal compiler error: in add_phi_arg, at tree-phinodes.c:395)
2010-09-18  Richard Guenther  <rguenther@suse.de>

	PR tree-optimization/45709
	* tree-inline.c (copy_phis_for_bb): Delay commit of edge
	insertions until after all PHI nodes of the block are processed.

	* g++.dg/torture/pr45709-2.C: New testcase.

From-SVN: r164397
2010-09-18 17:13:04 +00:00
Tijl Coosemans f52a39cde6 * config/i386/freebsd.h (SUBTARGET32_DEFAULT_CPU): Add.
From-SVN: r164396
2010-09-18 17:05:26 +00:00