Commit Graph

94465 Commits

Author SHA1 Message Date
Joseph Myers
aded0ed0dd *
testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stod.cc,
	testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stof.cc,
	testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stoi.cc,
	testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stol.cc,
	testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stold.cc,
	testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stoll.cc,
	testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stoul.cc,
	testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stoull.cc,
	testsuite/21_strings/basic_string/numeric_conversions/wchar_t/to_wstring.cc,
	testsuite/ext/vstring/element_access/char/front_back.cc,
	testsuite/ext/vstring/element_access/wchar_t/front_back.cc,
	testsuite/ext/vstring/init-list.cc,
	testsuite/ext/vstring/moveable.cc,
	testsuite/ext/vstring/requirements/citerators.cc,
	testsuite/ext/vstring/requirements/explicit_instantiation/char16_t/1.cc,
	testsuite/ext/vstring/requirements/explicit_instantiation/char32_t/1.cc:
	Use dg-require-string-conversions.

From-SVN: r149260
2009-07-05 18:59:29 +01:00
Jason Merrill
eb5c3f052a pt.c (retrieve_specialization): Don't get confused by a using-declaration that brings in another instance of...
* pt.c (retrieve_specialization): Don't get confused by a
	using-declaration that brings in another instance of this template
	from a base class.

	* ptree.c (cxx_print_type): Fix logic.

From-SVN: r149247
2009-07-04 22:09:15 -04:00
GCC Administrator
bf15d4697d Daily bump.
From-SVN: r149246
2009-07-05 00:16:40 +00:00
Ian Lance Taylor
34097e36ee re PR target/40636 (Build failed with --enable-build-with-cxx (mingw32 target))
PR target/40636
	* config/i386/msformat-c.c (mingw_format_attributes): Declare as
	EXPORTED_CONST.
	(mingw_format_attribute_overrides): Likewise.

From-SVN: r149243
2009-07-04 22:52:57 +00:00
Francois-Xavier Coudert
94ab808c5d inclhack.def (darwin_stdint_5, [...]): New fixes.
* inclhack.def (darwin_stdint_5, darwin_stdint_6,
	darwin_stdint_7): New fixes.
	* fixincl.x: Regenerate.
	* tests/base/stdint.h: Adjust test for new fixes.

From-SVN: r149242
2009-07-04 21:31:17 +00:00
Eric Botcazou
2777805892 Fix nits
From-SVN: r149241
2009-07-04 20:22:39 +00:00
Jason Merrill
8885e914f3 * cp-tree.h (LANG_DECL_FN_CHECK): Fix non-checking version.
From-SVN: r149239
2009-07-04 13:48:02 -04:00
Francois-Xavier Coudert
d5b7dccd05 re PR ada/40608 (Ada build fails)
PR ada/40608
	* init.c (APPLE): Include <mach/mach_init.h>.
	(__gnat_is_stack_guard, APPLE): Add ATTRIBUTE_UNUSED marker.

From-SVN: r149238
2009-07-04 17:28:32 +00:00
Jakub Jelinek
258bd5dcfd trans-intrinsic.c (gfc_conv_intrinsic_minmaxloc): For integer maxloc initialize limit to -huge-1 rather than just -huge.
* trans-intrinsic.c (gfc_conv_intrinsic_minmaxloc): For integer
	maxloc initialize limit to -huge-1 rather than just -huge.

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

From-SVN: r149236
2009-07-04 19:20:46 +02:00
Jakub Jelinek
bd5b2c2d07 re PR debug/40596 (Bad debug info for local variables on i386.)
PR debug/40596
	* dwarf2out.c (based_loc_descr): For crtl->stack_realign_tried
	don't check cfa.reg.  Instead of cfa.indirect use
	fde && fde->drap_reg != INVALID_REGNUM test.

From-SVN: r149235
2009-07-04 19:19:26 +02:00
Eric Botcazou
39ba6ab7fb * postreload.c (reload_combine): Replace CONST_REG with INDEX_REG.
From-SVN: r149234
2009-07-04 17:04:03 +00:00
Vladimir Makarov
93a8ba618d Move testsuite log into testsuite/ChangeLog
From-SVN: r149228
2009-07-04 13:57:11 +00:00
Janus Weil
a7c0b11d97 re PR fortran/40593 (Proc-pointer returning function as actual argument)
2009-07-04  Janus Weil  <janus@gcc.gnu.org>

	PR fortran/40593
	* interface.c (compare_actual_formal): Take care of proc-pointer-valued
	functions as actual arguments.
	* trans-expr.c (gfc_conv_procedure_call): Ditto.
	* resolve.c (resolve_specific_f0): Use the correct ts.


2009-07-04  Janus Weil  <janus@gcc.gnu.org>

	PR fortran/40593
	* gfortran.dg/proc_ptr_result_6.f90: New.

From-SVN: r149227
2009-07-04 14:28:43 +02:00
Francois-Xavier Coudert
8d74e57440 * gcc.dg/framework-2.c: Adjust testcase to pass.
From-SVN: r149226
2009-07-04 11:33:17 +00:00
Eric Botcazou
9ce8e057b1 ada-tree.h (SET_TYPE_LANG_SPECIFIC): Rewrite.
* ada-tree.h (SET_TYPE_LANG_SPECIFIC): Rewrite.
	(SET_DECL_LANG_SPECIFIC): Likewise.
	(TYPE_RM_VALUE): New macro.
	(SET_TYPE_RM_VALUE): Likewise.
	(TYPE_RM_SIZE): Rewrite in terms of TYPE_RM_VALUE.
	(TYPE_RM_MIN_VALUE): Likewise.
	(TYPE_RM_MAX_VALUE): Likewise.
	(SET_TYPE_RM_SIZE): Rewrite in terms of SET_TYPE_RM_VALUE.
	(SET_TYPE_RM_MIN_VALUE): Likewise.
	(SET_TYPE_RM_MAX_VALUE): Likewise.
	* decl.c (gnat_to_gnu_entity) <E_Array_Subtype>: Remove kludge.

From-SVN: r149225
2009-07-04 10:51:31 +00:00
Laurent GUERBY
d8bf0ab838 re PR ada/40631 (bootstrap with Ada fails on __gnat_backtrace warning on mips-linux)
2009-07-04  Laurent GUERBY  <laurent@guerby.net>

	PR ada/40631
	* tracebak.c (__gnat_backtrace): Fix old-style definition.

From-SVN: r149224
2009-07-04 10:11:57 +00:00
Jason Merrill
ad909c97e2 re PR c++/40619 ([c++0x] ICE on repeated decltype expression in auto functions)
PR c++/40619
	* cp-tree.h (struct lang_decl_parm): New.
	(struct lang_decl): Add it.
	(LANG_DECL_PARM_CHECK): New.
	(DECL_PARM_INDEX): New.
	* decl2.c (parm_index): Remove.
	* lex.c (retrofit_lang_decl): Handle parms.
	(cxx_dup_lang_specific_decl): Likewise.
	* mangle.c (write_expression): Adjust.
	* tree.c (cp_tree_equal): Adjust.
	(decl_linkage): Only check DECL_COMDAT for functions and variables.
	* parser.c (cp_parser_parameter_declaration_list): Set
	DECL_PARM_INDEX.
	* pt.c (iterative_hash_template_arg): Hash it.

From-SVN: r149223
2009-07-04 00:34:03 -04:00
Jerry DeLisle
caf271d802 re PR fortran/40638 (RTE: "Unit number in I/O statement too large" -- fails with any low value)
2009-07-03  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	PR fortran/40638
	* gfortran.dg/unit_1.f90: New test.

From-SVN: r149222
2009-07-04 04:25:20 +00:00
Jason Merrill
b97e8a149d cp-tree.h (struct lang_decl): Overhaul.
* cp-tree.h (struct lang_decl): Overhaul.
	(struct lang_decl_flags): Remove.
	(struct lang_decl_base): New.
	(struct lang_decl_min): New.
	(struct lang_decl_fn): New.
	(struct lang_decl_ns): New.
	(CAN_HAVE_FULL_LANG_DECL_P): Replace with LANG_DECL_HAS_MIN.
	(LANG_DECL_MIN_CHECK): New.
	(LANG_DECL_FN_CHECK): New.
	(LANG_DECL_NS_CHECK): New.
	(STRIP_TEMPLATE): New.
	(NON_THUNK_FUNCTION_CHECK): Remove.
	(DECL_DECLARES_FUNCTION_P): New.
	(lots): Adjust.
	* lex.c (retrofit_lang_decl, cxx_dup_lang_specific_decl): Adjust.
	* decl.c (push_local_name, duplicate_decls): Adjust.
	* decl2.c (start_objects): Don't set u2sel.
	* semantics.c (finish_omp_threadprivate): Adjust.
	* class.c (build_clone): Don't do much on TEMPLATE_DECLs.
	(decl_cloned_function_p): Out-of-line implementation of macros.
	(clone_function_decl, adjust_clone_args): Use DECL_CLONED_FUNCTION_P.
	* mangle.c (write_unqualified_name): Don't check function flags
	on non-functions.
	* method.c (make_alias_for): Don't set DECL_CLONED_FUNCTION.
	* pt.c (build_template_decl): Don't set function flags.
	(check_default_tmpl_args): Check that it's a function.
	(instantiate_template): Use DECL_ABSTRACT_ORIGIN to find the
	cloned template.

	* pt.c (tsubst_decl) [FUNCTION_DECL]: Don't tsubst
	DECL_CLONED_FUNCTION.

	* cp-tree.h (struct lang_type_class): Move sorted_fields here.
	* class.c (finish_struct_1): Adjust.
	* ptree.c (cxx_print_decl, cxx_print_type): Adjust.
	* search.c (lookup_field_1): Adjust.

	* cp-tree.h (CLASSTYPE_INLINE_FRIENDS): Remove.
	* decl.c (finish_method): Don't add to it.
	* class.c (fixup_pending_inline): Remove.
	(fixup_inline_methods): Remove.
	(finish_struct_1): Don't call it.

	* error.c (dump_function_name): Handle null name.

From-SVN: r149217
2009-07-03 20:43:26 -04:00
GCC Administrator
07302a1bb6 Daily bump.
From-SVN: r149216
2009-07-04 00:16:32 +00:00
Vladimir Makarov
54a0ac2da2 re PR target/40587 (Revision 139590 caused ICE in emit_swap_insn at reg-stack.c:827)
2009-07-03  Vladimir Makarov  <vmakarov@redhat.com>

	PR target/40587
	* ira.c (build_insn_chain): Use DF_LR_OUT instead of
	df_get_live_out.
	* testsuite/gfortran.dg/pr40587.f: New test.

From-SVN: r149212
2009-07-03 22:36:31 +00:00
Richard Guenther
fae1034ef4 re PR tree-optimization/40640 (ICE in set_value_range, at tree-vrp.c:383)
2009-07-03  Richard Guenther  <rguenther@suse.de>

	PR tree-optimization/40640
	* tree-switch-conversion.c (build_arrays): Perform arithmetic
	in original type.

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

From-SVN: r149211
2009-07-03 22:09:12 +00:00
Jan Hubicka
ba8978d0f0 ipa-inline.c (cgraph_decide_inlining_incrementally): When optimizing for size, reduce amount of inlining.
* ipa-inline.c (cgraph_decide_inlining_incrementally): When optimizing
	for size, reduce amount of inlining.

From-SVN: r149210
2009-07-03 20:28:14 +00:00
Eric Botcazou
d4289bdd6d inclhack.def (solaris_int_types): New fix.
* inclhack.def (solaris_int_types): New fix.
	* fixincl.x: Regenerate.
	* tests/base/sys/int_types.h: New file.

From-SVN: r149209
2009-07-03 20:27:05 +00:00
Richard Guenther
d73fb533dc re PR middle-end/34163 (10% performance regression since Nov 1 on Polyhedron's "NF" on AMD64)
2009-07-03  Richard Guenther  <rguenther@suse.de>

	PR middle-end/34163
	* tree-chrec.c (chrec_convert_1): Fold (T2)(t +- x) to
	(T2)t +- (T2)x if t +- x is known to not overflow and
	the conversion widens the operation.
	* Makefile.in (tree-chrec.o): Add $(FLAGS_H) dependency.

	* gfortran.dg/pr34163.f90: New testcase.

From-SVN: r149207
2009-07-03 14:11:14 +00:00
Jan Hubicka
7351bcaa64 loop-24.c: Update dump file matching; enable -O2.
* gcc.dg/tree-ssa/loop-24.c: Update dump file matching; enable -O2.
	* gcc.dg/tree-ssa/loop-25.c: Likewise.
	* gcc.dg/tree-ssa/loop-26.c: Likewise.
	* gcc.dg/tree-ssa/pr32044.c: Likewise.
	* gcc.dg/tree-ssa/loop-29.c: Likewise.
	* gcc.dg/tree-ssa/loop-10.c: Likewise.
	* gnat.dg/loop_optimization6.adb: Enable -O2.

	* ipa-pure-const.c (analyze): Update loop optimizer init.
	* tree-ssa-loop-iv-canon.c (empty_loop_p, remove_empty_loop,
	try_remove_empty_loop, remove_empty_loops): Remove.
	* tree-ssa-loop.c (tree_ssa_empty_loop, pass_empty_loop): Remove.
	* tree-ssa-dce.c (find_obviously_necessary_stmts): Use finiteness info
	to mark regular loops as neccesary.
	(degenerate_phi_p): New function.
	(propagate_necessity, remove_dead_phis): Use it.
	(forward_edge_to_pdom): Likewise.
	(eliminate_unnecessary_stmts): Take care to remove uses of results of
	virtual PHI nodes that became unreachable.
	(perform_tree_ssa_dce): Initialize/deinitialize loop optimizer.
	* tree-flow.h (remove_empty_loops): Remove.
	* passes.c (init_optimization_passes): Remove.

From-SVN: r149206
2009-07-03 13:18:28 +00:00
Uros Bizjak
5071eab79a i386.md (fix_trunc<mode>_fisttp_i387_1): Use can_create_pseudo_p.
* config/i386/i386.md (fix_trunc<mode>_fisttp_i387_1): Use
	can_create_pseudo_p.
	(*fix_trunc<mode>_i387_1): Ditto.
	(*floathi<mode>2_1): Ditto.
	(*float<SSEMODEI24:mode><X87MODEF:mode>2_1): Ditto.
	(*fistdi2_1): Ditto.
	(*fist<mode>2_1): Ditto.
	(frndintxf2_floor): Ditto.
	(*fist<mode>2_floor_1): Ditto.
	(frndintxf2_ceil): Ditto.
	(*fist<mode>2_ceil_1): Ditto.
	(frndintxf2_trunc): Ditto.
	(frndintxf2_mask_pm): Ditto.
	(fxam<mode>2_i387_with_temp): Ditto.
	* config/i386/sse.md (mulv16qi3): Ditto.
	(*sse2_mulv4si3): Ditto.
	(mulv2di3): Ditto.
	(sse4_2_pcmpestr): Ditto.
	(sse4_2_pcmpistr): Ditto.

From-SVN: r149205
2009-07-03 13:30:51 +02:00
GCC Administrator
f0e410bca1 Daily bump.
From-SVN: r149204
2009-07-03 00:16:38 +00:00
Jan Hubicka
1fc41282ec tree-ssa-dce.c (bb_contains_live_stmts): New bitmap.
* tree-ssa-dce.c (bb_contains_live_stmts): New bitmap.
	(mark_stmt_necessary): Set it.
	(mark_operand_necessary): Set it.
	(mark_control_dependent_edges_necessary): Set it.
	(mark_virtual_phi_result_for_renaming): New function.
	(get_live_post_dom): New function.
	(forward_edge_to_pdom): New function.
	(remove_dead_stmt): Fix handling of control dependences.
	(tree_dce_init): Init new bitmap.
	(tree_dce_done): Free it.

From-SVN: r149199
2009-07-02 22:56:21 +00:00
Richard Sandiford
bc21bfa5e3 libgomp.exp (libgomp_init): Use the ALWAYS_CFLAGS options when choosing a multilib.
libgomp/
	* testsuite/lib/libgomp.exp (libgomp_init): Use the ALWAYS_CFLAGS
	options when choosing a multilib.

From-SVN: r149195
2009-07-02 20:55:23 +00:00
Mark Mitchell
ef3ddd4fa3 typeck.c (cp_build_binary_op): Move warnings about use of NULL in arithmetic earlier and allow comparisions of...
2009-07-02  Mark Mitchell  <mark@codesourcery.com>

	* typeck.c (cp_build_binary_op): Move warnings about use of NULL
	in arithmetic earlier and allow comparisions of NULL with
	pointers-to-members.

2009-07-02  Mark Mitchell  <mark@codesourcery.com>

	* g++.dg/warn/null4.C: Extend.

From-SVN: r149190
2009-07-02 17:52:37 +00:00
Jason Merrill
2b110bfcc0 Use hash tables for template specialization lookup.
* pt.c (struct spec_entry): New type.
	(decl_specializations, type_specializations): New hash tables.
	(register_specialization, retrieve_specialization): Use them.
	(reregister_specialization, lookup_template_class): Use them.
	(eq_specializations, hash_tmpl_and_args, hash_specialization): New.
	(iterative_hash_template_arg): New.
	(init_template_processing): New
	(process_partial_specialization): Don't look to see if we already
	have this partial specialization.
	(maybe_process_partial_specialization): Handle reassigning
	full specializations when we get an explicit specialization
	of the partial instantiation.
	(tsubst_friend_function): Adjust specialization reassignment code.
	(instantiate_template): Only do one lookup.
	(instantiate_decl): Don't do any lookup.
	* cp-tree.h: Declare init_template_processing.
	* decl.c (duplicate_decls): Pass args to reregister_specialization.

From-SVN: r149188
2009-07-02 13:28:07 -04:00
Rainer Orth
74c9e8526b * tracebak.c [i386 && sun] (IS_BAD_PTR): Use -1UL in comparison.
From-SVN: r149182
2009-07-02 16:10:25 +00:00
Richard Guenther
02583d3c94 re PR bootstrap/40617 (Revision 149170 breaks bootstrap)
2009-07-02  Richard Guenther  <rguenther@suse.de>

	PR bootstrap/40617
	* tree-ssa-structalias.c (new_var_info): Initialize
	is_restrict_var.

From-SVN: r149179
2009-07-02 15:50:26 +00:00
Michael Matz
a3788c444c re PR fortran/32131 (knowing that stride==1 when using allocated arrays and escaping allocatable arrays)
fortran/
        PR fortran/32131
        * trans-array.c (gfc_conv_descriptor_stride_get): Return
        constant one for strides in the first dimension of ALLOCATABLE
        arrays.

testsuite/
        PR fortran/32131
        * gfortran.dg/pr32921.f: Adjust.

From-SVN: r149178
2009-07-02 15:31:28 +00:00
Jan Hubicka
3c1832c328 local-pure-const.c: New testcase.
* gcc.dg/tree-ssa/local-pure-const.c: New testcase.
	* ipa-pure-const.c (check_op): Use PTA info to see if indirect_ref is
	local.

From-SVN: r149176
2009-07-02 15:16:08 +00:00
Paolo Bonzini
92355a9cf2 expmed.c (emit_cstore, [...]): Accept target_mode instead of recomputing it.
2009-07-02  Paolo Bonzini  <bonzini@gnu.org>

	* expmed.c (emit_cstore, emit_store_flag_1): Accept target_mode
	instead of recomputing it.  Adjust calls.
	(emit_store_flag): Adjust recursive calls.

From-SVN: r149171
2009-07-02 11:23:23 +00:00
Richard Guenther
91deb93712 tree-ssa-live.c (remove_unused_locals): Do not remove heap variables.
2009-07-02  Richard Guenther  <rguenther@suse.de>

	* tree-ssa-live.c (remove_unused_locals): Do not remove
	heap variables.
	* tree-ssa-structalias.c (handle_lhs_call): Delay setting
	of DECL_EXTERNAL for HEAP variables.
	(compute_points_to_sets): Set DECL_EXTERNAL for escaped
	HEAP variables.  Do not adjust RESTRICT vars.
	(find_what_var_points_to): Nobody cares if something
	points to READONLY.

From-SVN: r149170
2009-07-02 10:18:24 +00:00
Nick Clifton
3e37f41e5a remove sanitzation leakage
From-SVN: r149169
2009-07-02 07:20:22 +00:00
Ben Elliston
2011dbb082 unwind-dw2-fde-glibc.c (_Unwind_IteratePhdrCallback): Move pc_low and pc_high declarations to the top of the function.
* unwind-dw2-fde-glibc.c (_Unwind_IteratePhdrCallback): Move
	pc_low and pc_high declarations to the top of the function.

From-SVN: r149167
2009-07-02 14:50:20 +10:00
Jason Merrill
c57801d4ac * cp-tree.h (DECL_CLASS_TEMPLATE_P): Use DECL_IMPLICIT_TYPEDEF_P.
From-SVN: r149166
2009-07-01 23:51:04 -04:00
Jason Merrill
62e3e13ab3 pt.c (register_specialization): Use duplicate_decls to merge the argument with a previous specialization.
* pt.c (register_specialization): Use duplicate_decls to merge
	the argument with a previous specialization.
	(check_explicit_specialization): Call register_specialization to
	merge the TEMPLATE_DECL with a previous version.
	(determine_specialization): Return the args even if fn is a template.

From-SVN: r149165
2009-07-01 23:50:57 -04:00
DJ Delorie
f2082f9028 mep.c (mep_handle_option): Leave IVC2 control registers as fixed.
* config/mep/mep.c (mep_handle_option): Leave IVC2 control
registers as fixed.
(mep_interrupt_saved_reg): Save appropriate IVC2 control
registers.
* config/mep/mep-ivc2.cpu: Add VOLATILE to insns that make
unspecified accesses to control registers.
* config/mep/intrinsics.md: Regenerate.
* config/mep/intrinsics.h: Regenerate.
* config/mep/mep-intrin.h: Regenerate.

From-SVN: r149164
2009-07-01 22:16:32 -04:00
Anthony Green
9df748c0ca Tweak moxie prologue and epilogue code.
From-SVN: r149163
2009-07-02 01:18:42 +00:00
GCC Administrator
b0f0c81783 Daily bump.
From-SVN: r149162
2009-07-02 00:16:50 +00:00
Richard Henderson
997704f18b re PR bootstrap/40347 (i386-darwin ICEs while building libgcc during stage2)
PR bootstrap/40347
	* function.c (reposition_prologue_and_epilogue_notes): If epilogue
	contained no insns, reposition note before last insn.

From-SVN: r149158
2009-07-01 16:21:17 -07:00
Richard Henderson
9f2af3cef8 re PR debug/40431 (ICE in div_data_align, at dwarf2out.c:533 while configuring sparcv9 libgcc)
PR debug/40431
	* dwarf2out.c (def_cfa_1): Revert 2009-06-11 change for
	DW_CFA_def_cfa_offset and DW_CFA_def_cfa.

From-SVN: r149157
2009-07-01 16:16:06 -07:00
Michael Meissner
d66a97e281 Fix PR 40558, undo part of June 25th patch
Co-Authored-By: Pat Haugen <pthaugen@us.ibm.com>
Co-Authored-By: Revital Eres <eres@il.ibm.com>

From-SVN: r149155
2009-07-01 22:34:26 +00:00
Adam Nemet
479b101323 combine.c (force_to_mode): Handle TRUNCATE.
* combine.c (force_to_mode): Handle TRUNCATE.  Factor out
	truncation from operands in binary operations.

testsuite/
	* gcc.target/mips/truncate-4.c: New testcase.

From-SVN: r149154
2009-07-01 21:34:58 +00:00
Adam Nemet
c600a15524 revert: expmed.c (store_bit_field_1): Properly truncate the paradoxical subreg of op0 to the original op0.
Revert:
	2009-01-11  Adam Nemet  <anemet@caviumnetworks.com>
	* expmed.c (store_bit_field_1): Properly truncate the paradoxical
	subreg of op0 to the original op0.

	* expmed.c (store_bit_field_1): Use a temporary as the destination
	instead of a paradoxical subreg when we need to truncate the result.

From-SVN: r149153
2009-07-01 21:22:28 +00:00