Commit Graph

94447 Commits

Author SHA1 Message Date
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
Eric Botcazou bf92f919e9 Fix nits
From-SVN: r149152
2009-07-01 20:20:25 +00:00
DJ Delorie a12e9a5f69 mep-ivc2.cpu (cmov, [...]): Add intrinsic names to VLIW variants.
* config/mep/mep-ivc2.cpu (cmov, cmovc, cmovh): Add intrinsic names to VLIW variants.
(ivc2rm, ivc2crn): Make data type consistent with non-VLIW variants.
* config/mep/intrinsics.md: Regenerate.
* config/mep/intrinsics.h: Regenerate.
* config/mep/mep-intrin.h: Regenerate.

From-SVN: r149151
2009-07-01 16:07:41 -04:00
Jakub Jelinek 2a5bd62a7f re PR debug/40462 (ICE in dwarf2out_begin_epilogue, at dwarf2out.c:2773 while compiling mlib-tgt.adb)
PR debug/40462
	* jump.c (returnjump_p): Revert last patch.
	* dwarf2out.c (dwarf2out_begin_epilogue): Handle SEQUENCEs.

From-SVN: r149150
2009-07-01 21:25:52 +02:00
Richard Sandiford edd3a61c4a libffi-dg.exp (libffi-init): Set ld_library_path to "" before adding paths.
libffi/
	* testsuite/lib/libffi-dg.exp (libffi-init): Set ld_library_path
	to "" before adding paths.  (This reinstates an assignment that
	was removed by my 2009-06-30 commit, but changes the initial
	value from "." to "".)

From-SVN: r149149
2009-07-01 19:15:33 +00:00
Jakub Jelinek e904d28b2c HTML_401F.java (defineElements): Split this huge method into...
* gnu/javax/swing/text/html/parser/HTML_401F.java (defineElements):
	Split this huge method into...
	(defineElements1, defineElements2, defineElements3, defineElements4,
	defineElements5, defineElements6): ... these smaller methods.

From-SVN: r149148
2009-07-01 21:13:03 +02:00
Ian Lance Taylor 96f9e8545d * g++spec.c (lang_specific_driver): Bump num_args by 1.
From-SVN: r149147
2009-07-01 18:46:09 +00:00
John David Anglin 882e35a6f2 re PR ada/40609 (Ada build fails)
PR ada/40609
	init.c (__gnat_error_handler): Add ATTRIBUTE_UNUSED to ucontext
	argument.

From-SVN: r149146
2009-07-01 18:10:45 +00:00
H.J. Lu 33d1a550c7 re PR testsuite/40601 (Errors in "make check")
2009-07-01  H.J. Lu  <hongjiu.lu@intel.com>

	PR testsuite/40601
	* testsuite/lib/libffi-dg.exp (libffi-init): Properly set
	gccdir.  Adjust ld_library_path for gcc only if gccdir isn't
	empty.

From-SVN: r149145
2009-07-01 10:07:31 -07:00
John David Anglin 4aa7f896a9 re PR target/40575 (FAIL: gcc.dg/falign-labels-1.c execution test)
PR target/40575
	* pa.md (casesi32p): Use jump table label to determine the offset
	of the jump table.
	(casesi64p): Likewise.

From-SVN: r149144
2009-07-01 16:53:26 +00:00
John David Anglin 3232e9d8b8 pa.c (forward_branch_p): Return bool type.
* pa.c (forward_branch_p): Return bool type.  Use instruction addresses
	when available.  Assert that INSN has a jump label.
	(pa_adjust_insn_length): Don't call forward_branch_p if INSN doesn't
	have a jump label.

From-SVN: r149141
2009-07-01 15:47:33 +00:00
Richard Guenther 14c41b9bb9 re PR tree-optimization/19831 (Missing DSE/malloc/free optimization)
2009-07-01  Richard Guenther  <rguenther@suse.de>

	PR tree-optimization/19831
	* tree-ssa-dce.c (propagate_necessity): Calls to functions
	that only act as barriers do not make any previous stores
	necessary.
	* tree-ssa-structalias.c (handle_lhs_call): Delay making
	HEAP variables global, do not add a constraint from nonlocal.
	(find_func_aliases): Handle escapes through return statements.
	(compute_points_to_sets): Make escaped HEAP variables global.

	* gcc.dg/tree-ssa/20041122-1.c: Enable TBAA, scan FRE dump,
	make allocated memory escape.  Un-XFAIL.
	* gcc.dg/vect/pr21591.c: Make allocated memory escape.
	* gcc.dg/vect/pr31699.c: Likewise.
	* gcc.dg/tree-ssa/ssa-dce-7.c: New testcase.

	libmudflap/
	* testsuite/libmudflap.c/fail11-frag.c: Make allocated memory
	escape.
	* testsuite/libmudflap.c/fail12-frag.c: Likewise.
	* testsuite/libmudflap.c/fail16-frag.c: Likewise.
	* testsuite/libmudflap.c/fail31-frag.c: Likewise.

From-SVN: r149140
2009-07-01 12:27:33 +00:00
Tobias Grosser f6e0880aa0 MAINTAINERS: Move myself to the Graphite Reviewers.
2009-07-01  Tobias Grosser  <grosser@fim.uni-passau.de>

	* MAINTAINERS: Move myself to the Graphite Reviewers.

From-SVN: r149138
2009-07-01 12:13:57 +00:00
Paolo Bonzini 1ed20a40b8 re PR bootstrap/40597 (Powerpc bootstrap is broken due to changes in expmed.c)
2009-07-01  Paolo Bonzini  <bonzini@gnu.org>

	PR bootstrap/40597
	* expmed.c (emit_store_flag): Perform a conversion if necessary,
	after reducing a DImode cstore to SImode.

From-SVN: r149137
2009-07-01 12:05:56 +00:00
Paolo Bonzini ce3aea3586 expr.c (expand_expr_real_1): Reinstate fallthrough to TRUTH_ANDIF_EXPR if do_store_flag returns NULL.
2009-07-01  Paolo Bonzini  <bonzini@gnu.org>

	* expr.c (expand_expr_real_1): Reinstate fallthrough to
	TRUTH_ANDIF_EXPR if do_store_flag returns NULL.

From-SVN: r149136
2009-07-01 11:50:12 +00:00
Eric Botcazou c29fe0c8bd * init.c (__gnat_error_handler, Solaris): Add ATTRIBUTE_UNUSED marker.
From-SVN: r149135
2009-07-01 09:08:27 +00:00
Maciej W. Rozycki 1df34d4da7 vax.h (TARGET_BSD_DIVMOD): New macro.
* config/vax/vax.h (TARGET_BSD_DIVMOD): New macro.  Set to 1.
	* config/vax/linux.h (TARGET_BSD_DIVMOD): New macro.  Redefine the
	to 0.
	* config/vax/vax.c (vax_init_libfuncs): Only redefine udiv_optab
	and umod_optab if TARGET_BSD_DIVMOD.
	* config/vax/lib1funcs.asm: New file.
	* config/vax/t-linux: New file.
	* config.gcc (vax-*-linux*): Set tmake_file to vax/t-linux.

From-SVN: r149128
2009-07-01 01:23:54 +00:00
GCC Administrator 429a907c9a Daily bump.
From-SVN: r149126
2009-07-01 00:16:57 +00:00
Jakub Jelinek 5ccde5a06a re PR c++/40566 (rejects promoted throw)
PR c++/40566
	* convert.c (convert_to_integer) <case COND_EXPR>: Don't convert
	to type arguments that have void type.

	* g++.dg/parse/cond5.C: New test.

From-SVN: r149121
2009-07-01 00:04:36 +02:00