Commit Graph

100370 Commits

Author SHA1 Message Date
Steven Bosscher accf9ad64a c-lex.c: Do not include c-tree.h.
* c-lex.c: Do not include c-tree.h.
	* c-pretty-print.c: Likewise.
	* c-opts.c: Likewise.
	* c-gimplify.c: Likewise.
	* c-common.c: Likewise.
	* c-dump.c: Likewise.  Include c-common.h.

From-SVN: r160008
2010-05-28 23:47:05 +00:00
Steven Bosscher 59cc9210fc c-common.h (GCC_DIAG_STYLE): Define earlier in the file, before including diagnostic-core.h.
gcc/ChangeLog:
	* c-common.h (GCC_DIAG_STYLE): Define earlier in the file,
	before including diagnostic-core.h.
	(c_cpp_error): New prototype moved from c-tree.h.
	Use ATTRIBUTE_GCC_DIAG instead of ATTRIBUTE_GCC_CDIAG.
	* c-tree.h (ATTRIBUTE_GCC_CDIAG): Remove define.
	(pedwarn_c90, perwarn_c99): Use ATTRIBUTE_GCC_DIAG instead.
	(c_cpp_error): Prototype moved to c-common.h.
	* Makefile.in: Update dependency for C_COMMON_H.

cp/ChangeLog:
	* cp-tree.h (ATTRIBUTE_GCC_CXXDIAG): Remove.  Require that
	this file is included before c-common.h.  Define GCC_DIAG_STYLE
	before including diagnostic-core.h and toplev.h.
	(pedwarn_cxx98): Use ATTRIBUTE_GCC_DIAG.
	* pt.c: Include cp-tree.h before c-common.h.

From-SVN: r160007
2010-05-28 23:15:55 +00:00
Steven Bosscher bffad7f1cf c-common.h: Add FIXME for awkward split of c_register_addr_space.
gcc/ChangeLog:
	* c-common.h: Add FIXME for awkward split of c_register_addr_space.
	* c-common.c (c_register_addr_space): Remove here.
	* c-decl.c (c_register_addr_space): Re-add here.

cp/ChangeLog:
	* tree.c (c_register_addr_space): Add stub.

From-SVN: r160006
2010-05-28 23:13:18 +00:00
Mike Stump d685a68992 * config/darwin-c.c: Remove c-tree.h include.
From-SVN: r160005
2010-05-28 22:55:02 +00:00
Joseph Myers 6afbc88506 gcc.c: Include diagnostic.h.
* gcc.c: Include diagnostic.h.
	(error_count): Remove.  All users changed to use errorcount.
	(programname): Remove.  All users changed to use progname.
	(fancy_abort, internal_error, fatal_error, error, warning, inform,
	fnotice): Remove.
	(execute): Don't include "Internal error" and bug reporting
	information in argument of internal_error call.
	(process_command): Don't increment error_count after calling
	perror_with_name.
	(input_filename): Rename to gcc_input_filename.  All users
	changed.
	(main): Call diagnostic_initialize.  Register delete_temp_files
	with atexit.  Use seen_error to test for errors.
	* gcc.h: Include diagnostic-core.h.
	(fatal_error, error, warning): Remove.
	* Makefile.in (GCC_H): Add $(DIAGNOSTIC_CORE_H).
	(GCC_OBJS): Add diagnostic.o, pretty-print.o and input.o.
	(gcc.o): Update dependencies.

From-SVN: r160004
2010-05-28 23:48:36 +01:00
Jeff Law 0896cc668a ira.c (ira_bad_reload_regno, [...]): New functions.
* ira.c (ira_bad_reload_regno, ira_build_reload_regno_1): New functions.
	* ira.h (ira_bad_reload_regno): Declare
	* reload1.c (allocate_reload_reg): Use ira_bad_reload_regno.

From-SVN: r160001
2010-05-28 16:19:22 -06:00
Jeff Law bdf0eb0667 ira-color.c (update_curr_costs): Free updated hard reg costs.
* ira-color.c (update_curr_costs): Free updated hard reg costs.
	(ira_reassign_conflict_allocnos): Remove bogus asserts.
	(allocno_reload_assign): Likewise.

From-SVN: r160000
2010-05-28 16:06:40 -06:00
Ian Lance Taylor 080aebdb54 Fix erroneous duplication.
From-SVN: r159999
2010-05-28 21:48:47 +00:00
Paolo Carlini 2fb16a392a stl_vector.h (vector<>::data): Fix return type in c++0x mode.
2010-05-28  Paolo Carlini  <paolo.carlini@oracle.com>

	* include/bits/stl_vector.h (vector<>::data): Fix return type
	in c++0x mode.
	* testsuite/23_containers/vector/requirements/dr438/
	assign_neg.cc: Adjust dg-error line number.
	* 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: r159998
2010-05-28 21:47:07 +00:00
Tobias Burnus 984ad4496b options.c (gfc_handle_option): Fix handling of -fno-whole-file.
2010-05-28  Tobias Burnus  <burnus@net-b.de>

        * options.c (gfc_handle_option): Fix handling of
        -fno-whole-file.

From-SVN: r159997
2010-05-28 23:11:42 +02:00
Nathan Froyd 4a73490d93 tree-vect-stmts.c (vectorizable_assignment): Call build1 instead of build1_stat.
* tree-vect-stmts.c (vectorizable_assignment): Call build1 instead of
	build1_stat.

From-SVN: r159995
2010-05-28 19:49:22 +00:00
Richard Guenther 86561bb62b re PR lto/44312 (lto-streamer-in.c: In function ‘lto_read_tree’: warning: ‘fv.mode’ is used uninitialized in this function)
2010-05-28  Richard Guenther  <rguenther@suse.de>

	PR lto/44312
	* lto-streamer-in.c (unpack_ts_fixed_cst_value_fields):
	Stream fixed-point constants mode.
	(unpack_ts_type_value_fields): Fix width of TYPE_MODE
	and TYPE_PRECISION.
	* lto-streamer-out.c (pack_ts_fixed_cst_value_fields):
	Stream fixed-point constants mode.
	(pack_ts_function_decl_value_fields): Fix width of TYPE_MODE
	and TYPE_PRECISION.

From-SVN: r159993
2010-05-28 18:49:51 +00:00
Sebastian Pop 0a74c7586c When niter may be zero, return a COND_EXPR with the may_be_zero condition.
2010-05-28  Sebastian Pop  <sebastian.pop@amd.com>

	* tree-scalar-evolution.c (set_nb_iterations_in_loop): Inlined in the
	only place it was called from.
	(number_of_latch_executions): Do not return chrec_dont_know when the
	may_be_zero is a runtime condition: instead, return a COND_EXPR
	including the may_be_zero condition.
	* cfgloop.h (struct loop): Add a note on COND_EXPRs to the comment
	of nb_iterations.
	* tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Handle
	COND_EXPRs.

	* gcc.dg/vect/vect-outer-fir-lb.c: Un-XFAIL-ed.

From-SVN: r159992
2010-05-28 18:42:15 +00:00
Sebastian Pop e7cb8957bf Don't generate COND_EXPRs for degenerate_phi_result.
2010-05-28  Sebastian Pop  <sebastian.pop@amd.com>

	* tree-if-conv.c (replace_phi_with_cond_gimple_assign_stmt): Don't
	generate COND_EXPRs for degenerate_phi_result.

From-SVN: r159991
2010-05-28 18:42:06 +00:00
Sebastian Pop d10e857ebb Check the if-convertibility of phi nodes in non predicated BBs.
2010-05-28  Sebastian Pop  <sebastian.pop@amd.com>

	PR middle-end/44293
	* tree-if-conv.c (if_convertible_loop_p): Check the
	if-convertibility of phi nodes in non predicated BBs.

From-SVN: r159990
2010-05-28 18:38:06 +00:00
Mike Stump 300d430f06 re PR objc/44125 (const-str-9 fails.)
PR objc/44125
	* objc.dg/const-str-9.m: Remove static.

From-SVN: r159989
2010-05-28 18:33:45 +00:00
Mike Stump cc16b0f06d * objc.dg/stret-2.m: Fix to use more than 4 bytes.
From-SVN: r159988
2010-05-28 17:53:56 +00:00
Joseph Myers 6cffd02a8d * gcc.c (error, warning, inform): Remove duplicate ": " in output.
From-SVN: r159987
2010-05-28 18:34:11 +01:00
Joseph Myers 2dec80c756 re PR driver/15303 (When gcc sees an unrecognized option, the exit status indicates success)
PR driver/15303
	* gcc.c (inform, warning, inform): New functions.
	(fatal_ice): Rename to internal_error; change cmsgid parameter to
	gmsgid.  All callers changed.
	(notice): Rename to fnotice; add parameter fp.  All callers
	changed.
	(fatal_error): Rename to fatal_signal.  All users changed.
	(fatal): Rename to fatal_error; change cmsgid parameter to
	gmsgid.  All callers changed.
	(process_command): Use warning instead of error for warnings.
	(end_going_arg): Don't use _() around argument of error.
	(do_spec_1): Use inform for message from %n specs.  Use warning
	instead of error for warnings.
	(main): Use inform for comparison messages.  Use warning for
	message about unused linker input.
	(error): Increment error_count.  Print "error: ".
	* gcc.h (fatal): Change to fatal_error.
	(warning): Declare.
	* config/darwin-driver.c (darwin_default_min_version): Use warning
	instead of fprintf for warnings.
	* cppspec.c (lang_specific_driver): Use fatal_error instead of
	fatal.

cp:
	* g++spec.c (lang_specific_driver): Use fatal_error instead of
	fatal.

fortran:
	* gfortranspec.c (append_arg, lang_specific_driver): Use
	fatal_error instead of fatal.  Use warning instead of fprintf for
	warnings.

java:
	* jvspec.c (lang_specific_driver): Use fatal_error instead of
	fatal.  Use warning instead of error for warnings.

From-SVN: r159986
2010-05-28 18:28:57 +01:00
Nathan Froyd 7325b1b3ab * expr.c (get_symbol_table_index): Add spaces in expression.
From-SVN: r159984
2010-05-28 17:11:15 +00:00
Julian Brown dcd8b2eea8 thumb2.md (*thumb2_addsi3_compare0): New.
gcc/
	* config/arm/thumb2.md (*thumb2_addsi3_compare0): New.
	(*thumb2_addsi3_compare0_scratch): New.
	* config/arm/constraints.md (Pv): New.
	* config/arm/arm.md (*addsi3_compare0): Remove FIXME comment. Use
	for ARM mode only.
	(*addsi3_compare0_scratch): Likewise.

From-SVN: r159983
2010-05-28 16:07:33 +00:00
Jan Hubicka df24c2b88d ipa-reference.c (add_static_var): Remove redundant all_module_statics check.
* ipa-reference.c (add_static_var): Remove redundant all_module_statics check.
	(ipa_reference_write_optimization_summary): Call is_proper_for_analysis only
	on local statics.

From-SVN: r159982
2010-05-28 15:56:16 +00:00
Iain Sandoe c3a9a336d0 config.gcc (*-*-darwin*): Adjust t-make fragments for Darwin.
2010-05-28  Iain Sandoe  <iains@gcc.gnu.org>

        * config.gcc (*-*-darwin*): Adjust t-make fragments for Darwin.

From-SVN: r159979
2010-05-28 15:11:08 +00:00
Maxim Kuvyrkov 47089d4285 re PR bootstrap/44314 (Powerpc64-unknown-linux-gnu bootstrap broken)
PR bootstrap/44314
	* config/alpha/linux.h, config/rs6000/linux.h, config/rs6000/linux64.h
	(OPTION_GLIBC): Define.

From-SVN: r159978
2010-05-28 15:03:23 +00:00
Jakub Jelinek cced5e7f23 re PR debug/41048 (bad DW_AT_data_member_location from g++)
PR debug/41048
	* dwarf2out.c (double_int_type_size_in_bits): New function.
	(round_up_to_align): Change first argument and return value to
	double_int.
	(field_byte_offset): Work internally on double_ints.

From-SVN: r159975
2010-05-28 15:46:46 +02:00
Nathan Froyd aa6d7c816c java-tree.h (method_entry): Declare.
* java-tree.h (method_entry): Declare.  Declare VECs containing it.
	(struct lang_type): Change type of otable_methods, atable_methods, and
	itable_methods to VECs.  Fix comment for atable_methods.
	(emit_symbol_table): Take a VEC instead of a tree.
	(get_symbol_table_index): Take a VEC * instead of a tree *.
	* class.c (add_table_and_syms): Take a VEC instead of a tree.
	(emit_symbol_table): Update for changed parameter type.
	* expr.c (get_symbol_table_index): Likewise.

From-SVN: r159974
2010-05-28 13:41:55 +00:00
Jakub Jelinek 005d613b2d re PR target/43636 (ICE in extract_insn, at recog.c:2103)
PR target/43636
	* builtins.c (expand_movstr): Use a temporary pseudo instead
	of target even when target is not NULL and not const0_rtx, but
	fails movstr predicate.
	* config/m32c/blkmov.md (movstr): Add predicate to first operand.

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

From-SVN: r159972
2010-05-28 15:35:56 +02:00
Iain Sandoe 773c1c8d20 re PR objc++/23616 (obj-c++.dg/try-catch-[29].mm (objc exceptions are broken) fails with the GNU Runtime)
PR ObjC++/23616
	* obj-c++.dg/try-catch-2.mm: Adjust xfail.
	* obj-c++.dg/try-catch-9.mm: Ditto.

From-SVN: r159971
2010-05-28 13:16:44 +00:00
Joseph Myers 7ca9278786 final.c (rest_of_clean_state): Use %m in errors instead of strerror (errno).
* final.c (rest_of_clean_state): Use %m in errors instead of
	strerror (errno).
	* gengtype.c (read_input_list, close_output_files): Use xstrerror
	instead of strerror.
	* toplev.c (process_options): Use %m in errors instead of strerror
	(errno).
	* tree-dump.c (dump_begin): Use %m in errors instead of strerror
	(errno).

fortran:
	* cpp.c (gfc_cpp_init_0): Use xstrerror instead of strerror.
	* module.c (write_char, gfc_dump_module, gfc_use_module): Use
	xstrerror instead of strerror.

lto:
	* lto-coff.c (coff_errmsg): Remove.
	(lto_coff_begin_section_with_type, lto_obj_append_data): Use %m in
	errors instead of coff_errmsg (-1).
	* lto-macho.c (mach_o_errmsg): Remove.
	(lto_obj_begin_section, lto_obj_append_data): Use %m in errors
	instead of mach_o_errmsg (-1).
	* lto.c (read_cgraph_and_symbols): Use %m in errors instead of
	xstrerror (errno).

From-SVN: r159969
2010-05-28 14:03:31 +01:00
Uros Bizjak 8bf85f21b3 i386.c (ix86_fn_abi_va_list): Make static.
* config/i386/i386.c (ix86_fn_abi_va_list): Make static.
	(ix86_canonical_va_list_type): Make static.  Add declaration.
	(ix86_enum_va_list): Make static.  Reindent.
	* config/i386/i386-protos.h (ix86_fn_abi_va_list): Remove declaration.
	(ix86_canonical_va_list_type): Ditto.
	(ix86_enum_va_list): Ditto.

From-SVN: r159968
2010-05-28 14:59:32 +02:00
Richard Guenther b56119876b lto-wrapper.c (run_gcc): With -save-temps generate a user-visible ltrans filename.
2010-05-28  Richard Guenther  <rguenther@suse.de>

	* lto-wrapper.c (run_gcc): With -save-temps generate a
	user-visible ltrans filename.  Fixup ltrans unit numbering.

	lto/
	* lto.c (prefix_name_with_star): Removed.
	(strip_extension): Likewise.
	(get_filename_for_set): Likewise.
	(lto_write_ltrans_list): Fold into ...
	(lto_wpa_write_files): ... this.  Name LTRANS units
	by suffixing the ltrans output list filename.
	(do_whole_program_analysis): Adjust.

From-SVN: r159967
2010-05-28 12:48:54 +00:00
Kai Tietz d4048208a4 c-common.c (c_common_nodes_and_builtins): Replace use of TARGET_ENUM_VA_LIST by target hook enum_va_list.
2010-05-28  Kai Tietz  <kai.tietz@onevision.com>

        * c-common.c (c_common_nodes_and_builtins): Replace use
        of TARGET_ENUM_VA_LIST by target hook enum_va_list.
        * config/i386/i386.c (TARGET_ENUM_VA_LIST_P): Hook
        to ix86_enum_va_list.
        * config/i386/i386.h (TARGET_ENUM_VA_LIST): Removed.
        * doc/tm.texi (TARGET_ENUM_VA_LIST): Removed.
        (TARGET_ENUM_VA_LIST_P): Add hook description.
        * target-def.h (TARGET_ENUM_VA_LIST_P): Added.
        * target.h (gcc_target): Add enum_va_list hook.

From-SVN: r159966
2010-05-28 13:58:35 +02:00
Kai Tietz 40dcd88bb9 re PR bootstrap/44299 (Bootstrap broken for cygwin and mingw targets)
2010-05-28  Kai Tietz  <kai.tietz@onevision.com>

        PR bootstrap/44299
        * config/i386/t-cygming: Adjust header dependencies for winnt-cxx.c.
        * config/i386/winnt-cxx.c (IN_GCC_FRONTEND): Remove undefine.
        * config/i386/winnt.c (IN_GCC_FRONTEND): Likewise.

From-SVN: r159965
2010-05-28 13:19:41 +02:00
Alan Modra 1cb980a29c re PR target/44266 (stack frame lacks parameter save area)
PR target/44266
	* config/rs6000/rs6000.c (rs6000_legitimize_tls_address): Use
	emit_library_call machinery to set up __tls_get_addr calls.

From-SVN: r159963
2010-05-28 18:27:16 +09:30
Andreas Krebbel b247e88a78 s390.md (movqi): Fix typo ('*' -> '#').
2010-05-28  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>

	* config/s390/s390.md (movqi): Fix typo ('*' -> '#').

From-SVN: r159960
2010-05-28 07:39:10 +00:00
GCC Administrator 6d6da14164 Daily bump.
From-SVN: r159959
2010-05-28 00:17:21 +00:00
Dodji Seketeli ec4be2f46d Revert "Fix PR c++/44188"
gcc/ChangeLog:
	revert fix for PR c++/44188
	* c-common.c (is_typedef_decl): Revert the moving of  this
	definition ...
	* tree.c (is_typedef_decl): ... here.
	(typdef_variant_p): Revert the moving of this  definition
	here from gcc/cp/tree.c.
	* c-common.h (is_typedef_decl): Revert the moving of this
	declaration ...
	* tree.h (is_typedef_decl): ... here.
	(typedef_variant_p): Revert the moving of this  declaration here
	from gcc/cp/cp-tree.h
	* dwarf2out.c (is_naming_typedef_decl): Revert this new function.
	(gen_tagged_type_die): Revert the splitting out of ...
	(gen_type_die_with_usage): ... this function. Revert the anonymous
	tagged type handling.
	(gen_typedef_die): Revert emitting DW_TAG_typedef  for
	typedefs naming anonymous tagged types.

gcc/cp/ChangeLog:
	Revert fix of PR c++/44188
	* cp-tree.h (typedef_variant_p): Revert moving this declaration to
	gcc/tree.h.
	* tree.c (typedef_variant_p): Revert moving this definition to
	gcc/tree.c.
	* decl.c (grokdeclarator): Revert naming typedef handling.

gcc/testsuite/ChangeLog:
	Revert fix for PR c++/44188
	* g++.dg/debug/dwarf2/typedef3.C: Revert new test.

From-SVN: r159955
2010-05-28 02:03:19 +02:00
Segher Boessenkool 3fe7b63c52 rs6000-modes.def (PSImode): Delete.
2010-05-26  Segher Boessenkool  <segher@kernel.crashing.org>

        * config/rs6000/rs6000-modes.def (PSImode): Delete.

From-SVN: r159954
2010-05-28 01:14:05 +02:00
Segher Boessenkool f6b5d6954d constraints.md ("z" constraint): Change to CA_REGS.
2010-05-28  Segher Boessenkool  <segher@kernel.crashing.org>

        * config/rs6000/constraints.md ("z" constraint): Change to CA_REGS.
        * config/rs6000/predicates.md: Change XER_REGNO_P to CA_REGNO_P
        throughout.
        * config/rs6000/rs6000.c (rs6000_reg_names, alt_reg_names): Change
        "xer" to "ca".
        Change XER_REGNO_P to CA_REGNO_P, XER_REGNO to CA_REGNO, and
        XER_REGS to CA_REGS throughout.
        * config/rs6000/rs6000.h: Same.
        (ADDITIONAL_REGISTER_NAMES): Add "xer".
        * config/rs6000/rs6000.md: Change XER_REGNO to CA_REGNO.  Document
        that mode_iterator "P" is the size for arithmetic carries as well.
        * doc/md.texi (rs6000 section, "z" constraint): Fix documentation.

From-SVN: r159953
2010-05-28 01:06:31 +02:00
Jakub Jelinek 47027bf398 re PR bootstrap/44255 (gcc-4.6-20100522 bootstrap comparison failure on sparc64 and arm)
PR bootstrap/44255
	* combine.c (struct rtx_subst_pair): Define unconditionally.
	(propagate_for_debug_subst): Likewise.  If not AUTO_INC_DEC,
	copy_rtx pair->to instead of cleanup_auto_inc_dec it.
	Call make_compound_operation on pair->to.
	(propagate_for_debug): Don't call make_compound_operation here.
	Always use simplify_replace_fn_rtx.

From-SVN: r159952
2010-05-28 00:08:41 +02:00
Sterling Augustine 1b408ba139 invoke.texi (xtensa options): Add -mforce-no-pic.
2010-05-27 Sterling Augustine <sterling@tensilica.com>

        * doc/invoke.texi (xtensa options): Add -mforce-no-pic.
        * config/xtensa/xtensa.c (override_options): Check
          TARGET_FORCE_NO_PIC and set flag_pic.
        * config/xtensa/xtensa.opt: Document -mforce-no-pic

From-SVN: r159950
2010-05-27 21:10:54 +00:00
Kai Tietz 0bc25dd001 re PR bootstrap/44299 (Bootstrap broken for cygwin and mingw targets)
2010-05-27  Kai Tietz  <kai.tietz@onevision.com>

        PR bootstrap/44299
        * config/i386/winnt.c (IN_GCC_FRONTEND): Undefine.
        * config/i386/winnt-cxx.c (IN_GCC_FRONTEND): Likewise.

From-SVN: r159949
2010-05-27 22:40:48 +02:00
Joseph Myers 1da2ed5f19 diagnostic-core.h: New.
* diagnostic-core.h: New.  Contents moved from diagnostic.h and
	toplev.h.
	* diagnostic.c: Don't include toplev.h.
	(progname): Define.  Moved from toplev.c.
	(seen_error): New function.
	* diagnostic.h: Include diagnostic-core.h.
	(diagnostic_t, emit_diagnostic): Don't declare here.
	* toplev.c (progname): Move to toplev.c.
	(emit_debug_global_declarations, compile_file, finalize,
	do_compile, toplev_main): Use seen_error.
	* toplev.h: Include diagnostic-core.h.
	(trim_filename, GCC_DIAG_STYLE, ATTRIBUTE_GCC_DIAG,
	internal_error, warning, warning_at, error, error_n, error_at,
	fatal_error, pedwarn, permerror, sorry, inform, inform_n,
	verbatim, fnotice, progname): Move to diagnostic-core.h.
	* builtins.c: Include diagnostic-core.h instead of diagnostic.h.
	(expand_builtin_expect): Use seen_error.
	* c-decl.c: Include diagnostic-core.h instead of diagnostic.h.
	(c_make_fname_decl, c_write_global_declarations): Use seen_error.
	* c-format.c: Include diagnostic-core.h instead of diagnostic.h.
	* c-gimplify.c: Include diagnostic-core.h instead of diagnostic.h.
	* c-lang.c: Include diagnostic-core.h instead of diagnostic.h.
	* c-lex.c (c_lex_with_flags, interpret_float): Don't increment
	errorcount for errors.
	* c-opts.c (c_common_finish): Use seen_error.
	* cgraph.c: Include diagnostic-core.h instead of diagnostic.h.
	* cgraphunit.c (verify_cgraph_node, verify_cgraph,
	cgraph_output_pending_asms, cgraph_optimize): Use seen_error.
	* coverage.c: Include diagnostic-core.h instead of diagnostic.h.
	(get_coverage_counts): Use seen_error.
	* dwarf2out.c (dwarf2out_finish): Use seen_error.
	* gimplify.c (gimplify_var_or_parm_decl, gimple_push_cleanup,
	gimplify_body): Use seen_error.
	* ipa-inline.c (cgraph_early_inlining): Use seen_error.
	* ipa-pure-const.c (gate_pure_const): Use seen_error.
	* ipa-reference.c (gate_reference): Use seen_error.
	* jump.c: Include diagnostic-core.h instead of diagnostic.h.
	* lambda-code.c: Include diagnostic-core.h instead of
	diagnostic.h.
	* lto-cgraph.c: Include diagnostic-core.h instead of diagnostic.h.
	* lto-compress.c: Include diagnostic-core.h instead of
	diagnostic.h.
	* lto-section-in.c: Include diagnostic-core.h instead of
	diagnostic.h.
	* lto-streamer-out.c: Include diagnostic-core.h instead of
	diagnostic.h.
	* lto-streamer.c: Include diagnostic-core.h instead of
	diagnostic.h.
	(gate_lto_out): Use seen_error.
	* matrix-reorg.c: Include diagnostic-core.h instead of
	diagnostic.h.
	* omega.c: Include diagnostic-core.h instead of diagnostic.h.
	* omp-low.c: Include diagnostic-core.h instead of diagnostic.h.
	(gate_expand_omp, lower_omp_1): Use seen_error.
	* passes.c: Include diagnostic-core.h instead of diagnostic.h.
	(rest_of_decl_compilation, rest_of_type_compilation,
	gate_rest_of_compilation, ipa_write_summaries): Use seen_error.
	* tree-cfg.c (label_to_block_fn): Use seen_error.
	* tree-inline.c (optimize_inline_calls): Use seen_error.
	* tree-mudflap.c (mudflap_finish_file): Use
	seen_error.
	* tree-optimize.c (gate_all_optimizations,
	gate_all_early_local_passes, gate_all_early_optimizations): Use
	seen_error.
	* tree-ssa-structalias.c (gate_ipa_pta): Use seen_error.
	* varpool.c: Include diagnostic-core.h instead of diagnostic.h.
	(varpool_remove_unreferenced_decls,
	varpool_assemble_pending_decls): Use seen_error.
	* Makefile.in (DIAGNOSTIC_CORE_H): Define.
	(TOPLEV_H, DIAGNOSTIC_H): Update.
	(c-decl.o, c-lang.o, c-format.o, lto-compress.o, lto-cgraph.o,
	lto-streamer-out.o, lto-section-in.o, lto-streamer.o,
	c-gimplify.o, omp-low.o, omega.o, diagnostic.o, passes.o,
	builtins.o, jump.o, cgraph.o, varpool.o, matrix-reorg.o,
	coverage.o, lambda-code.o): Update dependencies.

cp:
	* call.c: Include diagnostic-core.h instead of diagnostic.h.
	* cp-lang.c: Don't include diagnostic.h
	* name-lookup.c: Include diagnostic-core.h instead of
	diagnostic.h.
	(cp_emit_debug_info_for_using): Use seen_error.
	* optimize.c: Include diagnostic-core.h instead of diagnostic.h.
	* parser.c: Include diagnostic-core.h instead of diagnostic.h.
	* pt.c (iterative_hash_template_arg): Use seen_error.
	* repo.c: Include diagnostic-core.h instead of diagnostic.h.
	* typeck2.c: Include diagnostic-core.h instead of diagnostic.h.
	* Make-lang.in (cp/cp-lang.o, cp/typeck2.o, cp/call.o, cp/repo.o,
	cp/optimize.o, cp/parser.o, cp/name-lookup.o): Update
	dependencies.

lto:
	* lto.c: Include diagnostic-core.h instead of diagnostic.h.
	(read_cgraph_and_symbols, lto_main): Use seen_error.
	* Make-lang.in (lto/lto.o): Update dependencies.

objc:
	* objc-act.c: Include diagnostic-core.h instead of diagnostic.h.
	* Make-lang.in (objc/objc-act.o): Update dependencies.

From-SVN: r159947
2010-05-27 21:16:07 +01:00
Dodji Seketeli fe08ec1204 re PR c++/44188 (Fails to produce DW_AT_typedef for typedef of anonymous struct)
Fix PR c++/44188

gcc/ChangeLog:
	PR c++/44188
	* c-common.c (is_typedef_decl): Move this definition ...
	* tree.c (is_typedef_decl): ... here.
	(typdef_variant_p): Move definition here from gcc/cp/tree.c.
	* c-common.h (is_typedef_decl): Move this declaration ...
	* tree.h (is_typedef_decl): ... here.
	(typedef_variant_p): Move declaration here from gcc/cp/cp-tree.h
	* dwarf2out.c (is_naming_typedef_decl): New function.
	(gen_tagged_type_die): Split out of ...
	(gen_type_die_with_usage): ... this function. When an anonymous
	tagged type is named by a typedef, make sure a DW_TAG_typedef DIE
	is emitted for the typedef.
	(gen_typedef_die): Emit DW_TAG_typedef also for typedefs naming
	anonymous tagged types.

gcc/cp/ChangeLog:
	PR c++/44188
	* cp-tree.h (typedef_variant_p): Move this declaration to
	gcc/tree.h.
	* tree.c (typedef_variant_p): Move this definition to gcc/tree.c.
	* decl.c (grokdeclarator): Do not rename debug info of an
	anonymous tagged type named by a typedef.

gcc/testsuite/ChangeLog:
	PR c++/44188
	* g++.dg/debug/dwarf2/typedef3.C: New test.

From-SVN: r159943
2010-05-27 21:29:53 +02:00
Jason Merrill b042534cd8 print-tree.c (debug_vec_tree): New fn.
* print-tree.c (debug_vec_tree): New fn.
	(print_vec_tree): New fn.
	* tree.h: Declare them.
	* gdbinit.in (ptv): New command.

	* print-tree.c (print_node) [TREE_VEC]: Print elements normally.

	* gdbinit.in (pdd): New command.

From-SVN: r159941
2010-05-27 14:39:56 -04:00
Jason Merrill fb9c3174c9 revert: re PR libstdc++/42832 (Revisit std::function for aliasing issues and efficiency)
Revert:
	PR libstdc++/42832
	* include/std/functional (function<>::swap): Perform bytewise
	swap of _M_functor.
	* include/tr1/functional (function<>::swap): Likewise.

From-SVN: r159940
2010-05-27 14:39:46 -04:00
Jason Merrill 6ab4e49cf0 re PR c++/43555 (wrong address calculation of multidimensional variable-length array element)
PR c++/43555
	* decl.c (grokdeclarator) [cdk_pointer et al]: Force evaluation of
	anonymous VLA size.

From-SVN: r159939
2010-05-27 14:39:28 -04:00
Paolo Carlini 7ec62b2575 re PR libstdc++/40497 ([C++0x] troubles with std::next / std::prev declarations)
2010-05-27  Paolo Carlini  <paolo.carlini@oracle.com>

	PR libstdc++/40497
	* include/bits/cpp_type_traits.h (__is_iterator): Add.
	* include/bits/stl_iterator_base_funcs.h (next, prev): Use it.
	* testsuite/24_iterators/operations/40497.cc: New.

From-SVN: r159933
2010-05-27 17:37:11 +00:00
Jan Hubicka cdc029b948 ipa-inline.c (cgraph_estimate_size_after_inlining): Make inline.
* ipa-inline.c (cgraph_estimate_size_after_inlining): Make inline.
	(update_caller_keys): Return early if there are no callers;
	only update fibheap when decresing the key.
	(update_callee_keys): Avoid recursion.
	(decide_inlining_of_small_functions): When badness does not match;
	re-insert into fibheap.

From-SVN: r159931
2010-05-27 17:07:21 +00:00
Iain Sandoe 8da24d7bc7 re PR objc/44140 (ObjC lto/whopr fails)
2010-05-27  Iain Sandoe  <iains@gcc.gnu.org>

	PR ObjC/44140
	* objc.dg/torture/tls/thr-init-2.m: Skip for -flto, -fwhopr.
	* objc.dg/torture/tls/thr-init-3.m: Ditto.
	* objc.dg/torture/tls/thr-init.m: Ditto.
	* objc.dg/torture/trivial.m: Ditto.
	* obj-c++.dg/torture/tls/thr-init-1.mm: Ditto.
	* obj-c++.dg/torture/tls/thr-init-2.mm: Ditto.
	* obj-c++.dg/torture/tls/thr-init-3.mm: Ditto.
	* obj-c++.dg/torture/trivial.mm: Ditto.

From-SVN: r159929
2010-05-27 16:28:13 +00:00