Commit Graph

1199 Commits

Author SHA1 Message Date
Andrew MacLeod 2fb9a547b4 gimple.h: Remove all includes.
* gimple.h: Remove all includes.
	(recalculate_side_effects): Move prototype to gimplify.h.
	* Makefile.in (PLUGIN_HEADERS): Add flattened gimple.h includes.
	* gengtype.c (open_base_files): Add gimple.h include list.
	* gimplify.h (recalculate_side_effects): Relocate prototype here.
	* gimple.c: Adjust include list.
	(recalculate_side_effects): Move to gimplify.c.
	* gimplify.c: Adjust include list.
	(recalculate_side_effects): Relocate from gimple.c.
	* alias.c: Add required include files removed from gimple.h.
	* asan.c: Likewise.
	* builtins.c: Likewise.
	* calls.c: Likewise.
	* cfgexpand.c: Likewise.
	* cfgloop.c: Likewise.
	* cfgloopmanip.c: Likewise.
	* cgraphbuild.c: Likewise.
	* cgraph.c: Likewise.
	* cgraphclones.c: Likewise.
	* cgraphunit.c: Likewise.
	* cilk-common.c: Likewise.
	* data-streamer.c: Likewise.
	* data-streamer-in.c: Likewise.
	* data-streamer-out.c: Likewise.
	* dse.c: Likewise.
	* dwarf2out.c: Likewise.
	* emit-rtl.c: Likewise.
	* except.c: Likewise.
	* expr.c: Likewise.
	* fold-const.c: Likewise.
	* function.c: Likewise.
	* gimple-builder.c: Likewise.
	* gimple-expr.c: Likewise.
	* gimple-fold.c: Likewise.
	* gimple-iterator.c: Likewise.
	* gimple-low.c: Likewise.
	* gimple-pretty-print.c: Likewise.
	* gimple-ssa-isolate-paths.c: Likewise.
	* gimple-ssa-strength-reduction.c: Likewise.
	* gimple-streamer-in.c: Likewise.
	* gimple-streamer-out.c: Likewise.
	* gimple-walk.c: Likewise.
	* gimplify-me.c: Likewise.
	* graphite-blocking.c: Likewise.
	* graphite.c: Likewise.
	* graphite-clast-to-gimple.c: Likewise.
	* graphite-dependences.c: Likewise.
	* graphite-interchange.c: Likewise.
	* graphite-optimize-isl.c: Likewise.
	* graphite-poly.c: Likewise.
	* graphite-scop-detection.c: Likewise.
	* graphite-sese-to-poly.c: Likewise.
	* internal-fn.c: Likewise.
	* ipa.c: Likewise.
	* ipa-cp.c: Likewise.
	* ipa-devirt.c: Likewise.
	* ipa-inline-analysis.c: Likewise.
	* ipa-inline.c: Likewise.
	* ipa-profile.c: Likewise.
	* ipa-prop.c: Likewise.
	* ipa-pure-const.c: Likewise.
	* ipa-reference.c: Likewise.
	* ipa-split.c: Likewise.
	* ipa-utils.c: Likewise.
	* langhooks.c: Likewise.
	* lto-cgraph.c: Likewise.
	* lto-compress.c: Likewise.
	* lto-opts.c: Likewise.
	* lto-section-in.c: Likewise.
	* lto-section-out.c: Likewise.
	* lto-streamer.c: Likewise.
	* lto-streamer-in.c: Likewise.
	* lto-streamer-out.c: Likewise.
	* omp-low.c: Likewise.
	* opts-global.c: Likewise.
	* passes.c: Likewise.
	* predict.c: Likewise.
	* profile.c: Likewise.
	* sese.c: Likewise.
	* stmt.c: Likewise.
	* stor-layout.c: Likewise.
	* symtab.c: Likewise.
	* targhooks.c: Likewise.
	* toplev.c: Likewise.
	* tracer.c: Likewise.
	* trans-mem.c: Likewise.
	* tree-affine.c: Likewise.
	* tree.c: Likewise.
	* tree-call-cdce.c: Likewise.
	* tree-cfg.c: Likewise.
	* tree-cfgcleanup.c: Likewise.
	* tree-chrec.c: Likewise.
	* tree-complex.c: Likewise.
	* tree-data-ref.c: Likewise.
	* tree-dfa.c: Likewise.
	* tree-eh.c: Likewise.
	* tree-emutls.c: Likewise.
	* tree-if-conv.c: Likewise.
	* tree-inline.c: Likewise.
	* tree-into-ssa.c: Likewise.
	* tree-loop-distribution.c: Likewise.
	* tree-nested.c: Likewise.
	* tree-nrv.c: Likewise.
	* tree-object-size.c: Likewise.
	* tree-outof-ssa.c: Likewise.
	* tree-parloops.c: Likewise.
	* tree-phinodes.c: Likewise.
	* tree-predcom.c: Likewise.
	* tree-pretty-print.c: Likewise.
	* tree-profile.c: Likewise.
	* tree-scalar-evolution.c: Likewise.
	* tree-sra.c: Likewise.
	* tree-ssa-address.c: Likewise.
	* tree-ssa-alias.c: Likewise.
	* tree-ssa.c: Likewise.
	* tree-ssa-ccp.c: Likewise.
	* tree-ssa-coalesce.c: Likewise.
	* tree-ssa-copy.c: Likewise.
	* tree-ssa-copyrename.c: Likewise.
	* tree-ssa-dce.c: Likewise.
	* tree-ssa-dom.c: Likewise.
	* tree-ssa-dse.c: Likewise.
	* tree-ssa-forwprop.c: Likewise.
	* tree-ssa-ifcombine.c: Likewise.
	* tree-ssa-live.c: Likewise.
	* tree-ssa-loop.c: Likewise.
	* tree-ssa-loop-ch.c: Likewise.
	* tree-ssa-loop-im.c: Likewise.
	* tree-ssa-loop-ivcanon.c: Likewise.
	* tree-ssa-loop-ivopts.c: Likewise.
	* tree-ssa-loop-manip.c: Likewise.
	* tree-ssa-loop-niter.c: Likewise.
	* tree-ssa-loop-prefetch.c: Likewise.
	* tree-ssa-loop-unswitch.c: Likewise.
	* tree-ssa-math-opts.c: Likewise.
	* tree-ssanames.c: Likewise.
	* tree-ssa-operands.c: Likewise.
	* tree-ssa-phiopt.c: Likewise.
	* tree-ssa-phiprop.c: Likewise.
	* tree-ssa-pre.c: Likewise.
	* tree-ssa-propagate.c: Likewise.
	* tree-ssa-reassoc.c: Likewise.
	* tree-ssa-sccvn.c: Likewise.
	* tree-ssa-sink.c: Likewise.
	* tree-ssa-strlen.c: Likewise.
	* tree-ssa-structalias.c: Likewise.
	* tree-ssa-tail-merge.c: Likewise.
	* tree-ssa-ter.c: Likewise.
	* tree-ssa-threadedge.c: Likewise.
	* tree-ssa-threadupdate.c: Likewise.
	* tree-ssa-uncprop.c: Likewise.
	* tree-ssa-uninit.c: Likewise.
	* tree-stdarg.c: Likewise.
	* tree-streamer.c: Likewise.
	* tree-streamer-in.c: Likewise.
	* tree-streamer-out.c: Likewise.
	* tree-switch-conversion.c: Likewise.
	* tree-tailcall.c: Likewise.
	* tree-vect-data-refs.c: Likewise.
	* tree-vect-generic.c: Likewise.
	* tree-vect-loop.c: Likewise.
	* tree-vect-loop-manip.c: Likewise.
	* tree-vectorizer.c: Likewise.
	* tree-vect-patterns.c: Likewise.
	* tree-vect-slp.c: Likewise.
	* tree-vect-stmts.c: Likewise.
	* tree-vrp.c: Likewise.
	* tsan.c: Likewise.
	* ubsan.c: Likewise.
	* value-prof.c: Likewise.
	* varpool.c: Likewise.
	* var-tracking.c: Likewise.
	* vtable-verify.c: Likewise.

	* ada/gcc-interface/trans.c: Add required include files from gimple.h.

	* c/c-typeck.c: Add required include files from gimple.h.

	* c-family/c-common.c: Add required include files from gimple.h.
	* c-family/c-gimplify.c: Likewise
	* c-family/cilk.c: Likewise

	* cp/class.c: Add required include files from gimple.h.
	* cp/cp-gimplify.c: Likewise
	* cp/decl2.c: Likewise
	* cp/init.c: Likewise
	* cp/optimize.c: Likewise
	* cp/pt.c: Likewise
	* cp/semantics.c: Likewise
	* cp/tree.c: Likewise
	* cp/typeck.c: Likewise
	* cp/vtable-class-hierarchy.c: Likewise

	* fortran/trans.c: Add required include files from gimple.h.
	* fortran/trans-expr.c: Likewise
	* fortran/trans-openmp.c: Likewise

	* go/gofrontend/expressions.cc: Add required include files from
	gimple.h.
	* go/gofrontend/gogo-tree.cc: Likewise
	* go/gofrontend/types.cc: Likewise
	* go/go-gcc.cc: Likewise
	* go/go-lang.c: Likewise

	* java/java-gimplify.c: Add required include files from gimple.h.

	* lto/lto.c: Add required include files from gimple.h.
	* lto/lto-lang.c: Likewise
	* lto/lto-object.c: Likewise
	* lto/lto-partition.c: Likewise
	* lto/lto-symtab.c: Likewise

	* objc/objc-act.c: Add required include files from gimple.h.

	* config/darwin.c: Add required include files removed from gimple.h.
	* config/aarch64/aarch64-builtins.c: Likewise.
	* config/aarch64/aarch64.c: Likewise.
	* config/alpha/alpha.c: Likewise.
	* config/i386/i386.c: Likewise.
	* config/i386/winnt.c: Likewise.
	* config/ia64/ia64.c: Likewise.
	* config/m32c/m32c.c: Likewise.
	* config/mep/mep.c: Likewise.
	* config/mips/mips.c: Likewise.
	* config/rs6000/rs6000.c: Likewise.
	* config/s390/s390.c: Likewise.
	* config/sh/sh.c: Likewise.
	* config/sparc/sparc.c: Likewise.
	* config/spu/spu.c: Likewise.
	* config/stormy16/stormy16.c: Likewise.
	* config/tilegx/tilegx.c: Likewise.
	* config/tilepro/tilepro.c: Likewise.
	* config/xtensa/xtensa.c: Likewise.

	* testsuite/gcc.dg/plugin/finish_unit_plugin.c: Add required include
	files removed from gimple.h.
	* testsuite/gcc.dg/plugin/ggcplug.c: Likewise.
	* testsuite/gcc.dg/plugin/one_time_plugin.c: Likewise.
	* testsuite/gcc.dg/plugin/selfassign.c: Likewise.
	* testsuite/gcc.dg/plugin/start_unit_plugin.c: Likewise.
	* testsuite/g++.dg/plugin/selfassign.c: Likewise.

From-SVN: r205272
2013-11-22 15:58:51 +00:00
Diego Novillo d8a2d370dc Factor unrelated declarations out of tree.h.
This patch applies the rule that functions defined in FOO.c must be
declared in FOO.h. One of the worst offenders in the code base is
tree.h, unsurprisingly.

The patch creates several new headers: attribs.h calls.h fold-const.h
gcc-symtab.h print-rtl.h print-tree.h stmt.h stor-layout.h stringpool.h
tree-nested.h tree-object-size.h varasm.h.

Functions in each corresponding .c file got moved to those headers and
others that already existed. I wanted to make this patch as mechanical
as possible, so I made no attempt to fix problems like having
build_addr defined in tree-inline.c. I left that for later.

There were some declarations that I could not move out of tree.h
because of header poisoning or the use of target macros. We forbid the
inclusion of things like expr.h from FE files. While that's a
reasonable idea, the FE file *still* manage to at expr.c functionality
because the declarations they want to use were defined in tree.h.

The affected files are builtins.h, emit-rtl.h and expr.h.

If that functionality is allowed to be accessed from the FEs,
then I will later move those functions out of expr.c into tree.c.
I have moved these declarations to the bottom of tree.h so they
are easy to identify later.

There is a namespace collision with libcpp. The file gcc/symtab.c
cannot use gcc/symtab.h because the #include command picks up
libcpp/include/symtab.h first. So I named this file gcc-symtab.h
for now.

Finally, I added a new header to PLUGIN_HEADERS to account for the
tree.h refactoring. I did not add all headers factored out of tree.h
because it is unclear (and impossible to tell) what plugins need.
This adds the one header used by the plugins in the testsuite.

This will be changing quite dramatically as we progress with the header
refactoring.

This patch should offer some minimal incremental build advantages
by reducing the size of tree.h. Changes that would otherwise
affected tree.h, will now go to other headers which are less
frequently included.

	* tree.h: Include fold-const.h.
	(aggregate_value_p): Moved to function.h.
	(alloca_call_p): Moved to calls.h.
	(allocate_struct_function): Moved to function.h.
	(apply_tm_attr): Moved to attribs.h.
	(array_at_struct_end_p): Moved to expr.h.
	(array_ref_element_size): Moved to tree-dfa.h.
	(array_ref_low_bound): Moved to tree-dfa.h.
	(array_ref_up_bound): Moved to tree.h.
	(assemble_alias): Moved to cgraph.h.
	(bit_from_pos): Moved to stor-layout.h.
	(build_addr): Moved to tree-nested.h.
	(build_duplicate_type): Moved to tree-inline.h.
	(build_fold_addr_expr): Moved to fold-const.h.
	(build_fold_addr_expr_with_type): Moved to fold-const.h.
	(build_fold_addr_expr_with_type_loc): Moved to fold-const.h.
	(build_fold_indirect_ref): Moved to fold-const.h.
	(build_fold_indirect_ref_loc): Moved to fold-const.h.
	(build_personality_function): Moved to tree.h.
	(build_range_check): Moved to fold-const.h.
	(build_simple_mem_ref): Moved to fold-const.h.
	(build_simple_mem_ref_loc): Moved to fold-const.h.
	(build_tm_abort_call): Moved to trans-mem.h.
	(byte_from_pos): Moved to stor-layout.h.
	(call_expr_flags): Moved to calls.h.
	(can_move_by_pieces): Moved to expr.h.
	(categorize_ctor_elements): Moved to expr.h.
	(change_decl_assembler_name): Moved to gcc-symtab.h.
	(combine_comparisons): Moved to fold-const.h.
	(complete_ctor_at_level_p): Moved to tree.h.
	(component_ref_field_offset): Moved to tree-dfa.h.
	(compute_builtin_object_size): Moved to tree-object-size.h.
	(compute_record_mode): Moved to stor-layout.h.
	(constant_boolean_node): Moved to fold-const.h.
	(constructor_static_from_elts_p): Moved to varasm.h.
	(cxx11_attribute_p): Moved to attribs.h.
	(debug_body): Moved to print-tree.h.
	(debug_find_tree): Moved to tree-inline.h.
	(debug_fold_checksum): Moved to fold-const.h.
	(debug_head): Moved to print-tree.h.
	(debug_head): Moved to print-tree.h.
	(debug_raw): Moved to print-tree.h.
	(debug_tree): Moved to print-tree.h.
	(debug_vec_tree): Moved to print-tree.h.
	(debug_verbose): Moved to print-tree.h.
	(debug_verbose): Moved to print-tree.h.
	(decl_attributes): Moved to attribs.h.
	(decl_binds_to_current_def_p): Moved to varasm.h.
	(decl_default_tls_model): Moved to varasm.h.
	(decl_replaceable_p): Moved to varasm.h.
	(div_if_zero_remainder): Moved to fold-const.h.
	(double_int mem_ref_offset): Moved to fold-const.h.
	(dump_addr): Moved to print-tree.h.
	(element_precision): Moved to machmode.h.
	(expand_dummy_function_end): Moved to function.h.
	(expand_function_end): Moved to function.h.
	(expand_function_start): Moved to function.h.
	(expand_label): Moved to stmt.h.
	(expr_first): Moved to tree-iterator.h.
	(expr_last): Moved to tree-iterator.h.
	(finalize_size_functions): Moved to stor-layout.h.
	(finish_builtin_struct): Moved to stor-layout.h.
	(finish_record_layout): Moved to stor-layout.h.
	(fixup_signed_type): Moved to stor-layout.h.
	(fixup_unsigned_type): Moved to stor-layout.h.
	(flags_from_decl_or_type): Moved to calls.h.
	(fold): Moved to fold-const.h.
	(fold_abs_const): Moved to fold-const.h.
	(fold_binary): Moved to fold-const.h.
	(fold_binary_loc): Moved to fold-const.h.
	(fold_binary_to_constant): Moved to fold-const.h.
	(fold_build1): Moved to fold-const.h.
	(fold_build1_initializer_loc): Moved to fold-const.h.
	(fold_build1_loc): Moved to fold-const.h.
	(fold_build1_stat_loc): Moved to fold-const.h.
	(fold_build2): Moved to fold-const.h.
	(fold_build2_initializer_loc): Moved to fold-const.h.
	(fold_build2_loc): Moved to fold-const.h.
	(fold_build2_stat_loc): Moved to fold-const.h.
	(fold_build3): Moved to fold-const.h.
	(fold_build3_loc): Moved to fold-const.h.
	(fold_build3_stat_loc): Moved to fold-const.h.
	(fold_build_call_array): Moved to fold-const.h.
	(fold_build_call_array_initializer): Moved to fold-const.h.
	(fold_build_call_array_initializer_loc): Moved to fold-const.h.
	(fold_build_call_array_loc): Moved to fold-const.h.
	(fold_build_cleanup_point_expr): Moved to fold-const.h.
	(fold_convert): Moved to fold-const.h.
	(fold_convert_loc): Moved to fold-const.h.
	(fold_convertible_p): Moved to fold-const.h.
	(fold_defer_overflow_warnings): Moved to fold-const.h.
	(fold_deferring_overflow_warnings_p): Moved to fold-const.h.
	(fold_fma): Moved to fold-const.h.
	(fold_ignored_result): Moved to fold-const.h.
	(fold_indirect_ref): Moved to fold-const.h.
	(fold_indirect_ref_1): Moved to fold-const.h.
	(fold_indirect_ref_loc): Moved to fold-const.h.
	(fold_read_from_constant_string): Moved to fold-const.h.
	(fold_real_zero_addition_p): Moved to fold-const.h.
	(fold_single_bit_test): Moved to fold-const.h.
	(fold_strip_sign_ops): Moved to fold-const.h.
	(fold_ternary): Moved to fold-const.h.
	(fold_ternary_loc): Moved to fold-const.h.
	(fold_unary): Moved to tree-data-ref.h.
	(fold_unary_ignore_overflow): Moved to fold-const.h.
	(fold_unary_ignore_overflow_loc): Moved to fold-const.h.
	(fold_unary_loc): Moved to fold-const.h.
	(fold_unary_to_constant): Moved to fold-const.h.
	(fold_undefer_and_ignore_overflow_warnings): Moved to fold-const.h.
	(fold_undefer_overflow_warnings): Moved to fold-const.h.
	(folding_initializer): Moved to fold-const.h.
	(free_temp_slots): Moved to function.h.
	(generate_setjmp_warnings): Moved to function.h.
	(get_attribute_name): Moved to attribs.h.
	(get_identifier): Moved to stringpool.h.
	(get_identifier_with_length): Moved to stringpool.h.
	(get_inner_reference): Moved to tree.h.
	(gimple_alloca_call_p): Moved to calls.h.
	(gimplify_parameters): Moved to function.h.
	(highest_pow2_factor): Moved to expr.h.
	(indent_to): Moved to print-tree.h.
	(init_attributes): Moved to attribs.h.
	(init_dummy_function_start): Moved to function.h.
	(init_function_start): Moved to function.h.
	(init_inline_once): Moved to tree-inline.h.
	(init_object_sizes): Moved to tree-object-size.h.
	(init_temp_slots): Moved to function.h.
	(init_tree_optimization_optabs): Moved to optabs.h.
	(initialize_sizetypes): Moved to stor-layout.h.
	(initializer_constant_valid_for_bitfield_p): Moved to varasm.h.
	(initializer_constant_valid_p): Moved to varasm.h.
	(int_const_binop): Moved to fold-const.h.
	(internal_reference_types): Moved to stor-layout.h.
	(invert_tree_comparison): Moved to fold-const.h.
	(invert_truthvalue): Moved to fold-const.h.
	(invert_truthvalue_loc): Moved to fold-const.h.
	(is_tm_ending_fndecl): Moved to trans-mem.h.
	(is_tm_may_cancel_outer): Moved to trans-mem.h.
	(is_tm_pure): Moved to trans-mem.h.
	(is_tm_safe): Moved to trans-mem.h.
	(layout_decl): Moved to stor-layout.h.
	(layout_type): Moved to stor-layout.h.
	(lookup_attribute_spec): Moved to attribs.h.
	(make_accum_type): Moved to stor-layout.h.
	(make_decl_one_only): Moved to varasm.h.
	(make_decl_rtl): Moved to tree.h.
	(make_decl_rtl_for_debug): Moved to varasm.h.
	(make_fract_type): Moved to stor-layout.h.
	(make_or_reuse_sat_signed_accum_type): Moved to stor-layout.h.
	(make_or_reuse_sat_signed_fract_type): Moved to stor-layout.h.
	(make_or_reuse_sat_unsigned_accum_type): Moved to stor-layout.h.
	(make_or_reuse_sat_unsigned_fract_type): Moved to stor-layout.h.
	(make_or_reuse_signed_accum_type): Moved to stor-layout.h.
	(make_or_reuse_signed_fract_type): Moved to stor-layout.h.
	(make_or_reuse_unsigned_accum_type): Moved to stor-layout.h.
	(make_or_reuse_unsigned_fract_type): Moved to stor-layout.h.
	(make_range): Moved to fold-const.h.
	(make_range_step): Moved to fold-const.h.
	(make_sat_signed_accum_type): Moved to stor-layout.h.
	(make_sat_signed_fract_type): Moved to stor-layout.h.
	(make_sat_unsigned_accum_type): Moved to stor-layout.h.
	(make_sat_unsigned_fract_type): Moved to stor-layout.h.
	(make_signed_accum_type): Moved to stor-layout.h.
	(make_signed_fract_type): Moved to stor-layout.h.
	(make_signed_type): Moved to stor-layout.h.
	(make_unsigned_accum_type): Moved to stor-layout.h.
	(make_unsigned_fract_type): Moved to stor-layout.h.
	(make_unsigned_type): Moved to stor-layout.h.
	(mark_decl_referenced): Moved to varasm.h.
	(mark_referenced): Moved to varasm.h.
	(may_negate_without_overflow_p): Moved to fold-const.h.
	(maybe_get_identifier): Moved to stringpool.h.
	(merge_ranges): Moved to fold-const.h.
	(merge_weak): Moved to varasm.h.
	(mode_for_size_tree): Moved to stor-layout.h.
	(multiple_of_p): Moved to fold-const.h.
	(must_pass_in_stack_var_size): Moved to calls.h.
	(must_pass_in_stack_var_size_or_pad): Moved to calls.h.
	(native_encode_expr): Moved to fold-const.h.
	(native_interpret_expr): Moved to fold-const.h.
	(non_lvalue): Moved to fold-const.h.
	(non_lvalue_loc): Moved to fold-const.h.
	(normalize_offset): Moved to stor-layout.h.
	(normalize_rli): Moved to stor-layout.h.
	(notice_global_symbol): Moved to varasm.h.
	(omit_one_operand): Moved to fold-const.h.
	(omit_one_operand_loc): Moved to fold-const.h.
	(omit_two_operands): Moved to fold-const.h.
	(omit_two_operands_loc): Moved to fold-const.h.
	(operand_equal_p): Moved to tree-data-ref.h.
	(parse_input_constraint): Moved to stmt.h.
	(parse_output_constraint): Moved to stmt.h.
	(place_field): Moved to stor-layout.h.
	(pop_function_context): Moved to function.h.
	(pop_temp_slots): Moved to function.h.
	(pos_from_bit): Moved to stor-layout.h.
	(preserve_temp_slots): Moved to function.h.
	(print_node): Moved to print-tree.h.
	(print_node_brief): Moved to print-tree.h.
	(print_rtl): Moved to rtl.h.
	(process_pending_assemble_externals): Moved to varasm.h.
	(ptr_difference_const): Moved to fold-const.h.
	(push_function_context): Moved to function.h.
	(push_struct_function): Moved to function.h.
	(push_temp_slots): Moved to function.h.
	(record_tm_replacement): Moved to trans-mem.h.
	(relayout_decl): Moved to stor-layout.h.
	(resolve_asm_operand_names): Moved to stmt.h.
	(resolve_unique_section): Moved to varasm.h.
	(rli_size_so_far): Moved to stor-layout.h.
	(rli_size_unit_so_far): Moved to stor-layout.h.
	(round_down): Moved to fold-const.h.
	(round_down_loc): Moved to fold-const.h.
	(round_up): Moved to fold-const.h.
	(round_up_loc): Moved to fold-const.h.
	(set_decl_incoming_rtl): Moved to emit-rtl.h.
	(set_decl_rtl): Moved to tree.h.
	(set_min_and_max_values_for_integral_type): Moved to stor-layout.h.
	(set_user_assembler_name): Moved to varasm.h.
	(setjmp_call_p): Moved to calls.h.
	(size_binop): Moved to fold-const.h.
	(size_binop_loc): Moved to fold-const.h.
	(size_diffop): Moved to fold-const.h.
	(size_diffop_loc): Moved to fold-const.h.
	(size_int_kind): Moved to fold-const.h.
	(stack_protect_epilogue): Moved to function.h.
	(start_record_layout): Moved to stor-layout.h.
	(supports_one_only): Moved to varasm.h.
	(swap_tree_comparison): Moved to fold-const.h.
	(tm_malloc_replacement): Moved to trans-mem.h.
	(tree build_fold_addr_expr_loc): Moved to fold-const.h.
	(tree build_invariant_address): Moved to fold-const.h.
	(tree_binary_nonnegative_warnv_p): Moved to fold-const.h.
	(tree_binary_nonzero_warnv_p): Moved to fold-const.h.
	(tree_call_nonnegative_warnv_p): Moved to fold-const.h.
	(tree_expr_nonnegative_p): Moved to fold-const.h.
	(tree_expr_nonnegative_warnv_p): Moved to fold-const.h.
	(tree_output_constant_def): Moved to varasm.h.
	(tree_overlaps_hard_reg_set): Moved to stmt.h.
	(tree_single_nonnegative_warnv_p): Moved to fold-const.h.
	(tree_single_nonzero_warnv_p): Moved to fold-const.h.
	(tree_swap_operands_p): Moved to fold-const.h.
	(tree_unary_nonnegative_warnv_p): Moved to fold-const.h.
	(tree_unary_nonzero_warnv_p): Moved to fold-const.h.
	(update_alignment_for_field): Moved to stor-layout.h.
	(use_register_for_decl): Moved to function.h.
	(variable_size): Moved to rtl.h.
	(vector_type_mode): Moved to stor-layout.h.
	* cgraph.h: Corresponding changes.
	* emit-rtl.h: Corresponding changes.
	* expr.h: Corresponding changes.
	* function.h: Corresponding changes.
	* optabs.h: Corresponding changes.
	* trans-mem.h: Corresponding changes.
	Protect against multiple inclusion.
	* tree-inline.h: Corresponding changes.
	* tree-iterator.h: Corresponding changes.
	* tree-dfa.h: Include expr.h.
	* tree-ssanames.h: Include stringpool.h.
	* attribs.h: New file.
	* calls.h: New file.
	* fold-const.h: New file.
	* gcc-symtab.h: New file.
	* print-rtl.h: New file.
	* print-tree.h: New file.
	* stmt.h: New file.
	* stor-layout.h: New file.
	* strinpool.h: New file.
	* tree-nested.h: New file
	* tree-object-size.h: New file.
	* varasm.h: New file.
	* Makefile.in (PLUGIN_HEADERS): Add stringpool.h.

	* alias.c: Include varasm.h.
	Include expr.h.
	* asan.c: Include calls.h.
	Include stor-layout.h.
	Include varasm.h.
	* attribs.c: Include stringpool.h.
	Include attribs.h.
	Include stor-layout.h.
	* builtins.c: Include stringpool.h.
	Include stor-layout.h.
	Include calls.h.
	Include varasm.h.
	Include tree-object-size.h.
	* calls.c: Include stor-layout.h.
	Include varasm.h.
	Include stringpool.h.
	Include attribs.h.
	* cfgexpand.c: Include stringpool.h.
	Include varasm.h.
	Include stor-layout.h.
	Include stmt.h.
	Include print-tree.h.
	* cgraph.c: Include varasm.h.
	Include calls.h.
	Include print-tree.h.
	* cgraphclones.c: Include stringpool.h.
	Include function.h.
	Include emit-rtl.h.
	Move inclusion of rtl.h earlier in the file.
	* cgraphunit.c: Include varasm.h.
	Include stor-layout.h.
	Include stringpool.h.
	* cilk-common.c: Include stringpool.h.
	Include stor-layout.h.
	* combine.c: Include stor-layout.h.
	* config/aarch64/aarch64-builtins.c: Include stor-layout.h.
	Include stringpool.h.
	Include calls.h.
	* config/aarch64/aarch64.c: Include stringpool.h.
	Include stor-layout.h.
	Include calls.h.
	Include varasm.h.
	* config/alpha/alpha.c: Include stor-layout.h.
	Include calls.h.
	Include varasm.h.
	* config/arc/arc.c: Include varasm.h.
	Include stor-layout.h.
	Include stringpool.h.
	Include calls.h.
	* config/arm/arm.c: Include stringpool.h.
	Include stor-layout.h.
	Include calls.h.
	Include varasm.h.
	* config/avr/avr-c.c: Include stor-layout.h.
	* config/avr/avr-log.c: Include print-tree.h.
	* config/avr/avr.c: Include print-tree.h.
	Include calls.h.
	Include stor-layout.h.
	Include stringpool.h.
	* config/bfin/bfin.c: Include varasm.h.
	Include calls.h.
	* config/c6x/c6x.c: Include stor-layout.h.
	Include varasm.h.
	Include calls.h.
	Include stringpool.h.
	* config/cr16/cr16.c: Include stor-layout.h.
	Include calls.h.
	* config/cris/cris.c: Include varasm.h.
	Include stor-layout.h.
	Include calls.h.
	Include stmt.h.
	* config/darwin.c: Include stringpool.h.
	Include varasm.h.
	Include stor-layout.h.
	* config/epiphany/epiphany.c: Include stor-layout.h.
	Include varasm.h.
	Include calls.h.
	Include stringpool.h.
	* config/fr30/fr30.c: Include stor-layout.h.
	Include varasm.h.
	* config/frv/frv.c: Include varasm.h.
	Include stor-layout.h.
	Include stringpool.h.
	* config/h8300/h8300.c: Include stor-layout.h.
	Include varasm.h.
	Include calls.h.
	Include stringpool.h.
	* config/i386/i386.c: Include stringpool.h.
	Include attribs.h.
	Include calls.h.
	Include stor-layout.h.
	Include varasm.h.
	* config/i386/winnt-cxx.c: Include stringpool.h.
	Include attribs.h.
	* config/i386/winnt.c: Include stringpool.h.
	Include varasm.h.
	* config/ia64/ia64-c.c: Include stringpool.h.
	* config/ia64/ia64.c: Include stringpool.h.
	Include stor-layout.h.
	Include calls.h.
	Include varasm.h.
	* config/iq2000/iq2000.c: Include stor-layout.h.
	Include calls.h.
	Include varasm.h.
	* config/lm32/lm32.c: Include calls.h.
	* config/m32c/m32c.c: Include stor-layout.h.
	Include varasm.h.
	Include calls.h.
	* config/m32r/m32r.c: Include stor-layout.h.
	Include varasm.h.
	Include stringpool.h.
	Include calls.h.
	* config/m68k/m68k.c: Include calls.h.
	Include stor-layout.h.
	Include varasm.h.
	* config/mcore/mcore.c: Include stor-layout.h.
	Include varasm.h.
	Include stringpool.h.
	Include calls.h.
	* config/mep/mep.c: Include varasm.h.
	Include calls.h.
	Include stringpool.h.
	Include stor-layout.h.
	* config/microblaze/microblaze.c: Include varasm.h.
	Include stor-layout.h.
	Include calls.h.
	* config/mips/mips.c: Include varasm.h.
	Include stringpool.h.
	Include stor-layout.h.
	Include calls.h.
	* config/mmix/mmix.c: Include varasm.h.
	Include stor-layout.h.
	Include calls.h.
	* config/mn10300/mn10300.c: Include stor-layout.h.
	Include varasm.h.
	Include calls.h.
	* config/moxie/moxie.c: Include stor-layout.h.
	Include varasm.h.
	Include calls.h.
	* config/msp430/msp430.c: Include stor-layout.h.
	Include calls.h.
	* config/nds32/nds32.c: Include stor-layout.h.
	Include varasm.h.
	Include calls.h.
	* config/pa/pa.c: Include stor-layout.h.
	Include stringpool.h.
	Include varasm.h.
	Include calls.h.
	* config/pdp11/pdp11.c: Include stor-layout.h.
	Include varasm.h.
	Include calls.h.
	* config/picochip/picochip.c: Include calls.h.
	Include stor-layout.h.
	Include stringpool.h.
	Include varasm.h.
	* config/rl78/rl78.c: Include varasm.h.
	Include stor-layout.h.
	Include calls.h.
	* config/rs6000/rs6000-c.c: Include stor-layout.h.
	Include stringpool.h.
	* config/rs6000/rs6000.c: Include stringpool.h.
	Include stor-layout.h.
	Include calls.h.
	Include print-tree.h.
	Include varasm.h.
	* config/rx/rx.c: Include varasm.h.
	Include stor-layout.h.
	Include calls.h.
	* config/s390/s390.c: Include print-tree.h.
	Include stringpool.h.
	Include stor-layout.h.
	Include varasm.h.
	Include calls.h.
	* config/score/score.c: Include stringpool.h.
	Include calls.h.
	Include varasm.h.
	Include stor-layout.h.
	* config/sh/sh-c.c: Include stringpool.h.
	Include attribs.h.h.
	* config/sh/sh.c: Include stringpool.h.
	Include stor-layout.h.
	Include calls.h.
	Include varasm.h.
	* config/sol2-c.c: Include stringpool.h.
	Include attribs.h.
	* config/sol2-cxx.c: Include stringpool.h.
	* config/sol2.c: Include stringpool.h.
	Include varasm.h.
	* config/sparc/sparc.c: Include stringpool.h.
	Include stor-layout.h.
	Include calls.h.
	Include varasm.h.
	* config/spu/spu-c.c: Include stringpool.h.
	* config/spu/spu.c: Include stringpool.h.
	Include stor-layout.h.
	Include calls.h.
	Include varasm.h.
	* config/stormy16/stormy16.c: Include stringpool.h.
	Include stor-layout.h.
	Include varasm.h.
	Include calls.h.
	* config/tilegx/tilegx.c: Include stringpool.h.
	Include stor-layout.h.
	Include varasm.h.
	Include calls.h.
	* config/tilepro/tilepro.c: Include stringpool.h.
	Include stor-layout.h.
	Include varasm.h.
	Include calls.h.
	* config/v850/v850-c.c: Include stringpool.h.
	Include attribs.h.
	* config/v850/v850.c: Include stringpool.h.
	Include stor-layout.h.
	Include varasm.h.
	Include calls.h.
	* config/vax/vax.c: Include calls.h.
	Include varasm.h.
	* config/vms/vms.c: Include stringpool.h.
	* config/vxworks.c: Include stringpool.h.
	* config/xtensa/xtensa.c: Include stringpool.h.
	Include stor-layout.h.
	Include calls.h.
	Include varasm.h.
	* convert.c: Include stor-layout.h.
	* coverage.c: Include stringpool.h.
	Include stor-layout.h.
	* dbxout.c: Include varasm.h.
	Include stor-layout.h.
	* dojump.c: Include stor-layout.h.
	* dse.c: Include stor-layout.h.
	* dwarf2asm.c: Include stringpool.h.
	Include varasm.h.
	* dwarf2cfi.c: Include stor-layout.h.
	* dwarf2out.c: Include rtl.h.
	Include stringpool.h.
	Include stor-layout.h.
	Include varasm.h.
	Include function.h.
	Include emit-rtl.h.
	Move inclusion of rtl.h earlier in the file.
	* emit-rtl.c: Include varasm.h.
	* except.c: Include stringpool.h.
	Include stor-layout.h.
	* explow.c: Include stor-layout.h.
	* expmed.c: Include stor-layout.h.
	* expr.c: Include stringpool.h.
	Include stor-layout.h.
	Include attribs.h.
	Include varasm.h.
	* final.c: Include varasm.h.
	* fold-const.c: Include stor-layout.h.
	Include calls.h.
	Include tree-iterator.h.
	* function.c: Include stor-layout.h.
	Include varasm.h.
	Include stringpool.h.
	* genattrtab.c (write_header): Emit includes for varasm.h,
	stor-layout.h and calls.h.
	* genautomata.c (main): Likewise.
	* genemit.c: Likewise.
	* genopinit.c: Likewise.
	* genoutput.c (output_prologue): Likewise.
	* genpeep.c: Likewise.
	* genpreds.c (write_insn_preds_c): Likewise.
	* gengtype.c (open_base_files): Add stringpool.h.
	* gimple-expr.c: Include stringpool.h.
	Include stor-layout.h.
	* gimple-fold.c: Include stringpool.h.
	Include expr.h.
	Include stmt.h.
	Include stor-layout.h.
	* gimple-low.c: Include tree-nested.h.
	Include calls.h.
	* gimple-pretty-print.c: Include stringpool.h.
	* gimple-ssa-strength-reduction.c: Include stor-layout.h.
	Include expr.h.
	* gimple-walk.c: Include stmt.h.
	* gimple.c: Include calls.h.
	Include stmt.h.
	Include stor-layout.h.
	* gimplify.c: Include stringpool.h.
	Include calls.h.
	Include varasm.h.
	Include stor-layout.h.
	Include stmt.h.
	Include print-tree.h.
	Include expr.h.
	* gimplify-me.c: Include stmt.h
	Include stor-layout.h
	* internal-fn.c: Include stor-layout.h.
	* ipa-devirt.c: Include print-tree.h.
	Include calls.h.
	* ipa-inline-analysis.c: Include stor-layout.h.
	Include stringpool.h.
	Include print-tree.h.
	* ipa-inline.c: Include trans-mem.h.
	Include calls.h.
	* ipa-prop.c: Include expr.h.
	Include stor-layout.h.
	Include print-tree.h.
	* ipa-pure-const.c: Include print-tree.h.
	Include calls.h.
	* ipa-reference.c: Include calls.h.
	* ipa-split.c: Include stringpool.h.
	Include expr.h.
	Include calls.h.
	* ipa.c: Include calls.h.
	Include stringpool.h.
	* langhooks.c: Include stringpool.h.
	Include attribs.h.
	* lto-cgraph.c: Include stringpool.h.
	* lto-streamer-in.c: Include stringpool.h.
	* lto-streamer-out.c: Include stor-layout.h.
	Include stringpool.h.
	* omp-low.c: Include stringpool.h.
	Include stor-layout.h.
	Include expr.h.
	* optabs.c: Include stor-layout.h.
	Include stringpool.h.
	Include varasm.h.
	* passes.c: Include varasm.h.
	* predict.c: Include calls.h.
	* print-rtl.c: Include print-tree.h.
	* print-tree.c: Include varasm.h.
	Include print-rtl.h.
	Include stor-layout.h.
	* realmpfr.c: Include stor-layout.h.
	* reg-stack.c: Include varasm.h.
	* sdbout.c: Include varasm.h.
	Include stor-layout.h.
	* simplify-rtx.c: Include varasm.h.
	* stmt.c: Include varasm.h.
	Include stor-layout.h.
	* stor-layout.c: Include stor-layout.h.
	Include stringpool.h.
	Include varasm.h.
	Include print-tree.h.
	* symtab.c: Include rtl.h.
	Include print-tree.h.
	Include varasm.h.
	Include function.h.
	Include emit-rtl.h.
	* targhooks.c: Include stor-layout.h.
	Include varasm.h.
	* toplev.c: Include varasm.h.
	Include tree-inline.h.
	* trans-mem.c: Include calls.h.
	Include function.h.
	Include rtl.h.
	Include emit-rtl.h.
	* tree-affine.c: Include expr.h.
	* tree-browser.c: Include print-tree.h.
	* tree-call-cdce.c: Include stor-layout.h.
	* tree-cfg.c: Include trans-mem.h.
	Include stor-layout.h.
	Include print-tree.h.
	* tree-complex.c: Include stor-layout.h.
	* tree-data-ref.c: Include expr.h.
	* tree-dfa.c: Include stor-layout.h.
	* tree-eh.c: Include expr.h.
	Include calls.h.
	* tree-emutls.c: Include stor-layout.h.
	Include varasm.h.
	* tree-if-conv.c: Include stor-layout.h.
	* tree-inline.c: Include stor-layout.h.
	Include calls.h.
	* tree-loop-distribution.c: Include stor-layout.h.
	* tree-nested.c: Include stringpool.h.
	Include stor-layout.h.
	* tree-object-size.c: Include tree-object-size.h.
	* tree-outof-ssa.c: Include stor-layout.h.
	* tree-parloops.c: Include stor-layout.h.
	Include tree-nested.h.
	* tree-pretty-print.c: Include stor-layout.h.
	Include expr.h.
	* tree-profile.c: Include varasm.h.
	Include tree-nested.h.
	* tree-scalar-evolution.c: Include expr.h.
	* tree-sra.c: Include stor-layout.h.
	* tree-ssa-address.c: Include stor-layout.h.
	* tree-ssa-ccp.c: Include stor-layout.h.
	* tree-ssa-dce.c: Include calls.h.
	* tree-ssa-dom.c: Include stor-layout.h.
	* tree-ssa-forwprop.c: Include stor-layout.h.
	* tree-ssa-ifcombine.c: Include stor-layout.h.
	* tree-ssa-loop-ivopts.c: Include stor-layout.h.
	* tree-ssa-loop-niter.c: Include calls.h.
	Include expr.h.
	* tree-ssa-loop-prefetch.c: Include stor-layout.h.
	* tree-ssa-math-opts.c: Include stor-layout.h.
	* tree-ssa-operands.c: Include stmt.h.
	Include print-tree.h.
	* tree-ssa-phiopt.c: Include stor-layout.h.
	* tree-ssa-reassoc.c: Include stor-layout.h.
	* tree-ssa-sccvn.c: Include stor-layout.h.
	* tree-ssa-sink.c: Include stor-layout.h.
	* tree-ssa-strlen.c: Include stor-layout.h.
	* tree-ssa-structalias.c: Include stor-layout.h.
	Include stmt.h.
	* tree-ssa-tail-merge.c: Include stor-layout.h.
	Include trans-mem.h.
	* tree-ssa-uncprop.c: Include stor-layout.h.
	* tree-ssa.c: Include stor-layout.h.
	* tree-ssanames.c: Include stor-layout.h.
	* tree-streamer-in.c: Include stringpool.h.
	* tree-streamer-out.c: Include stor-layout.h.
	* tree-switch-conversion.c: Include varasm.h.
	Include stor-layout.h.
	* tree-tailcall.c: Include stor-layout.h.
	* tree-vect-data-refs.c: Include stor-layout.h.
	* tree-vect-generic.c: Include stor-layout.h.
	* tree-vect-loop.c: Include stor-layout.h.
	* tree-vect-patterns.c: Include stor-layout.h.
	* tree-vect-slp.c: Include stor-layout.h.
	* tree-vect-stmts.c: Include stor-layout.h.
	* tree-vectorizer.c: Include stor-layout.h.
	* tree-vrp.c: Include stor-layout.h.
	Include calls.h.
	* tree.c: Include stor-layout.h.
	Include calls.h.
	Include attribs.h.
	Include varasm.h.
	* tsan.c: Include expr.h.
	* ubsan.c: Include stor-layout.h.
	Include stringpool.h.
	* value-prof.c: Include tree-nested.h.
	Include calls.h.
	* var-tracking.c: Include varasm.h.
	Include stor-layout.h.
	* varasm.c: Include stor-layout.h.
	Include stringpool.h.
	Include gcc-symtab.h.
	Include varasm.h.
	* varpool.c: Include varasm.h.
	* vmsdbgout.c: Include varasm.h.
	* xcoffout.c: Include varasm.h.

ada/ChangeLog

	* gcc-interface/decl.c: Include stringpool.h
	Include stor-layout.h
	* gcc-interface/misc.c: Include stor-layout.h
	Include print-tree.h
	* gcc-interface/trans.c: Include stringpool.h
	Include stor-layout.h
	Include stmt.h
	Include varasm.h
	* gcc-interface/utils.c: Include stringpool.h
	Include stor-layout.h
	Include attribs.h
	Include varasm.h
	* gcc-interface/utils2.c: Include stringpool.h
	Include stor-layout.h
	Include attribs.h
	Include varasm.h

c-family/ChangeLog

	* c-common.c: Include fold-const.h.
	Include stor-layout.h.
	Include calls.h.
	Include stringpool.h.
	Include attribs.h.
	Include varasm.h.
	Include trans-mem.h.
	* c-cppbuiltin.c: Include stor-layout.h.
	Include stringpool.h.
	* c-format.c: Include stringpool.h.
	* c-lex.c: Include stringpool.h.
	Include stor-layout.h.
	* c-pragma.c: Include stringpool.h.
	Include attribs.h.
	Include varasm.h.
	Include gcc-symtab.h.
	* c-pretty-print.c: Include stor-layout.h.
	Include attribs.h.
	* cilk.c: Include stringpool.h.
	Include calls.h.

c/ChangeLog

	* c-decl.c: Include print-tree.h.
	Include stor-layout.h.
	Include varasm.h.
	Include attribs.h.
	Include stringpool.h.
	* c-lang.c: Include fold-const.h.
	* c-parser.c: Include stringpool.h.
	Include attribs.h.
	Include stor-layout.h.
	Include varasm.h.
	Include trans-mem.h.
	* c-typeck.c: Include stor-layout.h.
	Include trans-mem.h.
	Include varasm.h.
	Include stmt.h.

cp/ChangeLog

	* call.c: Include stor-layout.h.
	Include trans-mem.h.
	Include stringpool.h.
	* class.c: Include stringpool.h.
	Include stor-layout.h.
	Include attribs.h.
	* cp-gimplify.c: Include stor-layout.h.
	* cvt.c: Include stor-layout.h.
	* decl.c: Include stringpool.h.
	Include stor-layout.h.
	Include varasm.h.
	Include attribs.h.
	Include calls.h.
	* decl2.c: Include stringpool.h.
	Include varasm.h.
	Include attribs.h.
	Include stor-layout.h.
	Include calls.h.
	* error.c: Include stringpool.h.
	* except.c: Include stringpool.h.
	Include trans-mem.h.
	Include attribs.h.
	* init.c: Include stringpool.h.
	Include varasm.h.
	* lambda.c: Include stringpool.h.
	* lex.c: Include stringpool.h.
	* mangle.c: Include stor-layout.h.
	Include stringpool.h.
	* method.c: Include stringpool.h.
	Include varasm.h.
	* name-lookup.c: Include stringpool.h.
	Include print-tree.h.
	Include attribs.h.
	* optimize.c: Include stringpool.h.
	* parser.c: Include print-tree.h.
	Include stringpool.h.
	Include attribs.h.
	Include trans-mem.h.
	* pt.c: Include stringpool.h.
	Include varasm.h.
	Include attribs.h.
	Include stor-layout.h.
	* ptree.c: Include print-tree.h.
	* repo.c: Include stringpool.h.
	* rtti.c: Include stringpool.h.
	Include stor-layout.h.
	* semantics.c: Include stmt.h.
	Include varasm.h.
	Include stor-layout.h.
	Include stringpool.h.
	* tree.c: Include stor-layout.h.
	Include print-tree.h.
	Include tree-iterator.h.
	* typeck.c: Include stor-layout.h.
	Include varasm.h.
	* typeck2.c: Include stor-layout.h.
	Include varasm.h.
	* vtable-class-hierarchy.c: Include stringpool.h.
	Include stor-layout.h.

fortran/ChangeLog

	* decl.c: Include stringpool.h.
	* iresolve.c: Include stringpool.h.
	* match.c: Include stringpool.h.
	* module.c: Include stringpool.h.
	* target-memory.c: Include stor-layout.h.
	* trans-common.c: Include stringpool.h.
	Include stor-layout.h.
	Include varasm.h.
	* trans-const.c: Include stor-layout.h.
	* trans-decl.c: Include stringpool.h.
	Include stor-layout.h.
	Include varasm.h.
	Include attribs.h.
	* trans-expr.c: Include stringpool.h.
	* trans-intrinsic.c: Include stringpool.h.
	Include tree-nested.h.
	Include stor-layout.h.
	* trans-io.c: Include stringpool.h.
	Include stor-layout.h.
	* trans-openmp.c: Include stringpool.h.
	* trans-stmt.c: Include stringpool.h.
	* trans-types.c: Include stor-layout.h.
	Include stringpool.h.
	* trans.c: Include stringpool.h.

go/ChangeLog

	* go-backend.c: Include stor-layout.h.
	* go-gcc.cc: Include stringpool.h.
	Include stor-layout.h.
	Include varasm.h.
	* go-lang.c: Include stor-layout.h.

java/ChangeLog

	* builtins.c: Include stor-layout.h.
	Include stringpool.h.
	* class.c: Include stringpool.h.
	Include stor-layout.h.
	Include varasm.h.
	* constants.c: Include stringpool.h.
	Include stor-layout.h.
	* decl.c: Include stor-layout.h.
	Include stringpool.h.
	Include varasm.h.
	* except.c: Include stringpool.h.
	Include stor-layout.h.
	* expr.c: Include stringpool.h.
	Include stor-layout.h.
	* jcf-parse.c: Include stringpool.h.
	* mangle.c: Include stringpool.h.
	* resource.c: Include stringpool.h.
	Include stor-layout.h.
	* typeck.c: Include stor-layout.h.
	Include stringpool.h.
	* verify-glue.c: Include stringpool.h.

lto/ChangeLog
	* lto-lang.c: Include stringpool.h.
	Include stor-layout.h.
	* lto-partition.c: Include gcc-symtab.h.
	* lto.c: Include stor-layout.h.

objc/ChangeLog
	* objc-act.c: Include stringpool.h.
	Include stor-layout.h.
	Include attribs.h.
	* objc-encoding.c: Include stringpool.h.
	Include stor-layout.h.
	* objc-gnu-runtime-abi-01.c: Include stringpool.h.
	* objc-next-runtime-abi-01.c:
	Include stringpool.h.
	* objc-next-runtime-abi-02.c: Include stringpool.h.
	* objc-runtime-shared-support.c: Include stringpool.h.

testsuite/ChangeLog

	* gcc.dg/plugin/selfassign.c: Include stringpool.h.
	* gcc.dg/plugin/start_unit_plugin.c: Likewise.

From-SVN: r205023
2013-11-19 07:31:09 -05:00
Richard Sandiford ae7e9dddb8 decl.c, [...]: Replace tree_low_cst (..., 1) with tree_to_uhwi throughout.
gcc/ada/
	* gcc-interface/decl.c, gcc-interface/utils.c, gcc-interface/utils2.c:
	Replace tree_low_cst (..., 1) with tree_to_uhwi throughout.

gcc/c-family/
	* c-common.c, c-cppbuiltin.c: Replace tree_low_cst (..., 1) with
	tree_to_uhwi throughout.

gcc/c/
	* c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
	tree_to_uhwi throughout.

gcc/cp/
	* call.c, class.c, decl.c, error.c: Replace tree_low_cst (..., 1) with
	tree_to_uhwi throughout.

gcc/objc/
	* objc-encoding.c: Replace tree_low_cst (..., 1) with tree_to_uhwi
	throughout.

gcc/
	* alias.c, asan.c, builtins.c, cfgexpand.c, cgraph.c,
	config/aarch64/aarch64.c, config/alpha/predicates.md,
	config/arm/arm.c, config/darwin.c, config/epiphany/epiphany.c,
	config/i386/i386.c, config/iq2000/iq2000.c, config/m32c/m32c-pragma.c,
	config/mep/mep-pragma.c, config/mips/mips.c,
	config/picochip/picochip.c, config/rs6000/rs6000.c, cppbuiltin.c,
	dbxout.c, dwarf2out.c, emit-rtl.c, except.c, expr.c, fold-const.c,
	function.c, gimple-fold.c, godump.c, ipa-cp.c, ipa-prop.c, omp-low.c,
	predict.c, sdbout.c, stor-layout.c, trans-mem.c, tree-object-size.c,
	tree-sra.c, tree-ssa-ccp.c, tree-ssa-forwprop.c,
	tree-ssa-loop-ivcanon.c, tree-ssa-loop-ivopts.c, tree-ssa-loop-niter.c,
	tree-ssa-loop-prefetch.c, tree-ssa-strlen.c, tree-stdarg.c,
	tree-switch-conversion.c, tree-vect-generic.c, tree-vect-loop.c,
	tree-vect-patterns.c, tree-vrp.c, tree.c, tsan.c, ubsan.c, varasm.c:
	Replace tree_low_cst (..., 1) with tree_to_uhwi throughout.

From-SVN: r204961
2013-11-18 14:52:19 +00:00
Richard Sandiford 9439e9a1a4 c-common.c, [...]: Replace tree_low_cst (..., 0) with tree_to_shwi throughout.
gcc/c-family/
	* c-common.c, c-format.c, c-omp.c, c-pretty-print.c: Replace
	tree_low_cst (..., 0) with tree_to_shwi throughout.

gcc/c/
	* c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
	throughout.

gcc/cp/
	* class.c, dump.c, error.c, init.c, method.c, parser.c, semantics.c:
	Replace tree_low_cst (..., 0) with tree_to_shwi throughout.

gcc/go/
	* gofrontend/expressions.cc: Replace tree_low_cst (..., 0) with
	tree_to_shwi throughout.

gcc/java/
	* class.c, expr.c: Replace tree_low_cst (..., 0) with tree_to_shwi
	throughout.

gcc/objc/
	* objc-next-runtime-abi-02.c: Replace tree_low_cst (..., 0) with
	tree_to_shwi throughout.

gcc/
	* builtins.c, cilk-common.c, config/aarch64/aarch64.c,
	config/alpha/alpha.c, config/arm/arm.c, config/c6x/predicates.md,
	config/i386/i386.c, config/ia64/predicates.md, config/s390/s390.c,
	coverage.c, dbxout.c, dwarf2out.c, except.c, explow.c, expr.c, expr.h,
	fold-const.c, gimple-fold.c, godump.c, ipa-prop.c, omp-low.c,
	predict.c, rtlanal.c, sdbout.c, stmt.c, stor-layout.c, targhooks.c,
	tree-cfg.c, tree-data-ref.c, tree-inline.c, tree-ssa-forwprop.c,
	tree-ssa-loop-prefetch.c, tree-ssa-phiopt.c, tree-ssa-sccvn.c,
	tree-ssa-strlen.c, tree-stdarg.c, tree-vect-data-refs.c,
	tree-vect-patterns.c, tree.c, tree.h, var-tracking.c, varasm.c:
	Replace tree_low_cst (..., 0) with tree_to_shwi throughout.

From-SVN: r204959
2013-11-18 14:52:03 +00:00
Andrew MacLeod 18f429e29c gimplify-be.h: New file.
* gimplify-be.h:  New file.  Add prototypes.
	* gimplify.h: Don't include gimple.h.
	(struct gimplify_hasher, struct gimplify_ctx, is_gimple_sizepos,
	gimplify_hasher::hash, gimplify_hasher::equal): Relocate from gimple.h.
	* gimple.h (struct gimplify_hasher, gimplify_hasher::hash,
	gimplify_hasher::equal, struct gimplify_ctx, is_gimple_sizepos): Move
	to gimplify.h.
	(enum gsi_iterator_update): Move to gimple-iterator.h.
	* gimple-iterator.h (enum gsi_iterator_update): Relocate from gimple.h.
	* gimplify-be.c: New File.
	(force_gimple_operand_1, force_gimple_operand,
	force_gimple_operand_gsi_1, force_gimple_operand_gsi): Relocate from
	gimplify.c.
	* gimplify.c (force_gimple_operand_1, force_gimple_operand,
	force_gimple_operand_gsi_1, force_gimple_operand_gsi): Move to
	gimplify-be.c.
	* Makefile.in (OBJS): Add gimplify-be.o
	* asan.c: Include only gimplify.h, gimplify-be.h, and/or gimple.h as
	required.
	* cfgloopmanip.c: Likewise.
	* cgraphunit.c: Likewise.
	* cilk-common.c: Likewise.
	* fold-const.c: Likewise.
	* function.c: Likewise.
	* gimple-expr.c: Likewise.
	* gimple-fold.c: Likewise.
	* gimple-ssa-strength-reduction.c: Likewise.
	* gimple.c: Likewise.
	* graphite-clast-to-gimple.c: Likewise.
	* graphite-sese-to-poly.c: Likewise.
	* ipa-prop.c: Likewise.
	* ipa-split.c: Likewise.
	* ipa.c: Likewise.
	* langhooks.c: Likewise.
	* omp-low.c: Likewise.
	* sese.c: Likewise.
	* stor-layout.c: Likewise.
	* targhooks.c: Likewise.
	* trans-mem.c: Likewise.
	* tree-affine.c: Likewise.
	* tree-cfg.c: Likewise.
	* tree-cfgcleanup.c: Likewise.
	* tree-complex.c: Likewise.
	* tree-if-conv.c: Likewise.
	* tree-inline.c: Likewise.
	* tree-loop-distribution.c: Likewise.
	* tree-nested.c: Likewise.
	* tree-parloops.c: Likewise.
	* tree-predcom.c: Likewise.
	* tree-profile.c: Likewise.
	* tree-scalar-evolution.c: Likewise.
	* tree-sra.c: Likewise.
	* tree-ssa-address.c: Likewise.
	* tree-ssa-ccp.c: Likewise.
	* tree-ssa-dce.c: Likewise.
	* tree-ssa-forwprop.c: Likewise.
	* tree-ssa-ifcombine.c: Likewise.
	* tree-ssa-loop-im.c: Likewise.
	* tree-ssa-loop-ivopts.c: Likewise.
	* tree-ssa-loop-manip.c: Likewise.
	* tree-ssa-loop-niter.c: Likewise.
	* tree-ssa-loop-prefetch.c: Likewise.
	* tree-ssa-loop-unswitch.c: Likewise.
	* tree-ssa-math-opts.c: Likewise.
	* tree-ssa-phiopt.c: Likewise.
	* tree-ssa-phiprop.c: Likewise.
	* tree-ssa-pre.c: Likewise.
	* tree-ssa-propagate.c: Likewise.
	* tree-ssa-reassoc.c: Likewise.
	* tree-ssa-sccvn.c: Likewise.
	* tree-ssa-strlen.c: Likewise.
	* tree-ssa.c: Likewise.
	* tree-switch-conversion.c: Likewise.
	* tree-tailcall.c: Likewise.
	* tree-vect-data-refs.c: Likewise.
	* tree-vect-generic.c: Likewise.
	* tree-vect-loop-manip.c: Likewise.
	* tree-vect-loop.c: Likewise.
	* tree-vect-patterns.c: Likewise.
	* tree-vect-stmts.c: Likewise.
	* tree.c: Likewise.
	* tsan.c: Likewise.
	* value-prof.c: Likewise.
	* config/aarch64/aarch64.c: Likewise.
	* config/alpha/alpha.c: Likewise.
	* config/darwin.c: Likewise.
	* config/i386/i386.c: Likewise.
	* config/ia64/ia64.c: Likewise.
	* config/mep/mep.c: Likewise.
	* config/mips/mips.c: Likewise.
	* config/rs6000/rs6000.c: Likewise.
	* config/s390/s390.c: Likewise.
	* config/sh/sh.c: Likewise.
	* config/sparc/sparc.c: Likewise.
	* config/spu/spu.c: Likewise.
	* config/stormy16/stormy16.c: Likewise.
	* config/tilegx/tilegx.c: Likewise.
	* config/tilepro/tilepro.c: Likewise.
	* config/xtensa/xtensa.c: Likewise.

	* c/c-typeck.c: Include only gimplify.h and gimple.h as needed.
	* c-family/c-common.c: Likewise.
	* c-family/c-gimplify.c: Likewise.
	* c-family/cilk.c: Likewise.

	* cp/class.c: Include only gimplify.h and gimple.h as needed.
	* cp/cp-gimplify.c: Likewise.
	* cp/error.c: Likewise.
	* cp/init.c: Likewise.
	* cp/optimize.c: Likewise.
	* cp/pt.c: Likewise.
	* cp/semantics.c: Likewise.
	* cp/tree.c: Likewise.
	* cp/vtable-class-hierarchy.c: Likewise.

	* fortran/trans-expr.c: Include only gimplify.h and gimple.h as needed.
	* fortran/trans-openmp.c: Likewise.

	* go/go-lang.c: Include only gimplify.h and gimple.h as needed.

	* java/java-gimplify.c: Include only gimplify.h and gimple.h as needed.

	* objc/objc-act.c: Include only gimplify.h and gimple.h as needed.

From-SVN: r204812
2013-11-14 19:39:38 +00:00
Andrew MacLeod 45b0be94be gimple-expr.h (create_tmp_var_name, [...]): Relocate prototypes from gimple.h.
2013-11-12  Andrew MacLeod  <amacleod@redhat.com>

	* gimple-expr.h (create_tmp_var_name, create_tmp_var_raw,
	create_tmp_var, create_tmp_reg, mark_addressable, is_gimple_reg_rhs):
	Relocate prototypes from gimple.h.
	* gimplify.h: New File.  Relocate some prototypes from gimple.h here.
	(gimple_predicate, enum fallback, enum gimplify_status): Relocate
	from gimple.h.
	* gimple.h: Move some prototypes to gimplify.h.
	(gimple_predicate, enum fallback, enum gimplify_status): Move to
	gimplify.h.
	(gimple_do_not_emit_location_p, gimple_set_do_not_emit_location):
	Relocate from gimpify.c.
	* gimple-expr.c (remove_suffix, tmp_var_id_num, create_tmp_var_name,
	create_tmp_var_raw, create_tmp_var, create_tmp_reg, mark_addressable,
	is_gimple_reg_rhs) Relocate from gimplify.c.
	* gimplify.c (mark_addressable): Move to gimple-expr.c.
	(gimple_seq_add_stmt_without_update): Move to gimple.c.
	(remove_suffix, tmp_var_id_num, create_tmp_var_name, create_tmp_var_raw,
	create_tmp_var, create_tmp_reg, is_gimple_reg_rhs): Move to 
	gimple-expr.c.
	(should_carry_location_p): Move to gimple.c.
	(gimple_do_not_emit_location_p, gimple_set_do_not_emit_location): Move
	to gimple.h.
	(annotate_one_with_location, annotate_all_with_location_after,
	annotate_all_with_location): Move to gimple.c.
	(compare_case_labels, sort_case_labels,
	preprocess_case_label_vec_for_gimple): Move to gimple.c.
	(rhs_predicate_for): Make static.
	(gimplify_assign): Relocate from gimple.c.
	* gimple.c (gimplify_assign): Move to gimplify.c.
	(gimple_seq_add_stmt_without_update, should_carry_location_p,
	annotate_one_with_location, annotate_all_with_location_after,
	annotate_all_with_location, compare_case_labels, sort_case_labels,
	preprocess_case_label_vec_for_gimple): Relocate from gimplify.c.
	* tree.h (unshare_expr, unshare_expr_without_location,
	mark_addressable): Move prototypes to gimplify.h.
	* Makefile.in (GTFILES): gimple-expr.c now has the GTY tag for
	tmp_var_id_num
	* asan.c: Include gimplify.h rather than gimple.h.
	* cfgloopmanip.c: Likewise.
	* cgraphunit.c: Likewise.
	* cilk-common.c: Likewise.
	* dwarf2out.c: Dont include gimple.h.
	* fold-const.c: Include gimplify.h rather than gimple.h.
	* function.c: Likewise.
	* gimple-fold.c: Likewise.
	* gimple-ssa-strength-reduction.c: Likewise.
	* graphite-clast-to-gimple.c: Likewise.
	* graphite-sese-to-poly.c: Likewise.
	* ipa-prop.c: Likewise.
	* ipa-split.c: Likewise.
	* ipa.c: Likewise.
	* langhooks.c: Dont include gimple.h.
	* loop-init.c: Include gimplify.h rather than gimple.h.
	* omp-low.c: Likewise.
	* sese.c: Likewise.
	* stor-layout.c: Likewise.
	* targhooks.c: Likewise.
	* trans-mem.c: Likewise.
	* tree-affine.c: Likewise.
	* tree-cfg.c: Likewise.
	* tree-cfgcleanup.c: Likewise.
	* tree-complex.c: Likewise.
	* tree-if-conv.c: Likewise.
	* tree-inline.c: Likewise.
	* tree-iterator.c: Likewise.
	* tree-loop-distribution.c: Likewise.
	* tree-nested.c: Likewise.
	* tree-parloops.c: Likewise.
	* tree-predcom.c: Likewise.
	* tree-profile.c: Likewise.
	* tree-scalar-evolution.c: Likewise.
	* tree-sra.c: Likewise.
	* tree-ssa-address.c: Likewise.
	* tree-ssa-ccp.c: Likewise.
	* tree-ssa-dce.c: Likewise.
	* tree-ssa-forwprop.c: Likewise.
	* tree-ssa-ifcombine.c: Likewise.
	* tree-ssa-loop-im.c: Likewise.
	* tree-ssa-loop-ivopts.c: Likewise.
	* tree-ssa-loop-manip.c: Likewise.
	* tree-ssa-loop-niter.c: Likewise.
	* tree-ssa-loop-prefetch.c: Likewise.
	* tree-ssa-loop-unswitch.c: Likewise.
	* tree-ssa-math-opts.c: Likewise.
	* tree-ssa-phiopt.c: Likewise.
	* tree-ssa-phiprop.c: Likewise.
	* tree-ssa-pre.c: Likewise.
	* tree-ssa-propagate.c: Likewise.
	* tree-ssa-reassoc.c: Likewise.
	* tree-ssa-sccvn.c: Likewise.
	* tree-ssa-strlen.c: Likewise.
	* tree-ssa.c: Likewise.
	* tree-switch-conversio: Likewise.n.c
	* tree-tailcall.c: Likewise.
	* tree-vect-data-refs.c: Likewise.
	* tree-vect-generic.c: Likewise.
	* tree-vect-loop-manip.c: Likewise.
	* tree-vect-loop.c: Likewise.
	* tree-vect-patterns.c: Likewise.
	* tree-vect-stmts.c: Likewise.
	* tsan.c: Likewise.
	* value-prof.c: Likewise.
	* config/aarch64/aarch64.c: Include gimplify.h instead of gimple.h.
	* config/alpha/alpha.c: Likewise.
	* config/darwin.c: Likewise.
	* config/i386/i386.c: Likewise.
	* config/ia64/ia64.c: Likewise.
	* config/mep/mep.c: Likewise.
	* config/mips/mips.c: Likewise.
	* config/rs6000/rs6000.c: Likewise.
	* config/s390/s390.c: Likewise.
	* config/sh/sh.c: Likewise.
	* config/sparc/sparc.c: Likewise.
	* config/spu/spu.c: Likewise.
	* config/stormy16/stormy16.c: Likewise.
	* config/tilegx/tilegx.c: Likewise.
	* config/tilepro/tilepro.c: Likewise.
	* config/xtensa/xtensa.c: Likewise.

	* ada/gcc-interface/trans.c: Include gimplify.h.

	* c/c-typeck.c: Include gimplify.h.

	* c-family/c-common.c: Include gimplify.h.
	* c-family/c-gimplify.c: Likewise.
	* c-family/cilk.c: Likewise.
	* c-family/c-omp.c: Include gimple-expr.h instead of gimple.h.
	* c-family/c-ubsan.c: Don't include gimple.h.

	* cp/class.c: Include gimplify.h.
	* cp/cp-gimplify.c: Likewise.
	* cp/error.c: Likewise.
	* cp/init.c: Likewise.
	* cp/optimize.c: Likewise.
	* cp/pt.c: Likewise.
	* cp/semantics.c: Likewise.
	* cp/tree.c: Likewise.
	* cp/vtable-class-hierarchy.c: Likewise.
	* cp/decl2.c: Don't include gimple.h.
	* cp/except.c: Likewise.
	* cp/method.c: Include pointer-set.h instead of gimple.h.

	* fortran/f95-lang.c: Don't include gimple.h.
	* fortran/trans-array.c: Include gimple-expr.h instead of gimple.h.
	* fortran/trans.c: Likewise.
	* fortran/trans-decl.c: Likewise.
	* fortran/trans-expr.c: Include gimplify.h.
	* fortran/trans-openmp.c: Likewise.

	* go/go-lang.c: Include gimplify.h.

	* java/java-gimplify.c: Include gimplify.h.

	* objc/objc-act.c: Include gimplify.h.

From-SVN: r204717
2013-11-12 20:26:43 +00:00
Joseph Myers 267bac1078 tree-core.h (enum cv_qualifier): Add TYPE_QUAL_ATOMIC.
gcc:
2013-11-05  Andrew MacLeod  <amacleod@redhat.com>
	    Joseph Myers  <joseph@codesourcery.com>

	* tree-core.h (enum cv_qualifier): Add TYPE_QUAL_ATOMIC.
	(enum tree_index): Add TI_ATOMICQI_TYPE, TI_ATOMICHI_TYPE,
	TI_ATOMICSI_TYPE, TI_ATOMICDI_TYPE and TI_ATOMICTI_TYPE.
	(struct tree_base): Add atomic_flag field.
	* tree.h (TYPE_ATOMIC): New accessor macro.
	(TYPE_QUALS, TYPE_QUALS_NO_ADDR_SPACE): Add TYPE_QUAL_ATOMIC.
	(TYPE_QUALS_NO_ADDR_SPACE_NO_ATOMIC): New macro.
	(atomicQI_type_node, atomicHI_type_node, atomicSI_type_node)
	(atomicDI_type_node, atomicTI_type_node): New macros for type
	nodes.
	* tree.c (set_type_quals): Set TYPE_ATOMIC.
	(find_atomic_core_type): New function.
	(build_qualified_type): Adjust alignment for qualified types.
	(build_atomic_base): New function
	(build_common_tree_nodes): Build atomicQI_type_node,
	atomicHI_type_node, atomicSI_type_node, atomicDI_type_node and
	atomicTI_type_node.
	* print-tree.c (print_node): Print atomic qualifier.
	* tree-pretty-print.c (dump_generic_node): Print atomic type
	attribute.
	* target.def (atomic_assign_expand_fenv): New hook.
	* doc/tm.texi.in (TARGET_ATOMIC_ASSIGN_EXPAND_FENV): New @hook.
	* doc/tm.texi: Regenerate.
	* targhooks.c (default_atomic_assign_expand_fenv): New function.
	* targhooks.h (default_atomic_assign_expand_fenv): Declare.
	* sync-builtins.def (__atomic_feraiseexcept): New built-in
	function.
	* config/i386/i386-builtin-types.def (VOID_FTYPE_PUSHORT): New
	function type.
	* config/i386/i386.c (enum ix86_builtins): Add
	IX86_BUILTIN_FNSTENV, IX86_BUILTIN_FLDENV, IX86_BUILTIN_FNSTSW and
	IX86_BUILTIN_FNCLEX.
	(bdesc_special_args): Add __builtin_ia32_fnstenv,
	__builtin_ia32_fldenv, __builtin_ia32_fnstsw and
	__builtin_ia32_fnclex.
	(ix86_expand_builtin): Handle the new built-in functions.
	(ix86_atomic_assign_expand_fenv): New function.
	(TARGET_ATOMIC_ASSIGN_EXPAND_FENV): New macro.
	* config/i386/i386.md (UNSPECV_FNSTENV, UNSPECV_FLDENV)
	(UNSPECV_FNSTSW, UNSPECV_FNCLEX): New unspecs.
	(fnstenv, fldenv, fnstsw, fnclex): New insns.

gcc/c-family:
2013-11-05  Andrew MacLeod  <amacleod@redhat.com>
	    Joseph Myers  <joseph@codesourcery.com>

	* c-common.h (enum rid): Add RID_ATOMIC.
	* c-common.c (c_common_reswords): Add _Atomic.
	(sync_resolve_params): Use TYPE_MAIN_VARIANT on pointer argument.
	(keyword_is_type_qualifier): Accept RID_ATOMIC.
	* c-format.c (check_format_types): Check for extra _Atomic
	qualifiers in format argument.
	* c-pretty-print.c (pp_c_cv_qualifiers): Handle atomic qualifier.
	(pp_c_type_qualifier_list): Mention _Atomic in comment.

gcc/c:
2013-11-05  Joseph Myers  <joseph@codesourcery.com>
	    Andrew MacLeod  <amacleod@redhat.com>

	* c-aux-info.c (gen_type): Handle atomic qualifier.
	* c-decl.c (validate_proto_after_old_defn): Do not remove atomic
	qualifiers when compating types.
	(shadow_tag_warned): Handle atomic_p in declspecs.
	(quals_from_declspecs): Likewise.
	(start_decl): Use c_type_promotes_to when promoting argument
	types.
	(grokdeclarator): Handle _Atomic.
	(get_parm_info): Diagnose any qualifier on "void" as only
	parameter.
	(store_parm_decls_oldstyle): Do not remove atomic qualifiers when
	comparing types.  Use c_type_promotes_to when promoting argument
	types.
	(finish_function): Use c_type_promotes_to when promoting argument
	types.
	(build_null_declspecs): Handle atomic_p in declspecs.
	(declspecs_add_qual): Handle RID_ATOMIC.
	* c-parser.c (c_token_starts_typename, c_token_is_qualifier)
	(c_token_starts_declspecs): Handle RID_ATOMIC.
	(c_parser_declspecs): Handle atomic type specifiers and
	qualifiers.
	(c_parser_typeof_specifier): Remove const and _Atomic qualifiers
	from types of expressions with atomic type.
	(c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
	(c_parser_attribute_any_word): Handle RID_ATOMIC.
	(c_parser_initializer, c_parser_initelt, c_parser_initval)
	(c_parser_statement_after_labels, c_parser_switch_statement)
	(c_parser_for_statement, c_parser_expr_no_commas)
	(c_parser_conditional_expression, c_parser_binary_expression)
	(c_parser_cast_expression, c_parser_unary_expression)
	(c_parser_postfix_expression)
	(c_parser_postfix_expression_after_primary, c_parser_expression):
	Use convert_lvalue_to_rvalue.
	(c_parser_expression_conv, c_parser_expr_list): Document
	conversion of lvalues to rvalues.  Use convert_lvalue_to_rvalue.
	(c_parser_objc_synchronized_statement): Use
	convert_lvalue_to_rvalue.
	(c_parser_objc_selector): Handle RID_ATOMIC.
	(c_parser_objc_receiver, c_parser_array_notation): Use
	convert_lvalue_to_rvalue.
	* c-tree.h (ctsk_typeof): Adjust comment to mention use for
	_Atomic (type-name).
	(struct c_declspecs): Add atomic_p field.
	(convert_lvalue_to_rvalue): Declare.
	* c-typeck.c (c_type_promotes_to): Promote atomic types to
	corresponding atomic types.
	(qualify_type): Don't add _Atomic qualifiers from second argument.
	(comp_target_types): Do not allow _Atomic mismatches.
	(type_lists_compatible_p): Do not remove atomic qualifiers when
	comparing types.
	(really_atomic_lvalue, convert_lvalue_to_rvalue)
	(build_atomic_assign): New functions.
	(build_unary_op): Use build_atomic_assign for atomic increment and
	decrement.
	(build_conditional_expr): Do not treat _Atomic void as a qualified
	version of void.
	(build_modify_expr): Use build_atomic_assign for atomic LHS.
	(find_anonymous_field_with_type, convert_to_anonymous_field)
	(convert_for_assignment): Do not remove atomic qualifiers when
	comparing types.
	(digest_init): Do not accept initialization of arrays of atomic
	elements by string constants.
	(build_asm_expr): Use convert_lvalue_to_rvalue.
	(build_binary_op): Do not treat _Atomic void as a qualified
	version of void.

gcc/objc:
2013-11-05  Andrew MacLeod  <amacleod@redhat.com>

	* objc-act.c (objc_push_parm): Handle atomic qualifier.

gcc/testsuite:
2013-11-05  Joseph Myers  <joseph@codesourcery.com>

	* lib/target-supports.exp
	(check_effective_target_fenv_exceptions): New function.
	* lib/atomic-dg.exp, gcc.dg/atomic/atomic.exp: New files.
	* gcc.dg/atomic/c11-atomic-exec-1.c,
	gcc.dg/atomic/c11-atomic-exec-2.c,
	gcc.dg/atomic/c11-atomic-exec-3.c,
	gcc.dg/atomic/c11-atomic-exec-4.c,
	gcc.dg/atomic/c11-atomic-exec-5.c, gcc.dg/c11-atomic-1.c,
	gcc.dg/c11-atomic-2.c, gcc.dg/c11-atomic-3.c,
	gcc.dg/c90-atomic-1.c, gcc.dg/c99-atomic-1.c: New tests.

libatomic:
2013-11-05  Joseph Myers  <joseph@codesourcery.com>

	* fenv.c: New file.
	* libatomic.map (LIBATOMIC_1.1): New symbol version.  Include
	__atomic_feraiseexcept.
	* configure.ac (libtool_VERSION): Change to 2:0:1.
	(fenv.h): Test for header.
	* Makefile.am (libatomic_la_SOURCES): Add fenv.c.
	* Makefile.in, auto-config.h.in, configure: Regenerate.

From-SVN: r204544
2013-11-07 21:15:25 +00:00
Tom Tromey 26d78376db * Make-lang.in (START_HDRS, cc1obj-checksum.o, objc/objc-lang.o)
(objc/objc-runtime-shared-support.o)
	(objc/objc-gnu-runtime-abi-01.o, objc/objc-next-runtime-abi-01.o)
	(objc/objc-next-runtime-abi-02.o, objc/objc-act.o)
	(objc/objc-encoding.o, objc/objc-map.o): Remove.

From-SVN: r202900
2013-09-25 16:21:42 +00:00
Iain Sandoe fb5610fbf3 re PR target/48094 (ld: warning: section has unexpectedly large size errors in objc/obj-c++ lto)
gcc:

       PR target/48094
        * config/darwin.c (darwin_objc2_section): Note if ObjC Metadata is seen.
        (darwin_objc1_section): Likewise.
        (darwin_file_end): Emit Image Info section when required.

gcc/c-family:

       PR target/48094
        * c.opt (fgnu-runtime, fnext-runtime, fobjc-abi-version,
        fobjc-gc, freplace-objc-classes): Accept for LTO.

gcc/objc:

       PR target/48094
        * objc-next-runtime-abi-01.c (generate_objc_image_info): Remove.
        (objc_generate_v1_next_metadata): Remove generation of ImageInfo.
        * objc-next-runtime-abi-02.c (generate_v2_objc_image_info): Remove.
        (objc_generate_v2_next_metadata): Remove generation of ImageInfo.

From-SVN: r202593
2013-09-14 15:36:41 +00:00
Ondřej Bílka 587ae1e3bd Fix some typos.
2013-07-21   Ondřej Bílka  <neleai@seznam.cz>

	* objc-act.c: Fix typos.
	* objc-encoding.c: Likewise.
	* objc-gnu-runtime-abi-01.c: Likewise.
	* objc-next-runtime-abi-01.c: Likewise.
	* objc-next-runtime-abi-02.c: Likewise.

From-SVN: r201096
2013-07-21 15:33:00 +00:00
Paolo Carlini 5951f9dfd2 objc-next-runtime-abi-02.c (build_v2_build_objc_method_call): Fix build_conditional_expr call.
2013-05-22  Paolo Carlini  <paolo.carlini@oracle.com>

	* objc-next-runtime-abi-02.c (build_v2_build_objc_method_call):
	Fix build_conditional_expr call.

From-SVN: r199187
2013-05-22 09:14:46 +00:00
Jason Merrill 427b248dd0 Makefile.in (LLINKER): New variable.
* Makefile.in (LLINKER): New variable.
	(mostlyclean): Remove link mutex.
	* configure.ac: Handle --enable-link-mutex.
	* lock-and-run.sh: New script.

From-SVN: r198977
2013-05-16 11:09:31 -04:00
Richard Sandiford d1e082c2c2 Update copyright years in gcc/
From-SVN: r195098
2013-01-10 20:38:27 +00:00
Diego Novillo 6e1aa84836 Introduce vNULL to use as a nil initializer for vec<>.
This patch implements Jakub's idea of adding an empty struct with
a typecast operator that returns nil vectors.  This is useful to
shorten all the initializers when declaring vec instances or passing
nil vectors as function arguments.

2012-11-20  Diego Novillo  <dnovillo@google.com>
	    Jakub Jelinek  <jakub@redhat.com>

ChangeLog
	* vec.h (struct vnull): Declare.
	(vNULL): Declare.
	* vec.c (vNULL): Define.
	* bb-reorder.c: Replace all vec<T, A>() initializers with vNULL.
	* cfgexpand.c: Likewise.
	* cfgloop.c: Likewise.
	* cfgloopanal.c: Likewise.
	* cfgloopmanip.c: Likewise.
	* cgraph.c: Likewise.
	* config/c6x/c6x.c: Likewise.
	* config/i386/i386.c: Likewise.
	* df-core.c: Likewise.
	* dominance.c: Likewise.
	* dwarf2out.c: Likewise.
	* except.c: Likewise.
	* function.c: Likewise.
	* gcse.c: Likewise.
	* genautomata.c: Likewise.
	* graphds.c: Likewise.
	* graphite-scop-detection.c: Likewise.
	* graphite.c: Likewise.
	* haifa-sched.c: Likewise.
	* ifcvt.c: Likewise.
	* ipa-cp.c: Likewise.
	* ipa-inline-analysis.c: Likewise.
	* ipa-inline-transform.c: Likewise.
	* ipa-inline.c: Likewise.
	* ipa-prop.c: Likewise.
	* ipa-split.c: Likewise.
	* ipa-utils.c: Likewise.
	* ira-build.c: Likewise.
	* lto-cgraph.c: Likewise.
	* lto-streamer-in.c: Likewise.
	* lto-symtab.c: Likewise.
	* opts-global.c: Likewise.
	* passes.c: Likewise.
	* ree.c: Likewise.
	* sched-deps.c: Likewise.
	* sel-sched-ir.c: Likewise.
	* sel-sched-ir.h: Likewise.
	* sel-sched.c: Likewise.
	* stor-layout.c: Likewise.
	* trans-mem.c: Likewise.
	* tree-call-cdce.c: Likewise.
	* tree-cfg.c: Likewise.
	* tree-data-ref.c: Likewise.
	* tree-diagnostic.c: Likewise.
	* tree-eh.c: Likewise.
	* tree-loop-distribution.c: Likewise.
	* tree-predcom.c: Likewise.
	* tree-ssa-loop-im.c: Likewise.
	* tree-ssa-loop-ivcanon.c: Likewise.
	* tree-ssa-loop-manip.c: Likewise.
	* tree-ssa-loop-niter.c: Likewise.
	* tree-ssa-loop-prefetch.c: Likewise.
	* tree-ssa-math-opts.c: Likewise.
	* tree-ssa-phiopt.c: Likewise.
	* tree-ssa-pre.c: Likewise.
	* tree-ssa-propagate.c: Likewise.
	* tree-ssa-reassoc.c: Likewise.
	* tree-ssa-sccvn.c: Likewise.
	* tree-ssa-structalias.c: Likewise.
	* tree-ssa-threadedge.c: Likewise.
	* tree-ssa-uninit.c: Likewise.
	* tree-stdarg.c: Likewise.
	* tree-switch-conversion.c: Likewise.
	* tree-vect-data-refs.c: Likewise.
	* tree-vect-loop.c: Likewise.
	* tree-vect-slp.c: Likewise.
	* tree-vect-stmts.c: Likewise.
	* value-prof.c: Likewise.
	* varasm.c: Likewise.

ada/ChangeLog
	* gcc-interface/decl.c: Replace all vec<T,A>()
	initializers with vNULL.

cp/ChangeLog
	* name-lookup.c: Replace all vec<T, A>() initializers
	with vNULL.
	* semantics.c: Likewise.

fortran/ChangeLog
	* trans-openmp.c: Replace all vec<T, A>() initializers
	with vNULL.

lto/ChangeLog
	* lto.c: Replace all vec<T, A>() initializers with vNULL.

objc/ChangeLog
	* objc-act.c: Replace all vec<T, A>() initializers with vNULL.

Co-Authored-By: Jakub Jelinek <jakub@redhat.com>

From-SVN: r193677
2012-11-20 16:21:30 -05:00
Diego Novillo 9771b26396 This patch rewrites the old VEC macro-based interface into a new one based on the template class 'vec'.
This patch rewrites the old VEC macro-based interface into a new one
based on the template class 'vec'.  The user-visible changes are
described in http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec.

I have tested the patch pretty extensively:

- Regular bootstraps on x86_64, ppc, ia64, sparc and hppa.
- Bootstraps with --enable-checking=release
- Bootstraps with --enable-checking=gc,gcac
- Basic builds on all targets (using contrib/config-list.mk).

We no longer access the vectors via VEC_* macros.  The pattern is
"VEC_operation (T, A, V, args)" becomes "V.operation (args)".

The only thing I could not do is create proper ctors and dtors for the
vec class.  Since these vectors are stored in unions, we
have to keep them as PODs (C++03 does not allow non-PODs in unions).

This means that creation and destruction must be explicit.  There is a
new method vec<type, allocation, layout>::create() and another vec<type,
allocation, layout>::destroy() to allocate the internal vector.

For vectors that must be pointers, there is a family of free functions
that implement the operations that need to tolerate NULL vectors.
These functions all start with the prefix 'vec_safe_'.  See the wiki
page for details.

The gengtype change removes the special handling for VEC() that used
to exist in gengtype. Additionally, it allows gengtype to recognize
templates of more than one argument and introduces the concept of an
undefined type (useful for template arguments that may or may not be
types).

When a TYPE_UNDEFINED is reached, gengtype will ignore it if it
happens inside a type marked with GTY((user)).  Otherwise, it will
emit an error.

Finally, gengtype rejects root types marked GTY((user)) that are not
first class pointers.

2012-11-16  Diego Novillo  <dnovillo@google.com>

	VEC API overhaul (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)

	* vec.c (register_overhead): Convert it into
	member function of vec_prefix.
	(release_overhead): Likewise.
	(calculate_allocation): Likewise.
	(vec_heap_free): Remove.
	(vec_gc_o_reserve_1): Remove.
	(vec_heap_o_reserve_1): Remove.
	(vec_stack_o_reserve_1): Remove.
	(vec_stack_o_reserve_exact): Remove.
	(register_stack_vec): New.
	(stack_vec_register_index): New.
	(unregister_stack_vec): New.
	(vec_assert_fail): Remove.
	* vec.h: Conditionally include ggc.h.  Document conditional
	hackery.
	Update top-level documentation.
	(ALONE_VEC_CHECK_INFO): Remove.
	(VEC_CHECK_INFO): Remove.
	(ALONE_VEC_CHECK_DECL): Remove.
	(VEC_CHECK_DECL): Remove.
	(ALONE_VEC_CHECK_PASS): Remove.
	(VEC_CHECK_PASS): Remove.
	(VEC_ASSERT): Remove.
	(vec_prefix): Add friends va_gc, va_gc_atomic, va_heap and
	va_stack.
	Mark fields alloc_ and num_ as protected.
	(struct vec_t): Remove.  Remove all function members.
	(struct vl_embed): Declare.
	(struct vl_ptr): Declare.
	(free): Remove.
	(reserve_exact): Remove.
	(reserve): Remove.
	(safe_splice): Remove.
	(safe_push): Remove.
	(safe_grow): Remove.
	(safe_grow_cleared): Remove.
	(safe_insert): Remove.
	(DEF_VEC_I): Remove.
	(DEF_VEC_ALLOC_I): Remove.
	(DEF_VEC_P): Remove.
	(DEF_VEC_ALLOC_P): Remove.
	(DEF_VEC_O): Remove.
	(DEF_VEC_ALLOC_O): Remove.
	(DEF_VEC_ALLOC_P_STACK): Remove.
	(DEF_VEC_ALLOC_O_STACK): Remove.
	(DEF_VEC_ALLOC_I_STACK): Remove.
	(DEF_VEC_A): Remove.
	(DEF_VEC_ALLOC_A): Remove.
	(vec_stack_p_reserve_exact_1): Remove.
	(vec_stack_o_reserve): Remove.
	(vec_stack_o_reserve_exact): Remove.
	(VEC_length): Remove.
	(VEC_empty): Remove.
	(VEC_address): Remove.
	(vec_address): Remove.
	(VEC_last): Remove.
	(VEC_index): Remove.
	(VEC_iterate): Remove.
	(VEC_embedded_size): Remove.
	(VEC_embedded_init): Remove.
	(VEC_free): Remove.
	(VEC_copy): Remove.
	(VEC_space): Remove.
	(VEC_reserve): Remove.
	(VEC_reserve_exact): Remove.
	(VEC_splice): Remove.
	(VEC_safe_splice): Remove.
	(VEC_quick_push): Remove.
	(VEC_safe_push): Remove.
	(VEC_pop): Remove.
	(VEC_truncate): Remove.
	(VEC_safe_grow): Remove.
	(VEC_replace): Remove.
	(VEC_quick_insert): Remove.
	(VEC_safe_insert): Remove.
	(VEC_ordered_remove): Remove.
	(VEC_unordered_remove): Remove.
	(VEC_block_remove): Remove.
	(VEC_lower_bound): Remove.
	(VEC_alloc): Remove.
	(VEC_qsort): Remove.

	(va_heap): Declare.
	(va_heap::default_layout): New typedef to vl_ptr.
	(va_heap::reserve): New.
	(va_heap::release): New.
	(va_gc): Declare.
	(va_gc::default_layout): New typedef to vl_embed.
	(va_gc::reserve): New.
	(va_gc::release): New.
	(va_gc_atomic): Declare.  Inherit from va_gc.
	(va_stack): Declare.
	(va_stack::default_layout): New typedef to vl_ptr.
	(va_stack::alloc): New.
	(va_stack::reserve): New.
	(va_stack::release): New.
	(register_stack_vec): Declare.
	(stack_vec_register_index): Declare.
	(unregister_stack_vec): Declare.

	(vec<T, A = va_heap, L = typename A::default_layout>): Declare
	empty vec template.
	(vec<T, A, vl_embed>): Partial specialization for embedded
	layout.
	(vec<T, A, vl_embed>::allocated): New.
	(vec<T, A, vl_embed>::length): New.
	(vec<T, A, vl_embed>::is_empty): New.
	(vec<T, A, vl_embed>::address): New.
	(vec<T, A, vl_embed>::operator[]): New.
	(vec<T, A, vl_embed>::last New.
	(vec<T, A, vl_embed>::space): New.
	(vec<T, A, vl_embed>::iterate): New.
	(vec<T, A, vl_embed>::iterate): New.
	(vec<T, A, vl_embed>::copy): New.
	(vec<T, A, vl_embed>::splice): New.
	(vec<T, A, vl_embed>::quick_push New.
	(vec<T, A, vl_embed>::pop New.
	(vec<T, A, vl_embed>::truncate): New.
	(vec<T, A, vl_embed>::quick_insert): New.
	(vec<T, A, vl_embed>::ordered_remove): New.
	(vec<T, A, vl_embed>::unordered_remove): New.
	(vec<T, A, vl_embed>::block_remove): New.
	(vec<T, A, vl_embed>::qsort): New.
	(vec<T, A, vl_embed>::lower_bound): New.
	(vec<T, A, vl_embed>::embedded_size): New.
	(vec<T, A, vl_embed>::embedded_init): New.
	(vec<T, A, vl_embed>::quick_grow): New.
	(vec<T, A, vl_embed>::quick_grow_cleared): New.
	(vec_safe_space): New.
	(vec_safe_length): New.
	(vec_safe_address): New.
	(vec_safe_is_empty): New.
	(vec_safe_reserve): New.
	(vec_safe_reserve_exact): New.
	(vec_alloc): New.
	(vec_free): New.
	(vec_safe_grow): New.
	(vec_safe_grow_cleared): New.
	(vec_safe_iterate): New.
	(vec_safe_push): New.
	(vec_safe_insert): New.
	(vec_safe_truncate): New.
	(vec_safe_copy): New.
	(vec_safe_splice): New.

	(vec<T, A, vl_ptr>): New partial specialization for the space
	efficient layout.
	(vec<T, A, vl_ptr>::exists): New.
	(vec<T, A, vl_ptr>::is_empty): New.
	(vec<T, A, vl_ptr>::length): New.
	(vec<T, A, vl_ptr>::address): New.
	(vec<T, A, vl_ptr>::operator[]): New.
	(vec<T, A, vl_ptr>::operator!=): New.
	(vec<T, A, vl_ptr>::operator==): New.
	(vec<T, A, vl_ptr>::last): New.
	(vec<T, A, vl_ptr>::space): New.
	(vec<T, A, vl_ptr>::iterate): New.
	(vec<T, A, vl_ptr>::copy): New.
	(vec<T, A, vl_ptr>::reserve): New.
	(vec<T, A, vl_ptr>::reserve_exact): New.
	(vec<T, A, vl_ptr>::splice): New.
	(vec<T, A, vl_ptr>::safe_splice): New.
	(vec<T, A, vl_ptr>::quick_push): New.
	(vec<T, A, vl_ptr>::safe_push): New.
	(vec<T, A, vl_ptr>::pop): New.
	(vec<T, A, vl_ptr>::truncate): New.
	(vec<T, A, vl_ptr>::safe_grow): New.
	(vec<T, A, vl_ptr>::safe_grow_cleared): New.
	(vec<T, A, vl_ptr>::quick_grow): New.
	(vec<T, A, vl_ptr>::quick_grow_cleared): New.
	(vec<T, A, vl_ptr>::quick_insert): New.
	(vec<T, A, vl_ptr>::safe_insert): New.
	(vec<T, A, vl_ptr>::ordered_remove): New.
	(vec<T, A, vl_ptr>::unordered_remove): New.
	(vec<T, A, vl_ptr>::block_remove): New.
	(vec<T, A, vl_ptr>::qsort): New.
	(vec<T, A, vl_ptr>::lower_bound): New.
	(vec_stack_alloc): Define.
	(FOR_EACH_VEC_SAFE_ELT): Define.
	* vecir.h: Remove.  Update all users.
	* vecprim.h: Remove.  Update all users.
	Move uchar to coretypes.h.

	* Makefile.in (VEC_H): Add $(GGC_H).
	Remove vecir.h and vecprim.h dependencies everywhere.

2012-11-16  Diego Novillo  <dnovillo@google.com>

	* gengtype-lex.l (VEC): Remove.
	Add characters in the set [\!\>\.-].
	* gengtype-parse.c (token_names): Remove "VEC".
	(require_template_declaration): Remove handling of VEC_TOKEN.
	(type): Likewise.
	Call create_user_defined_type when parsing GTY((user)).
	* gengtype-state.c (type_lineloc): handle TYPE_UNDEFINED.
	(write_state_undefined_type): New.
	(write_state_type): Call write_state_undefined_type for
	TYPE_UNDEFINED.
	(read_state_type): Call read_state_undefined_type for
	TYPE_UNDEFINED.
	* gengtype.c (dbgprint_count_type_at): Handle TYPE_UNDEFINED.
	(create_user_defined_type): Make extern.
	(type_for_name): Factor out of resolve_typedef.
	(create_undefined_type): New
	(resolve_typedef): Call it when we cannot find a previous
	typedef and the type is not a template.
	(find_structure): Accept TYPE_UNDEFINED.
	(set_gc_used_type): Add argument ALLOWED_UNDEFINED_TYPES,
	default to false.
	Emit an error for TYPE_UNDEFINED unless LEVEL is GC_UNUSED or
	ALLOWED_UNDEFINED_TYPES is set.
	Set ALLOWED_UNDEFINED_TYPES to true for TYPE_USER_STRUCT.
	(filter_type_name): Accept templates with more than one
	argument.
	(output_mangled_typename): Handle TYPE_UNDEFINED
	(walk_type): Likewise.
	(write_types_process_field): Likewise.
	(write_func_for_structure): If CHAIN_NEXT is set, ORIG_S
	should not be a user-defined type.
	(write_types_local_user_process_field): Handle TYPE_ARRAY,
	TYPE_NONE and TYPE_UNDEFINED.
	(write_types_local_process_field): Likewise.
	(contains_scalar_p): Return 0 for TYPE_USER_STRUCT.
	(write_root): Reject user-defined types that are not pointers.
	Handle TYPE_NONE, TYPE_UNDEFINED, TYPE_UNION, TYPE_LANG_STRUCT
	and TYPE_PARAM_STRUCT.
	(output_typename): Handle TYPE_NONE, TYPE_UNDEFINED, and
	TYPE_ARRAY.
	(dump_typekind): Handle TYPE_UNDEFINED.
	* gengtype.h (enum typekind): Add TYPE_UNDEFINED.
	(create_user_defined_type): Declare.
	(enum gty_token): Remove VEC_TOKEN.

2012-11-16  Diego Novillo  <dnovillo@google.com>

	Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)

	* coretypes.h (uchar): Define.
	* alias.c: Use new vec API in vec.h.
	* asan.c: Likewise.
	* attribs.c: Likewise.
	* basic-block.h: Likewise.
	* bb-reorder.c: Likewise.
	* builtins.c: Likewise.
	* calls.c: Likewise.
	* cfg.c: Likewise.
	* cfganal.c: Likewise.
	* cfgcleanup.c: Likewise.
	* cfgexpand.c: Likewise.
	* cfghooks.c: Likewise.
	* cfghooks.h: Likewise.
	* cfgloop.c: Likewise.
	* cfgloop.h: Likewise.
	* cfgloopanal.c: Likewise.
	* cfgloopmanip.c: Likewise.
	* cfgrtl.c: Likewise.
	* cgraph.c: Likewise.
	* cgraph.h: Likewise.
	* cgraphclones.c: Likewise.
	* cgraphunit.c: Likewise.
	* combine.c: Likewise.
	* compare-elim.c: Likewise.
	* coverage.c: Likewise.
	* cprop.c: Likewise.
	* data-streamer.h: Likewise.
	* dbxout.c: Likewise.
	* dce.c: Likewise.
	* df-core.c: Likewise.
	* df-problems.c: Likewise.
	* df-scan.c: Likewise.
	* dominance.c: Likewise.
	* domwalk.c: Likewise.
	* domwalk.h: Likewise.
	* dse.c: Likewise.
	* dwarf2cfi.c: Likewise.
	* dwarf2out.c: Likewise.
	* dwarf2out.h: Likewise.
	* emit-rtl.c: Likewise.
	* except.c: Likewise.
	* except.h: Likewise.
	* expr.c: Likewise.
	* expr.h: Likewise.
	* final.c: Likewise.
	* fold-const.c: Likewise.
	* function.c: Likewise.
	* function.h: Likewise.
	* fwprop.c: Likewise.
	* gcc.c: Likewise.
	* gcse.c: Likewise.
	* genattr.c: Likewise.
	* genattrtab.c: Likewise.
	* genautomata.c: Likewise.
	* genextract.c: Likewise.
	* genopinit.c: Likewise
	* ggc-common.c: Likewise.
	* ggc.h: Likewise.
	* gimple-low.c: Likewise.
	* gimple-ssa-strength-reduction.c: Likewise.
	* gimple-streamer-in.c: Likewise.
	* gimple.c: Likewise.
	* gimple.h: Likewise.
	* gimplify.c: Likewise.
	* graph.c: Likewise.
	* graphds.c: Likewise.
	* graphds.h: Likewise.
	* graphite-blocking.c: Likewise.
	* graphite-clast-to-gimple.c: Likewise.
	* graphite-dependences.c: Likewise.
	* graphite-interchange.c: Likewise.
	* graphite-optimize-isl.c: Likewise.
	* graphite-poly.c: Likewise.
	* graphite-poly.h: Likewise.
	* graphite-scop-detection.c: Likewise.
	* graphite-scop-detection.h: Likewise.
	* graphite-sese-to-poly.c: Likewise.
	* graphite.c: Likewise.
	* godump.c: Likewise.
	* haifa-sched.c: Likewise.
	* hw-doloop.c: Likewise.
	* hw-doloop.h: Likewise.
	* ifcvt.c: Likewise.
	* insn-addr.h: Likewise.
	* ipa-cp.c: Likewise.
	* ipa-inline-analysis.c: Likewise.
	* ipa-inline-transform.c: Likewise.
	* ipa-inline.c: Likewise.
	* ipa-inline.h: Likewise.
	* ipa-prop.c: Likewise.
	* ipa-prop.h: Likewise.
	* ipa-pure-const.c: Likewise.
	* ipa-ref-inline.h: Likewise.
	* ipa-ref.c: Likewise.
	* ipa-ref.h: Likewise.
	* ipa-reference.c: Likewise.
	* ipa-split.c: Likewise.
	* ipa-utils.c: Likewise.
	* ipa-utils.h: Likewise.
	* ipa.c: Likewise.
	* ira-build.c: Likewise.
	* ira-color.c: Likewise.
	* ira-emit.c: Likewise.
	* ira-int.h: Likewise.
	* ira.c: Likewise.
	* loop-invariant.c: Likewise.
	* loop-unroll.c: Likewise.
	* lower-subreg.c: Likewise.
	* lra-lives.c: Likewise.
	* lra.c: Likewise.
	* lto-cgraph.c: Likewise.
	* lto-section-out.c: Likewise.
	* lto-streamer-in.c: Likewise.
	* lto-streamer-out.c: Likewise.
	* lto-streamer.h: Likewise.
	* lto-symtab.c: Likewise.
	* mcf.c: Likewise.
	* modulo-sched.c: Likewise.
	* omp-low.c: Likewise.
	* opts-common.c: Likewise.
	* opts-global.c: Likewise.
	* opts.c: Likewise.
	* opts.h: Likewise.
	* passes.c: Likewise.
	* predict.c: Likewise.
	* print-tree.c: Likewise.
	* profile.c: Likewise.
	* profile.h: Likewise.
	* read-rtl.c: Likewise.
	* ree.c: Likewise.
	* reg-stack.c: Likewise.
	* regrename.c: Likewise.
	* regrename.h: Likewise.
	* reload.c: Likewise.
	* reload.h: Likewise.
	* reload1.c: Likewise.
	* rtl.h: Likewise.
	* sched-deps.c: Likewise.
	* sched-int.h: Likewise.
	* sdbout.c: Likewise.
	* sel-sched-dump.c: Likewise.
	* sel-sched-ir.c: Likewise.
	* sel-sched-ir.h: Likewise.
	* sel-sched.c: Likewise.
	* sese.c: Likewise.
	* sese.h: Likewise.
	* statistics.h: Likewise.
	* stmt.c: Likewise.
	* stor-layout.c: Likewise.
	* store-motion.c: Likewise.
	* tlink.c: Likewise.
	* toplev.c: Likewise.
	* trans-mem.c: Likewise.
	* tree-browser.c: Likewise.
	* tree-call-cdce.c: Likewise.
	* tree-cfg.c: Likewise.
	* tree-cfgcleanup.c: Likewise.
	* tree-chrec.c: Likewise.
	* tree-chrec.h: Likewise.
	* tree-complex.c: Likewise.
	* tree-data-ref.c: Likewise.
	* tree-data-ref.h: Likewise.
	* tree-dfa.c: Likewise.
	* tree-diagnostic.c: Likewise.
	* tree-dump.c: Likewise.
	* tree-eh.c: Likewise.
	* tree-emutls.c: Likewise.
	* tree-flow.h: Likewise.
	* tree-if-conv.c: Likewise.
	* tree-inline.c: Likewise.
	* tree-inline.h: Likewise.
	* tree-into-ssa.c: Likewise.
	* tree-iterator.c: Likewise.
	* tree-loop-distribution.c: Likewise.
	* tree-mudflap.c: Likewise.
	* tree-optimize.c: Likewise.
	* tree-outof-ssa.c: Likewise.
	* tree-parloops.c: Likewise.
	* tree-phinodes.c: Likewise.
	* tree-predcom.c: Likewise.
	* tree-pretty-print.c: Likewise.
	* tree-scalar-evolution.c: Likewise.
	* tree-sra.c: Likewise.
	* tree-ssa-address.c: Likewise.
	* tree-ssa-alias.c: Likewise.
	* tree-ssa-ccp.c: Likewise.
	* tree-ssa-coalesce.c: Likewise.
	* tree-ssa-dce.c: Likewise.
	* tree-ssa-dom.c: Likewise.
	* tree-ssa-forwprop.c: Likewise.
	* tree-ssa-live.c: Likewise.
	* tree-ssa-live.h: Likewise.
	* tree-ssa-loop-im.c: Likewise.
	* tree-ssa-loop-ivcanon.c: Likewise.
	* tree-ssa-loop-ivopts.c: Likewise.
	* tree-ssa-loop-manip.c: Likewise.
	* tree-ssa-loop-niter.c: Likewise.
	* tree-ssa-loop-prefetch.c: Likewise.
	* tree-ssa-math-opts.c: Likewise.
	* tree-ssa-operands.c: Likewise.
	* tree-ssa-phiopt.c: Likewise.
	* tree-ssa-phiprop.c: Likewise.
	* tree-ssa-pre.c: Likewise.
	* tree-ssa-propagate.c: Likewise.
	* tree-ssa-reassoc.c: Likewise.
	* tree-ssa-sccvn.c: Likewise.
	* tree-ssa-sccvn.h: Likewise.
	* tree-ssa-strlen.c: Likewise.
	* tree-ssa-structalias.c: Likewise.
	* tree-ssa-tail-merge.c: Likewise.
	* tree-ssa-threadedge.c: Likewise.
	* tree-ssa-threadupdate.c: Likewise.
	* tree-ssa-uncprop.c: Likewise.
	* tree-ssa-uninit.c: Likewise.
	* tree-ssa.c: Likewise.
	* tree-ssanames.c: Likewise.
	* tree-stdarg.c: Likewise.
	* tree-streamer-in.c: Likewise.
	* tree-streamer-out.c: Likewise.
	* tree-streamer.c: Likewise.
	* tree-streamer.h: Likewise.
	* tree-switch-conversion.c: Likewise.
	* tree-vect-data-refs.c: Likewise.
	* tree-vect-generic.c: Likewise.
	* tree-vect-loop-manip.c: Likewise.
	* tree-vect-loop.c: Likewise.
	* tree-vect-patterns.c: Likewise.
	* tree-vect-slp.c: Likewise.
	* tree-vect-stmts.c: Likewise.
	* tree-vectorizer.c: Likewise.
	* tree-vectorizer.h: Likewise.
	* tree-vrp.c: Likewise.
	* tree.c: Likewise.
	* tree.h: Likewise.
	* value-prof.c: Likewise.
	* value-prof.h: Likewise.
	* var-tracking.c: Likewise.
	* varasm.c: Likewise.
	* varpool.c: Likewise.
	* vmsdbgout.c: Likewise.
	* config/bfin/bfin.c: Likewise.
	* config/c6x/c6x.c: Likewise.
	* config/darwin.c: Likewise.
	* config/i386/i386.c: Likewise.
	* config/ia64/ia64.c: Likewise.
	* config/mep/mep.c: Likewise.
	* config/mips/mips.c: Likewise.
	* config/pa/pa.c: Likewise.
	* config/rs6000/rs6000-c.c: Likewise.
	* config/rs6000/rs6000.c: Likewise.
	* config/rx/rx.c: Likewise.
	* config/spu/spu-c.c: Likewise.
	* config/vms/vms.c: Likewise.
	* config/vxworks.c: Likewise.
	* config/epiphany/resolve-sw-modes.c: Likewise.

From-SVN: r193595
2012-11-17 21:54:30 -05:00
Lawrence Crowl 5831a5f0a8 Change hash_table to support a comparator type different from the value type stored in the hash table.
Change hash_table to support a comparator type different from the
value type stored in the hash table.  The 'find' functions now may
take a different type from the value type.  This requires introducing
a second typedef into the Descriptor conceptual type.  Change the
Descriptor concept to use typedefs value_type and compare_type instead
of T.  Change all users to match.

Add usage documentation to hash-table.h.

Tested on x86-64.


Index: gcc/ChangeLog

2012-10-25  Lawrence Crowl  <crowl@google.com>

	* hash-table.h: Add usage documentation.
	(template struct typed_free_remove): Clarify documentation. 
	Rename template parameter.
	(struct typed_noop_remove): Likewise.
	(descriptor concept): Change typedef T to value_type.
	Add typedef compare_type.  Use more precise template parameter name,
	Descriptor instead of Descr.  Update users to match.
	(struct hash_table): Change 'find' parameters to use compare_type
	instead of the value type.

From-SVN: r192823
2012-10-25 21:45:28 +00:00
Lawrence Crowl 703c8606fa Change more non-GTY hash tables to use the new type-safe template hash table.
Constify member function parameters that can be const.
Correct a couple of expressions in formerly uninstantiated templates.

The new code is 0.362% faster in bootstrap, with a 99.5% confidence of
being faster.

Tested on x86-64.


Index: gcc/java/ChangeLog

2012-10-01  Lawrence Crowl  <crowl@google.com>

	* Make-lang.in (JAVA_OBJS): Add dependence on hash-table.o.
	(JCFDUMP_OBJS): Add dependence on hash-table.o.
	(jcf-io.o): Add dependence on hash-table.h.
	* jcf-io.c (memoized_class_lookups): Change to use type-safe hash table.

Index: gcc/c/ChangeLog

2012-10-09  Lawrence Crowl  <crowl@google.com>

	* Make-lang.in (c-decl.o): Add dependence on hash-table.h.
	* c-decl.c (detect_field_duplicates_hash): Change to new type-safe
	hash table.

Index: gcc/objc/ChangeLog

2012-10-01  Lawrence Crowl  <crowl@google.com>

	* Make-lang.in (OBJC_OBJS): Add dependence on hash-table.o.
	(objc-act.o): Add dependence on hash-table.h.
	* objc-act.c (objc_detect_field_duplicates): Change to new type-safe
	hash table.

Index: gcc/ChangeLog

2012-10-09  Lawrence Crowl  <crowl@google.com>

	* Makefile.in (fold-const.o): Add depencence on hash-table.h.
	(dse.o): Likewise.
	(cfg.o): Likewise.
	* fold-const.c (fold_checksum_tree): Change to new type-safe hash table.
	* (print_fold_checksum): Likewise.
	* cfg.c (var bb_original): Likewise.
	* (var bb_copy): Likewise.
	* (var loop_copy): Likewise.
	* hash-table.h (template hash_table): Constify parameters for find...
	and remove_elt... member functions.
        (hash_table::empty) Correct size expression.
        (hash_table::clear_slot) Correct deleted entry assignment.
	* dse.c (var rtx_group_table): Change to new type-safe hash table.

Index: gcc/cp/ChangeLog

2012-10-09  Lawrence Crowl  <crowl@google.com>

	* Make-lang.in (class.o): Add dependence on hash-table.h.
	(tree.o): Likewise.
	(semantics.o): Likewise.
	* class.c (fixed_type_or_null): Change to new type-safe hash table.
	* tree.c (verify_stmt_tree): Likewise.
	(verify_stmt_tree_r): Likewise.
	* semantics.c (struct nrv_data): Likewise.

From-SVN: r192273
2012-10-09 21:21:36 +00:00
Diego Novillo f32682ca25 Remove unnecessary VEC function overloads.
Several VEC member functions that accept an element 'T' used to have
two overloads: one taking 'T', the second taking 'T *'.

This used to be needed because of the interface dichotomy between
vectors of objects and vectors of pointers.  In the past, vectors of
pointers would use pass-by-value semantics, but vectors of objects
would use pass-by-reference semantics.  This is no longer necessary,
but the distinction had remained.

The main side-effect of this change is some code reduction in code
that manipulates vectors of objects.  For instance,

-  struct iterator_use *iuse;
-
-  iuse = VEC_safe_push (iterator_use, heap, iterator_uses, NULL);
-  iuse->iterator = iterator;
-  iuse->ptr = ptr;
+  struct iterator_use iuse = {iterator, ptr};
+  VEC_safe_push (iterator_use, heap, iterator_uses, iuse);

Compile time performance was not affected.

Tested on x86_64 and ppc64.

Also built all-gcc on all targets using VEC routines: arm, bfin, c6x,
epiphany, ia64, mips, sh, spu, and vms.

2012-09-10  Diego Novillo  <dnovillo@google.com>

	* vec.h (vec_t::quick_push): Remove overload that accepts 'T *'.
	Update all users.
	(vec_t::safe_push): Likewise.
	(vec_t::quick_insert): Likewise.
	(vec_t::lower_bound): Likewise.
	(vec_t::safe_insert): Likewise.
	(vec_t::replace): Change second argument to 'T &'.

From-SVN: r191165
2012-09-10 20:04:13 -04:00
Diego Novillo 0823efedd0 backport: As described in http://gcc.gnu.org/ml/gcc/2012-08/msg00015.html...
Merge from cxx-conversion branch (http://gcc.gnu.org/wiki/cxx-conversion).

As described in http://gcc.gnu.org/ml/gcc/2012-08/msg00015.html, this patch
changes the default bootstrap process so that stage 1 always builds with a C++
compiler.

Other than the bootstrap change, the patch makes no functional changes to the
compiler.  Everything should build as it does now in trunk.  The main
changes in this patch are:

1- Configuration changes.
2- Re-write of VEC.
3- Re-write of gengtype to support C++ templates and
   user-provided marking functions.
4- New hash table class.
5- Re-write double_int.
6- Implement tree macros as inline functions so they can be
   called from gdb.

As discussed before, several of these changes do not fully change
the call sites to use the new APIs.

The bootstrap changes have already been tested on a wide range of
targets (http://gcc.gnu.org/wiki/CppBuildStatus).  Additionally,
I have tested the merged trunk on: x86_64-unknown-linux-gnu,
mips64el-unknown-linux-gnu, powerpc64-unknown-linux-gnu,
i686-pc-linux-gnu, and ia64-unknown-linux-gnu.

ChangeLog
2012-08-14   Diego Novillo  <dnovillo@google.com>

	Merge from cxx-conversion branch.

	* Makefile.tpl (STAGE[+id+]_CXXFLAGS): Remove
	POSTSTAGE1_CONFIGURE_FLAGS.
	* Makefile.in: Regenerate.
	* configure.ac (ENABLE_BUILD_WITH_CXX): Remove.  Update all users.
	Force C++ when bootstrapping.
	* configure: Regenerate.


libcpp/ChangeLog
2012-08-14   Diego Novillo  <dnovillo@google.com>

	Merge from cxx-conversion branch.  Configury.

	* Makefile.in: Remove all handlers of ENABLE_BUILD_WITH_CXX.
	* configure.ac: Likewise.
	* configure: Regenerate.

2012-08-14   Lawrence Crowl  <crowl@google.com>

	Merge from cxx-conversion branch.  New C++ hash table.

	* include/symtab.h (typedef struct ht hash_table): Change the typedef
	name to cpp_hash_table.  Update all users of the typedef.

gcc/ChangeLog
2012-08-14   Diego Novillo  <dnovillo@google.com>

	Merge from cxx-conversion branch.  Configury.

	* configure.ac (CXX_FOR_BUILD): Define and substitute.
	(BUILD_CXXFLAGS): Define.
	Remove all handlers of ENABLE_BUILD_WITH_CXX.
	Force all build to be with C++.
	* Makefile.in (BUILD_CXXFLAGS): Use it.
	Remove all handlers of ENABLE_BUILD_WITH_CXX.
	* configure: Regenerate.
	* config.in: Regenerate.
	* doc/install.texi: Remove documentation for --enable-build-with-cxx
	and --enable-build-poststage1-with-cxx.

2012-08-14   Diego Novillo  <dnovillo@google.com>

	Merge from cxx-conversion branch.  Re-implement VEC in C++.

	* vec.c (vec_heap_free): Convert into a template function.
	(vec_gc_o_reserve_1): Make extern.
	(vec_gc_p_reserve): Remove.
	(vec_gc_p_reserve_exact): Remove.
	(vec_gc_o_reserve): Remove.
	(vec_gc_o_reserve_exact): Remove.
	(vec_heap_o_reserve_1): Make extern.
	(vec_heap_p_reserve): Remove.
	(vec_heap_p_reserve_exact): Remove.
	(vec_heap_o_reserve): Remove.
	(vec_heap_o_reserve_exact): Remove.
	(vec_stack_p_reserve): Remove.
	(vec_stack_p_reserve_exact): Remove.
	* vec.h (VEC_CHECK_INFO, VEC_CHECK_DECL, VEC_CHECK_PASS,
	VEC_ASSERT, VEC_ASSERT_FAIL, vec_assert_fail): Move earlier
	in the file.
	(VEC): Define to vec_t<T>.
	(vec_allocation_t): Define.
	(struct vec_prefix): Move earlier in the file.
	(vec_t<T>): New template.
	(DEF_VEC_I, DEF_VECL_ALLOC_I, DEF_VEC_P, DEF_VEC_ALLOC_P,
	DEF_VEC_O, DEF_VEC_ALLOC_P, DEF_VEC_O, DEF_VEC_ALLOC_O,
	DEF_VEC_ALLOC_P_STACK, DEF_VEC_ALLOC_O_STACK,
	DEF_VEC_ALLOC_I_STACK): Expand to 'struct vec_swallow_trailing_semi'.
	(DEF_VEC_A): Provide template instantiations for
	GC/PCH markers that do not traverse the vector.
	(vec_stack_p_reserve): Remove.
	(vec_stack_p_reserve_exact): Remove.
	(vec_stack_p_reserve_exact_1): Remove.
	(vec_stack_o_reserve): Remove.
	(vec_stack_o_reserve_exact): Remove.
	(vec_stack_free): Re-write as a template function.
	(vec_reserve): New template function.
	(vec_reserve_exact): New template function.
	(vec_heap_free): New template function if GATHER_STATISTICS is
	defined.  Otherwise, macro that expands to free().
	(VEC_length_1): New template function.
	(VEC_length): Call it.
	(VEC_empty_1): New template function.
	(VEC_empty): Call it.
	(VEC_address_1): New template function.
	(VEC_address): Call it.
	(VEC_last_1): New template function.
	(VEC_last): Call it.  Change return type to T&.
	Change all users that used VEC_Os.
	(VEC_index_1): New template function.
	(VEC_index): Call it.  Return a T& instead of a T*.
	Update all callers that were using VEC_O before.
	(VEC_iterate_1): New template function.
	(VEC_iterate): Call it.
	(VEC_embedded_size_1): New template function.
	(VEC_embedded_size): Call it.
	(VEC_embedded_init_1): New template function.
	(VEC_embedded_init): Call it.
	(VEC_alloc_1): New template function.
	(VEC_alloc): Call it.  If A is 'stack', call XALLOCAVAR to
	do the allocation.
	(VEC_free_1): New template function.
	(VEC_free): Call it.
	(VEC_copy_1): New template function.
	(VEC_copy): Call it.
	(VEC_space_1): New template function
	(VEC_space): Call it.
	(VEC_reserve_1): New template function.
	(VEC_reserve): Call it.
	(VEC_reserve_exact_1): New template function.
	(VEC_reserve_exact): Call it.
	(VEC_splice_1): New template function.
	(VEC_splice): Call it.
	(VEC_safe_splice_1): New template function.
	(VEC_safe_splice): Call it.
	(VEC_quick_push_1): New template function.  Create two overloads, one
	accepting T, the other accepting T *.  Update all callers
	where T and T * are ambiguous.
	(VEC_quick_push): Call it.
	(VEC_safe_push_1): New template function. Create two overloads, one
	accepting T, the other accepting T *.  Update all callers
	where T and T * are ambiguous.
	(VEC_safe_push): Call it.
	(VEC_pop_1): New template function.
	(VEC_pop): Call it.
	(VEC_truncate_1): New template function.
	(VEC_truncate): Call it.
	(VEC_safe_grow_1): New template function.
	(VEC_safe_grow): Call it.
	(VEC_safe_grow_cleared_1): New template function.
	(VEC_safe_grow_cleared): Call it.
	(VEC_replace_1): New template function.
	(VEC_replace): Call it.  Always accept T instead of T*.
	Update all callers that used VEC_Os.
	(VEC_quick_insert_1): New template function.
	(VEC_quick_insert): Call it.
	(VEC_safe_insert_1): New template function.
	(VEC_safe_insert): Call it.
	(VEC_ordered_remove_1): New template function.
	(VEC_ordered_remove): Call it.
	(VEC_unordered_remove_1): New template function.
	(VEC_unordered_remove): Call it.
	(VEC_block_remove_1): New template function.
	(VEC_block_remove): Call it.
	(VEC_lower_bound_1): New template function.
	(VEC_lower_bound): Call it.
	(VEC_OP): Remove.
	(DEF_VEC_FUNC_P): Remove.
	(DEF_VEC_ALLOC_FUNC_P): Remove.
	(DEF_VEC_NONALLOC_FUNCS_P): Remove.
	(DEF_VEC_FUNC_O): Remove.
	(DEF_VEC_ALLOC_FUNC_O): Remove.
	(DEF_VEC_NONALLOC_FUNCS_O): Remove.
	(DEF_VEC_ALLOC_FUNC_I): Remove.
	(DEF_VEC_NONALLOC_FUNCS_I): Remove.
	(DEF_VEC_ALLOC_FUNC_P_STACK): Remove.
	(DEF_VEC_ALLOC_FUNC_O_STACK): Remove.
	(DEF_VEC_ALLOC_FUNC_I_STACK): Remove.
	(vec_reserve_exact): New template function.

	* gengtype-lex.l (DEF_VEC_ALLOC_[IOP]/{EOID}): Remove.
	* gengtype-parse.c (token_names): Remove DEF_VEC_ALLOC_[IOP].
	(typedef_name): Emit vec_t<C1> instead of VEC_C1_C2.
	(def_vec_alloc): Remove.  Update all callers.
	* gengtype.c (filter_type_name): New.
	(output_mangled_typename): Call it.
	(write_func_for_structure): Likewise.
	(write_types): Likewise.
	(write_root): Likewise.
	(write_typed_alloc_def): Likewise.
	(note_def_vec): Emit vec_t<TYPE_NAME> instead of VEC_TYPE_NAME_base.
	(note_def_vec_alloc): Remove.
	* gengtype.h (note_def_vec_alloc): Remove.
	(DEFVEC_ALLOC): Remove token code.

	* df-scan.c (df_bb_verify): Remove call to df_free_collection_rec
	inside the insn traversal loop.
	* gimplify.c (gimplify_compound_lval): Rename STACK to EXPR_STACK.
	* ipa-inline.c (inline_small_functions): Rename HEAP to EDGE_HEAP.
	* reg-stack.c (stack): Rename to STACK_PTR.  Update all users.
	* tree-vrp.c (stack): Rename to EQUIV_STACK.  Update all users.

	* config/bfin/bfin.c (hwloop_optimize): Update some calls to
	VEC_* for vectors of non-pointers.
	* config/c6x/c6x.c (try_rename_operands): Likewise.
	(reshuffle_units): Likewise.
	* config/mips/mips.c (mips_multi_start): Likewise.
	(mips_multi_add): Likewise.
	(mips_multi_copy_insn): Likewise.
	(mips_multi_set_operand): Likewise.
	* hw-doloop.c (discover_loop): Likewise.
	(discover_loops): Likewise.
	(reorg_loops): Likewise.

2012-08-14   Diego Novillo  <dnovillo@google.com>

	Merge from cxx-conversion branch.  C++ support in gengtype.

	* coretypes.h (gt_pointer_operator): Move from ...
	* ggc.h: ... here.
	* doc/gty.texi: Document support for C++ templates and
	user-provided markers.
	* gcc/gengtype-lex.l: Update copyright year.
	Remove support for recognizing DEF_VEC_O, DEF_VEC_P and
	DEFVEC_I.
	* gengtype-parse.c: Update copyright year.
	(token_names): Remove DEF_VEC_O, DEF_VEC_P and DEF_VEC_I.
	(require_template_declaration): New.
	(typedef_name): Call it.
	(type): Replace IS_UNION with KIND. Replace all users.
	(def_vec): Remove.  Update all users.
	* gengtype-state.c (type_lineloc): Handle TYPE_USER_STRUCT.
	(write_state_user_struct_type): New.
	(write_state_type): Call it.
	(read_state_user_struct_type): New.
	(read_state_type): Call it.
	* gengtype.c: Update copyright year.
	(dump_pair): Move declaration to the top.
	(dump_type): Likewise.
	(dump_type_list): Likewise.
	(dbgprint_count_type_at): Handle TYPE_USER_STRUCT.
	(create_user_defined_type): New.
	(resolve_typedef): Call it.
	(new_structure): Replace argument ISUNION with KIND.
	Change users to refer to KIND directly.
	Update all callers.
	(find_structure): Likewise.
	(set_gc_used_type): Handle TYPE_USER_STRUCT.
	(create_file): Update HDR to include new copyright year.
	(struct walk_type_data): Add field IN_PTR_FIELD.
	(output_mangled_typename): Handle TYPE_USER_STRUCT.
	(walk_type): Set D->IN_PTR_FIELD when walking a TYPE_POINTER.
	Clear it afterwards.
	Handle TYPE_USER_STRUCT.
	(write_types_process_field): Handle TYPE_USER_STRUCT.
	(get_type_specifier): Move earlier in the file.
	(write_type_decl): New.
	(write_marker_function_name): New.
	(write_user_func_for_structure_ptr): New.
	(write_user_func_for_structure_body): New.
	(write_user_marking_functions): New.
	(write_func_for_structure): Call write_marker_function_name
	and write_type_decl.
	Do not call walk_type for TYPE_USER_STRUCT. Emit a call to the user
	function directly.
	Call write_user_marking_functions on TYPE_USER_STRUCTs.
	(write_types_local_user_process_field): New.
	(write_pch_user_walking_for_structure_body): New.
	(write_pch_user_walking_functions): New.
	(write_types_local_process_field): Handle TYPE_USER_STRUCT.
	(write_local_func_for_structure): Do not call walk_type for
	TYPE_USER_STRUCT. Instead, emit the call to gt_pch_nx directly.
	Call write_pch_user_walking_functions for TYPE_USER_STRUCTs.
	(write_root): Handle TYPE_USER_STRUCT.
	(vec_prefix_type): Remove.  Update all users.
	(note_def_vec): Remove.  Update all users.
	(dump_typekind): Handle TYPE_USER_STRUCT.
	(dump_type): Initialize SEEN_TYPES, if needed.
	Handle TYPE_USER_STRUCT.
	(dump_everything): Do not initialize SEEN_TYPES.
	* gengtype.h: Update copyright year.
	(enum typekind): Add TYPE_USER_STRUCT.
	(union_or_struct_p): Rename from UNION_OR_STRUCT_P.
	Convert into function.
	Add an overload taking const_type_p.
	Update all callers.
	(new_structure): Change second field to type enum typekind.
	Update all users.
	(find_structure): Likewise.
	(note_def_vec): Remove.
	(DEFVEC_OP): Remove.
	(DEFVEC_I): Remove.
	* ggc-page.c (gt_ggc_mx): Add entry points for marking
	'const char *&', 'unsigned char *&' and 'unsigned char&'.
	* ggc-zone.c (gt_ggc_mx): Add entry points for marking
	'const char *&' and 'unsigned char *&'.
	* stringpool.c (gt_pch_nx): Add entry points for marking
	'const char *&', 'unsigned char *&' and 'unsigned char&'.
	Add an entry point for the overload taking arguments 'unsigned char
	*', 'gt_pointer_operator' and 'void *'.
	* vec.h (struct vec_prefix): Remove GTY marker.
	(struct vec_t): Remove GTY((length)) attribute from field 'vec'.
	(gt_ggc_mx (vec_t<T> *)): New template function.
	(gt_pch_nx (vec_t<T> *)): New template function.
	(gt_pch_nx (vec_t<T *> *, gt_pointer_operator, void *)): New template
	function.
	(gt_pch_nx (vec_t<T> *, gt_pointer_operator, void *)): New template
	function.

	* basic-block.h (struct edge_def): Mark GTY((user)).
	Remove all GTY markers from fields.
	(gt_ggc_mx): Declare.
	(gt_pch_nx): Declare.
	* tree-cfg.c (gt_ggc_mx): New.
	(gt_pch_nx): New.

	* gengtype-lex.l (USER_GTY): Add pattern for "user".
	* gengtype-parse.c (option): Handle USER_GTY.
	(opts_have): New.
	(type): Call it.
	If the keyword 'user' is used, do not walk the fields
	of the structure.
	* gengtype.h (USER_GTY): Add.
	* doc/gty.texi: Update.

2012-08-14   Lawrence Crowl  <crowl@google.com>

	Merge cxx-conversion branch.  Implement C++ hash table.

	* hash-table.h: New. Implementation borrowed from libiberty/hashtab.c.
	* hash-table.c: Likewise.
	* tree-ssa-tail-merge.c: Include hash-table.h instead of hashtab.h.
	(static htab_t same_succ_htab): Change type to hash_table;
	move specification of helper functions from create call to declaration.
	Change users to invoke member functions.
	(same_succ_print_traverse): Make extern ssa_.... Change callers.
	Remove void* casting.
	(same_succ_hash): Likewise.
	(same_succ_equal): Likewise.
	(same_succ_delete): Likewise.
	* tree-ssa-threadupdate.c: Include hash-table.h.
	(struct local_info): Rename to ssa_local_info_t to avoid overloading
	the type name local_info with the variable name local_info.
	(static htab_t redirection_data): Change type to hash_table.
	Move specification of helper functions from create call to declaration.
	Change users to invoke member functions.
	(redirection_data_hash): Make extern ssa_.... Change callers.
	Remove void* casting.
	(redirection_data_eq): Likewise.
	(fix_duplicate_block_edges): Likewise.
	(create_duplicates): Likewise.
	(fixup_template_block): Likewise.
	(redirect_edges): Likewise.
	(lookup_redirection_data): Change types associated with the hash table
	from void* to their actual type. Remove unnecessary casts.
	* tree-ssa-ccp.c: Include hash-table.h.
	(typedef gimple_htab): New.  Uses hash_table.  Replace specific uses
	of htab_t with gimple_htab.  Change users to invoke member functions.
	Move specification of helper functions from create call to declaration.
	* tree-ssa-coalesce.c: Include hash-table.h instead of hashtab.h.
	(hash_ssa_name_by_var): Make extern. Remove void* casting.
	(eq_ssa_name_by_var): Likewise.
	(coalesce_ssa_name): Change type of local static htab_t ssa_name_hash
	to hash_table. Change users to invoke member functions.
	Move specification of helper functions from create call to declaration.
	* coverage.c: Include hash-table.h instead of hashtab.h.
	(static htab_t counts_hash): Change type to hash_table;
	move specification of helper functions from create call to declaration.
	Change users to invoke member functions.
	(htab_counts_entry_hash): Make extern. Rename with coverage_... instead
	of htab_... Remove void* casting.
	(htab_counts_entry_eq): Likewise.
	(htab_counts_entry_del): Likewise.
	* tree-ssa-pre.c: Include hash-table.h instead of hashtab.h.
	(static htab_t expression_to_id): Change type to hash_table.
	Move specification of helper functions from create call to declaration.
	Change users to invoke member functions.
	(static htab_t phi_translate_table): Likewise.
	(pre_expr_eq): Make extern ssa_.... Change callers.
	Remove void* casting.
	(pre_expr_hash): Likewise.
	(expr_pred_trans_hash): Likewise.
	(expr_pred_trans_eq): Likewise.
	(alloc_expression_id): Change types associated with the hash table
	from void* to their actual type. Remove unnecessary casts.
	(lookup_expression_id): Likewise.
	(phi_trans_lookup): Likewise.
	(phi_trans_add): Likewise.
	* stringpool.c: Rename uses of libcpp typedef hash_table to
	cpp_hash_table.
	* Makefile.in: Add hash-table.o to OBJS-libcommon-target.
	Add $(HASH_TABLE_H). Add new dependences on $(HASH_TABLE_H).

2012-08-14   Lawrence Crowl  <crowl@google.com>

	Merge from cxx-conversion branch.  Re-write double_int in C++.

	* hash-table.h
	(typedef double_int): Change to struct (POD).
	(double_int::make): New overloads for int to double-int conversion.
	(double_int::mask): New.
	(double_int::max_value): New.
	(double_int::min_value): New.
	(double_int::operator ++): New.
	(double_int::operator --): New.
	(double_int::operator *=): New.
	(double_int::operator +=): New.
	(double_int::operator -=): New.
	(double_int::to_signed): New.
	(double_int::to_unsigned): New.
	(double_int::fits_unsigned): New.
	(double_int::fits_signed): New.
	(double_int::fits): New.
	(double_int::trailing_zeros): New.
	(double_int::popcount): New.
	(double_int::multiple_of): New.
	(double_int::set_bit): New.
	(double_int::mul_with_sign): New.
	(double_int::operator * (binary)): New.
	(double_int::operator + (binary)): New.
	(double_int::operator - (binary)): New.
	(double_int::operator - (unary)): New.
	(double_int::operator ~ (unary)): New.
	(double_int::operator & (binary)): New.
	(double_int::operator | (binary)): New.
	(double_int::operator ^ (binary)): New.
	(double_int::and_not): New.
	(double_int::lshift): New.
	(double_int::rshift): New.
	(double_int::alshift): New.
	(double_int::arshift): New.
	(double_int::llshift): New.
	(double_int::lrshift): New.
	(double_int::lrotate): New.
	(double_int::rrotate): New.
	(double_int::div): New.
	(double_int::sdiv): New.
	(double_int::udiv): New.
	(double_int::mod): New.
	(double_int::smod): New.
	(double_int::umod): New.
	(double_int::divmod): New.
	(double_int::sdivmod): New.
	(double_int::udivmod): New.
	(double_int::ext): New.
	(double_int::zext): New.
	(double_int::sext): New.
	(double_int::is_zero): New.
	(double_int::is_one): New.
	(double_int::is_minus_one): New.
	(double_int::is_negative): New.
	(double_int::cmp): New.
	(double_int::ucmp): New.
	(double_int::scmp): New.
	(double_int::ult): New.
	(double_int::ugt): New.
	(double_int::slt): New.
	(double_int::sgt): New.
	(double_int::max): New.
	(double_int::smax): New.
	(double_int::umax): New.
	(double_int::min): New.
	(double_int::smin): New.
	(double_int::umin): New.
	(double_int::operator ==): New.
	(double_int::operator !=): New.
	(shwi_to_double_int): Change implementation to use member function.
	(double_int_minus_one): Likewise.
	(double_int_zero): Likewise.
	(double_int_one): Likewise.
	(double_int_two): Likewise.
	(double_int_ten): Likewise.
	(uhwi_to_double_int): Likewise.
	(double_int_to_shwi): Likewise.
	(double_int_to_uhwi): Likewise.
	(double_int_fits_in_uhwi_p): Likewise.
	(double_int_fits_in_shwi_p): Likewise.
	(double_int_fits_in_hwi_p): Likewise.
	(double_int_mul): Likewise.
	(double_int_mul_with_sign): Likewise.
	(double_int_add): Likewise.
	(double_int_sub): Likewise.
	(double_int_neg): Likewise.
	(double_int_div): Likewise.
	(double_int_sdiv): Likewise.
	(double_int_udiv): Likewise.
	(double_int_mod): Likewise.
	(double_int_smod): Likewise.
	(double_int_umod): Likewise.
	(double_int_divmod): Likewise.
	(double_int_sdivmod): Likewise.
	(double_int_udivmod): Likewise.
	(double_int_multiple_of): Likewise.
	(double_int_setbit): Likewise.
	(double_int_ctz): Likewise.
	(double_int_not): Likewise.
	(double_int_ior): Likewise.
	(double_int_and): Likewise.
	(double_int_and_not): Likewise.
	(double_int_xor): Likewise.
	(double_int_lshift): Likewise.
	(double_int_rshift): Likewise.
	(double_int_lrotate): Likewise.
	(double_int_rrotate): Likewise.
	(double_int_cmp): Likewise.
	(double_int_scmp): Likewise.
	(double_int_ucmp): Likewise.
	(double_int_max): Likewise.
	(double_int_smax): Likewise.
	(double_int_umax): Likewise.
	(double_int_min): Likewise.
	(double_int_smin): Likewise.
	(double_int_umin): Likewise.
	(double_int_ext): Likewise.
	(double_int_sext): Likewise.
	(double_int_zext): Likewise.
	(double_int_mask): Likewise.
	(double_int_max_value): Likewise.
	(double_int_min_value): Likewise.
	(double_int_zero_p): Likewise.
	(double_int_one_p): Likewise.
	(double_int_minus_one_p): Likewise.
	(double_int_equal_p): Likewise.
	(double_int_popcount): Likewise.
	* hash-table.c
	(double_int_mask): Reuse implementation for double_int::mask.
	(double_int_max_value): Likewise.
	(double_int_min_value): Likewise.
	(double_int_ext): Likewise.
	(double_int_zext): Likewise.
	(double_int_sext): Likewise.
	(double_int_mul_with_sign): Likewise.
	(double_int_divmod): Likewise.
	(double_int_sdivmod): Likewise.
	(double_int_udivmod): Likewise.
	(double_int_div): Likewise.
	(double_int_sdiv): Likewise.
	(double_int_udiv): Likewise.
	(double_int_mod): Likewise.
	(double_int_smod): Likewise.
	(double_int_umod): Likewise.
	(double_int_multiple_of): Likewise.
	(double_int_lshift): Likewise.
	(double_int_rshift): Likewise.
	(double_int_lrotate): Likewise.
	(double_int_rrotate): Likewise.
	(double_int_cmp): Likewise.
	(double_int_ucmp): Likewise.
	(double_int_scmp): Likewise.
	(double_int_max): Likewise.
	(double_int_smax): Likewise.
	(double_int_umax): Likewise.
	(double_int_min): Likewise.
	(double_int_smin): Likewise.
	(double_int_umin): Likewise.
	(double_int_min): Likewise.
	(double_int_min): Likewise.
	(double_int_min): Likewise.
	(double_int_min): Likewise.
	(double_int_min): Likewise.
	(double_int_min): Likewise.
	(double_int::alshift): New.
	(double_int::arshift): New.
	(double_int::llshift): New.
	(double_int::lrshift): New.
	(double_int::ult): New.
	(double_int::ugt): New.
	(double_int::slt): New.
	(double_int::sgt): New.
	(double_int_setbit): Reuse implementation for double_int::set_bit,
	which avoids a name conflict with a macro.
	(double_int_double_int_ctz): Reuse implementation for
	double_int::trailing_zeros.
	(double_int_fits_in_shwi_p): Reuse implementation for
	double_int::fits_signed.
	(double_int_fits_in_hwi_p): Reuse implementation for double_int::fits.
	(double_int_mul): Reuse implementation for binary
	double_int::operator *.
	(double_int_add): Likewise.
	(double_int_sub): Likewise.
	(double_int_neg): Reuse implementation for unary
	double_int::operator -.
	(double_int_max_value): Likewise.
	* fixed-value.c: Change to use member functions introduced above.

2012-08-14   Lawrence Crowl  <crowl@google.com>

	Merge cxx-conversion branch.  Support tree macro calling
	from gdb.

	* tree.h (tree_check): New.
	(TREE_CHECK): Use inline function above instead of __extension__.
	(tree_not_check): New.
	(TREE_NOT_CHECK): Use inline function above instead of __extension__.
	(tree_check2): New.
	(TREE_CHECK2): Use inline function above instead of __extension__.
	(tree_not_check2): New.
	(TREE_NOT_CHECK2): Use inline function above instead of __extension__.
	(tree_check3): New.
	(TREE_CHECK3): Use inline function above instead of __extension__.
	(tree_not_check3): New.
	(TREE_NOT_CHECK3): Use inline function above instead of __extension__.
	(tree_check4): New.
	(TREE_CHECK4): Use inline function above instead of __extension__.
	(tree_not_check4): New.
	(TREE_NOT_CHECK4): Use inline function above instead of __extension__.
	(tree_check5): New.
	(TREE_CHECK5): Use inline function above instead of __extension__.
	(tree_not_check5): New.
	(TREE_NOT_CHECK5): Use inline function above instead of __extension__.
	(contains_struct_check): New.
	(CONTAINS_STRUCT_CHECK): Use inline function above instead of
	__extension__.
	(tree_class_check): New.
	(TREE_CLASS_CHECK): Use inline function above instead of __extension__.
	(tree_range_check): New.
	(TREE_RANGE_CHECK): Use inline function above instead of __extension__.
	(omp_clause_subcode_check): New.
	(OMP_CLAUSE_SUBCODE_CHECK): Use inline function above instead of
	__extension__.
	(omp_clause_range_check): New.
	(OMP_CLAUSE_RANGE_CHECK): Use inline function above instead of
	__extension__.
	(expr_check): New.
	(EXPR_CHECK): Use inline function above instead of __extension__.
	(non_type_check): New.
	(NON_TYPE_CHECK): Use inline function above instead of __extension__.
	(tree_vec_elt_check): New.
	(TREE_VEC_ELT_CHECK): Use inline function above instead of
	__extension__.
	(omp_clause_elt_check): New.
	(OMP_CLAUSE_ELT_CHECK): Use inline function above instead of
	__extension__.
	(tree_operand_check): New.
	(TREE_OPERAND_CHECK): Use inline function above instead of
	__extension__.
	(tree_operand_check_code): New.
	(TREE_OPERAND_CHECK_CODE): Use inline function above instead of
	__extension__.
	(TREE_CHAIN): Simplify implementation.
	(TREE_TYPE): Simplify implementation.
	(tree_operand_length): Move for compilation dependences.
	* gdbinit.in: (macro define __FILE__): New.
	(macro define __LINE__): New.
	(skip "tree.h"): New.

gcc/cp/ChangeLog
2012-08-14   Diego Novillo  <dnovillo@google.com>

	Merge from cxx-conversion branch.  Re-write VEC in C++.

	* call.c (add_function_candidate): Remove const qualifier
	from call to VEC_index.

2012-08-14   Diego Novillo  <dnovillo@google.com>

	Merge from cxx-conversion branch.  Configury.

	* go-c.h: Remove all handlers of ENABLE_BUILD_WITH_CXX.
	* go-gcc.cc: Likewise.
	* go-system.h: Likewise.

From-SVN: r190402
2012-08-14 21:56:07 -04:00
Steven Bosscher d4a10d0a62 configure.ac: Skip C if explicitly selected.
toplevel/
	* configure.ac: Skip C if explicitly selected.
	* configure: Regenerate.

gcc/
	* configure.ac: Remove special gtfiles case for C.
	* configure: Regenerate.
	* Makefile.in: Remove C front-end hooks and build hooks that
	will be picked up from c/Make-lang.in now.
	Add tree-mudflap to C_COMMON_OBJS.
	* gengtype.c (files_rules): Adjust gt-files for c/c-decl.c.
	* config/vms/vms.c: Look for c-tree.h in c/.
	* doc/gty.texi: Remove reference to c-config-lang.in.
	* doc/sourcebuild.texi: Document the c/ subdirectory.

c/
	* Make-lang.in: New file, rules migrated from gcc/Makefile.in
	and add language Makefile hooks.
	* config-lang.in: New file.
	* c-config-lang.in: Moved from gcc/config-lang.in to here, and
	add the required "normal" config-lang.in rules.
	* c-lang.h: Moved from gcc/ to here.
	* c-tree.h: Likewise.
	* c-objc-common.c: Likewise.
	* c-objc-common.h: Likewise.
	* c-typeck.c: Likewise.
	* c-convert.c: Likewise.
	* c-lang.c: Likewise.
	* c-aux-info.c: Likewise.
	* c-errors.c: Likewise.
	* gccspec.c: Likewise.
	* c-decl.c: Likewise.  Include gt-c-c-decl.h, not gt-c-decl.h.
	* c-parser.c: Likewise.  Include gt-c-c-parser.h, not gt-c-parser.h.

c-family/
	* cppspec.c: Moved from gcc/ to here.

objc/
	* Make-ang.in: Adjust for move of C front-end files.
	* config-lang.in: Likewise.
	* objc-encoding.c: Look for cp-tree.h in cp/, and for c-tree.h
	and c-lang.h in c/.
	* objc-runtime-shared-support.c: Likewise.
	* objc-next-runtime-abi-01.c: Likewise.
	* objc-next-runtime-abi-02.c: Likewise.
	* objc-gnu-runtime-abi-01.c: Likewise.
	* objc-act.c: Likewise.
	* objc-lang.c: Likewise.

cp/
	* Make-lang.in: Remove tree-mudflap.o from CXX_AND_OBJCXX_OBJS.

From-SVN: r189080
2012-06-29 16:12:35 +00:00
Steven Bosscher 70f42967b3 tm.texi.in (TARGET_OBJC_DECLARE_UNRESOLVED_CLASS_REFERENCE, [...]): Add @hooks.
gcc/
	* doc/tm.texi.in (TARGET_OBJC_DECLARE_UNRESOLVED_CLASS_REFERENCE,
	TARGET_OBJC_DECLARE_CLASS_DEFINITION): Add @hooks.
	(ASM_DECLARE_CLASS_REFERENCE, ASM_DECLARE_UNRESOLVED_REFERENCE):
	Remove.
	* doc/tm.texi: Regenerate.
	* config/darwin.h (ASM_OUTPUT_LABELREF): Remove special case for
	.objc_class_name_*.
	* config/darwin-c.c: Include target.h.
	(darwin_objc_declare_unresolved_class_reference): New function.
	(darwin_objc_declare_class_definition): New function.
	(TARGET_OBJC_DECLARE_UNRESOLVED_CLASS_REFERENCE): Define.
	(TARGET_OBJC_DECLARE_CLASS_DEFINITION): Define.

c-family/
	* c-target.def (objc_declare_unresolved_class_reference,
	objc_declare_class_definition): Add new hooks.

objc/
	* objc-next-runtime-abi-01.c: Do not include tm.h and output.h.
	Include c-family/c-target.h.
	(handle_next_class_ref): Rewrite to emit top-level asm statements.
	(handle_next_impent): Likewise.
	* objc/Make-lang.in: Fix dependencies for objc-next-runtime-abi-01.o.

From-SVN: r188793
2012-06-19 20:44:47 +00:00
Steven Bosscher be7a421eef output.h (__gcc_host_wide_int__): Move to hwint.h.
* output.h (__gcc_host_wide_int__): Move to hwint.h.
	(decl_default_tls_model): Move to tree.h
	(dump_file): Move to system.h.
	(default_stabs_asm_out_destructor, default_stabs_asm_out_constructor,
	dbxout_int, dbxout_stabd, dbxout_begin_stabn, dbxout_begin_stabn_sline,
	dbxout_begin_empty_stabs, dbxout_begin_simple_stabs,
	dbxout_begin_simple_stabs_desc, dbxout_stab_value_zero,
	dbxout_stab_value_zero, dbxout_stab_value_label_diff,
	dbxout_stab_value_internal_label,
	dbxout_stab_value_internal_label_diff): Move from here ...
	* dbxout.h: ... to here.
	* system.h (dump_file): Moved here from output.h.
	* hwint.h (__gcc_host_wide_int__): Moved here from output.h.
	* tree.h (decl_default_tls_model): Moved here from output.h.
	* varasm.c (default_stabs_asm_out_destructor,
	default_stabs_asm_out_constructor): Move from here ...
	* dbxout.c: ... to here.

	* gcov-dump.c (dump_file): Rename to dump_gcov_file.  Update callers.

	* collect2.h (dump_file): Rename to dump_ld_file.
	* collect2.c: Likewise.
	* tlink.c: Likewise.

	* alias.c: Do not include output.h.
	* auto-inc-dec.c: Likewise.
	* bt-load.c: Likewise.
	* caller-save.c: Likewise.
	* cfg.c: Likewise.
	* cfgbuild.c: Likewise.
	* cfgcleanup.c: Likewise.
	* cfglayout.c: Likewise.
	* cfgloop.c: Likewise.
	* cfgloopanal.c: Likewise.
	* cfgloopmanip.c: Likewise.
	* cfgrtl.c: Likewise.
	* cgraph.c: Likewise.
	* cgraphclones.c: Likewise.
	* combine-stack-adj.c: Likewise.
	* combine.c: Likewise.
	* cprop.c: Likewise.
	* cse.c: Likewise.
	* cselib.c: Likewise.
	* dbgcnt.c: Likewise.
	* df-problems.c: Likewise.
	* df-scan.c: Likewise.
	* dojump.c: Likewise.
	* fwprop.c: Likewise.
	* gcse.c: Likewise.
	* graph.c: Likewise.
	* haifa-sched.c: Likewise.
	* hw-doloop.c: Likewise.
	* ipa-inline-transform.c: Likewise.
	* ipa-pure-const.c: Likewise.
	* ipa-reference.c: Likewise.
	* ipa-utils.c: Likewise.
	* ira-build.c: Likewise.
	* ira-emit.c: Likewise.
	* lcm.c: Likewise.
	* loop-doloop.c: Likewise.
	* loop-invariant.c: Likewise.
	* loop-iv.c: Likewise.
	* loop-unroll.c: Likewise.
	* loop-unswitch.c: Likewise.
	* lto-cgraph.c: Likewise.
	* lto-section-in.c: Likewise.
	* lto-streamer-in.c: Likewise.
	* mcf.c: Likewise.
	* mode-switching.c: Likewise.
	* postreload-gcse.c: Likewise.
	* postreload.c: Likewise.
	* predict.c: Likewise.
	* profile.c: Likewise.
	* ree.c: Likewise.
	* reg-stack.c: Likewise.
	* regcprop.c: Likewise.
	* regmove.c: Likewise.
	* regstat.c: Likewise.
	* reload1.c: Likewise.
	* sched-ebb.c: Likewise.
	* sel-sched-dump.c: Likewise.
	* simplify-rtx.c: Likewise.
	* stor-layout.c: Likewise.
	* store-motion.c: Likewise.
	* tracer.c: Likewise.
	* tree-affine.c: Likewise.
	* tree-cfg.c: Likewise.
	* tree-cfgcleanup.c: Likewise.
	* tree-dfa.c: Likewise.
	* tree-into-ssa.c: Likewise.
	* tree-nomudflap.c: Likewise.
	* tree-optimize.c: Likewise.
	* tree-pretty-print.c: Likewise.
	* tree-profile.c: Likewise.
	* tree-ssa-address.c: Likewise.
	* tree-ssa-ccp.c: Likewise.
	* tree-ssa-copy.c: Likewise.
	* tree-ssa-dom.c: Likewise.
	* tree-ssa-loop-ch.c: Likewise.
	* tree-ssa-loop-im.c: Likewise.
	* tree-ssa-loop-manip.c: Likewise.
	* tree-ssa-loop-niter.c: Likewise.
	* tree-ssa-loop-prefetch.c: Likewise.
	* tree-ssa-loop-unswitch.c: Likewise.
	* tree-ssa-loop.c: Likewise.
	* tree-ssa-propagate.c: Likewise.
	* tree-ssa-structalias.c: Likewise.
	* tree-ssa-tail-merge.c: Likewise.
	* tree-ssa-threadedge.c: Likewise.
	* tree-ssa-threadupdate.c: Likewise.
	* tree-ssa-uncprop.c: Likewise.
	* tree-ssa-uninit.c: Likewise.
	* tree-ssa.c: Likewise.
	* value-prof.c: Likewise.
	* var-tracking.c: Likewise.
	* web.c: Likewise.

	* config/m32r/m32r.c: Include dbxout.h.
	* config/pa/pa.c: Likewise.
	* config/rs6000/rs6000.c: Likewise.

	* Makefile.in: Fix dependencies.
	* config/rs6000/t-rs5000: Likewise.

c-family/
	* c-ada-spec.c: Do not include output.h.
	* c-semantics.c: Likewise.

cp/
	* call.c: Do not include output.h.
	* class.c: Likewise.
	* except.c: Likewise.
	* friend.c: Likewise.
	* init.c: Likewise.
	* lex.c: Likewise.
	* method.c: Likewise.
	* parser.c: Likewise.
	* pt.c: Likewise.
	* rtti.c: Likewise.
	* search.c: Likewise.

objc/
	* objc-act.c: Do not include output.h.

fortran/
	* trans-common.c: Do not include output.h.
	* trans-decl.c: Likewise.

java/
	* resource.c: Do not include output.h.

From-SVN: r188082
2012-05-31 20:19:00 +00:00
Paolo Carlini d7faa110dd re PR objc++/53388 (Removal of build_min_nt breaks bootstrap for objc++)
2012-05-17  Paolo Carlini  <paolo.carlini@oracle.com>

	PR objc++/53388
	* objc-act.c (objc_get_class_reference, objc_build_message_expr):
	Use build_min_nt_loc.

From-SVN: r187629
2012-05-17 15:28:53 +00:00
Jan Hubicka ead84f73b0 lto-symtab.c (lto_cgraph_replace_node): Merge needed instead of force flags.
* lto-symtab.c (lto_cgraph_replace_node): Merge needed instead of force flags.
	* cgraph.c (cgraph_add_thunk): Use mark_reachable_node.
	(cgraph_remove_node): Update.
	(cgraph_mark_needed_node): Remove.
	(cgraph_mark_force_output_node): New.
	(dump_cgraph_node): Do not dump needed flag.
	(cgraph_node_cannot_be_local_p_1): Update.
	(cgraph_can_remove_if_no_direct_calls_and_refs): Update.
	* cgraph.h (symtab_node_base): Add force_output flag.
	(cgraph_node): Remove needed flag.
	(varpool_node): Remove force_output flag.
	(cgraph_mark_needed_node): Remove.
	(cgraph_mark_force_output_node): New.
	(cgraph_only_called_directly_or_aliased_p,
	varpool_can_remove_if_no_refs, varpool_all_refs_explicit_p): Update.
	* ipa-cp.c (ipcp_generate_summary): Remove out of date assert.
	* cgraphunit.c (cgraph_decide_is_function_needed): rewrite.
	(cgraph_add_new_function); Update.
	(cgraph_mark_if_needed); Update.
	(verify_cgraph_node): Update.
	(cgraph_analyze_function): Alias target is reachable.
	(process_function_and_variable_attributes): Update: externally_visible
	flag makes function reachable.
	(cgraph_analyze_functions): Update dumping.
	* lto-cgraph.c (lto_output_node, lto_output_varpool_node,
	input_overwrite_node, input_varpool_node): Update streaming.
	* lto-streamer-out.c (produce_symtab): Use force_output.
	* ipa.c (process_references): Weakrefs must be processed.
	(cgraph_remove_unreachable_nodes): Likewise; update for new
	force_output flag.
	(varpool_externally_visible_p); Weakrefs are externally visible
	even if they are not.
	(function_and_variable_visibility): Update; when processing alias
	pair force the targets to be output.
	(whole_program_function_and_variable_visility): Use mark_reachable_node.
	* trans-mem.c (ipa_tm_mark_needed_node): Remove
	(ipa_tm_mark_force_output_node): New function.
	(ipa_tm_create_version_alias, ipa_tm_create_version): Update.
	* gimple-fold.c (can_refer_decl_in_current_unit_p): Be lax about aliases.
	* varasm.c (mark_decl_referenced): Update.
	(find_decl_and_mark_needed): Remove.
	(find_decl): New function.
	(weak_finish, finish_aliases_1, assemble_alias): Update; do not mark
	alias targets as needed.
	(dump_tm_clone_pairs): Update.
	* tree-inline.c (copy_bb): Update check.
	* symtab.c (dump_symtab_base): Dump force_output.
	* tree-ssa-structalias.c (ipa_pta_execute): Use force_output.
	* passes.c (execute_todo): Fix dumping.
	* varpool.c (decide_is_variable_needed, varpool_finalize_decl): Update.
	(varpool_analyze_pending_decls): Alias target is reachable.
	(varpool_create_variable_alias): Finalize weakrefs.

	* class.c (make_local_function_alias): Do not mark symbol referenced.

	* objc-acct.c (mark_referenced_methods); Use
	cgraph_mark_force_output_node.

	* gcc-interface/utils.c (gnat_write_global_declarations): Update for new
	force_output placement.

	* lto/lto-partition.c (partition_cgraph_node_p): Use force_output.

From-SVN: r186624
2012-04-20 14:09:11 +00:00
Steven Bosscher 05e0ab9a49 objc-act (objc_build_ivar_assignment): Do not call assemble_external.
* objc-act (objc_build_ivar_assignment): Do not call assemble_external.
	(objc_build_global_assignment): Likewise.
	(objc_build_strong_cast_assignment): Likewise.
	* objc-next-runtime-abi-01.c: Cleanup commented-out assemble_external.
	* objc-next-runtime-abi-02.c: Likewise.
	* objc-gnu-runtime-abi-01.c: Likewise.

From-SVN: r185621
2012-03-21 22:18:32 +00:00
Jason Merrill 09a70a2c58 objc-map.c (objc_map_private_resize, [...]): Don't call _stat functions without MEM_STAT_INFO.
* objc-map.c (objc_map_private_resize, objc_map_alloc_ggc): Don't
	call _stat functions without MEM_STAT_INFO.

From-SVN: r184961
2012-03-05 17:01:49 -05:00
Iain Sandoe 76d29410c7 objc-next-runtime-abi-01.c (objc_eh_personality): Use gcc personality for Objective-C m32.
gcc/obj:

	* objc-next-runtime-abi-01.c (objc_eh_personality): Use gcc personality
	for Objective-C m32.

From-SVN: r181312
2011-11-12 13:54:33 +00:00
Iain Sandoe f439d6bad9 re PR target/47997 (gcc on macosx: "ld: warning: -fwritable-strings not compatible with literal CF/NSString")
gcc/objc:

	PR target/47997
	* objc-act.c (objc_build_string_object): Remove redundant second
	call to fix_string_type ().  Add a checking assert that we are,
	indeed, passed a STRING_CST.

From-SVN: r180653
2011-10-29 12:59:30 +00:00
Mikael Pettersson 5b6b2942cd In gcc/objc/: 2011-10-18 Mikael Pettersson <mikpe@it.uu.se>
In gcc/objc/:
2011-10-18  Mikael Pettersson  <mikpe@it.uu.se>

	PR objc/50743
	* objc-act.c (check_duplicates): Cast TREE_VEC_LENGTH result to
	size_t to avoid signed/unsigned
	comparison.
	(insert_method_into_method_map): Likewise.

From-SVN: r180132
2011-10-18 11:31:45 +00:00
Nicola Pero 3cc2dd4b7e In gcc/: 2011-10-14 Nicola Pero <nicola.pero@meta-innovation.com>
In gcc/:
2011-10-14  Nicola Pero  <nicola.pero@meta-innovation.com>

	* gengtype.c (files_rules): Added rules for objc/objc-map.h and
	objc/objc-map.c.

In gcc/objc/:
2011-10-14  Nicola Pero  <nicola.pero@meta-innovation.com>

	* objc-map.h: New file.
	* objc-map.c: New file.	
	* config-lang.in (gtfiles): Added objc-map.h.
	* Make-lang.in (OBJC_OBJS): Added objc-map.o.
	(objc/objc-map.o): New rule.
	(objc/objc-act.o): Depend on objc/objc-map.h.
	* objc-next-runtime-abi-02.c: Added a TODO comment.
	* objc-act.c: Include objc-map.h.
	(nst_method_hash_list, cls_method_hash_list): Removed.
	(instance_method_map, class_method_map): New.
	(cls_name_hash_list, als_name_hash_list): Removed.
	(class_name_map, alias_name_map): Removed.
	(ivar_offset_hash_list): Removed.
	(hash_class_name_enter, hash_class_name_lookup, hash_enter,
	hash_lookup, hash_add_attr, add_method_to_hash_list): Removed.
	(interface_hash_init): New.
	(objc_init): Call interface_hash_init.
	(objc_write_global_declarations): Iterate over class_method_map
	and instance_method_map instead of cls_method_hash_list and
	nst_method_hash_list.
	(objc_declare_alias): Use alias_name_map instead of
	cls_name_hash_list.
	(objc_is_class_name): Use class_name_map and alias_name_map
	instead of cls_name_hash_list and als_name_hash_list.
	(interface_tuple, interface_htab, hash_interface, eq_interface):
	Removed.
	(interface_map): New.
	(add_class): Renamed to add_interface.  Use interface_map instead
	of interface_htab.
	(lookup_interface): Use interface_map instead of interface_htab.
	(check_duplicates): Changed first argument to be a tree,
	potentially a TREE_VEC, instead of a hash.  Changed implementation
	to match.
	(lookup_method_in_hash_lists): Use class_method_map and
	instance_method_map instead of cls_method_hash_list and
	nst_method_hash_list.
	(objc_build_selector_expr): Likewise.
	(hash_func): Removed.
	(hash_init): Create instance_method_map, class_method_map,
	class_name_map, and alias_name_map.  Do not create
	nst_method_hash_list, cls_method_hash_list, cls_name_hash_list,
	als_name_hash_list, and ivar_offset_hash_list.
	(insert_method_into_method_map): New.
	(objc_add_method): Use insert_method_into_method_map instead of
	add_method_to_hash_list.
	(start_class): Call add_interface instead of add_class.
	* objc-act.h (cls_name_hash_list, als_name_hash_list,
	nst_method_hash_list, cls_method_hash_list): Removed.

In gcc/objcp/:
2011-10-14  Nicola Pero  <nicola.pero@meta-innovation.com>

	* Make-lang.in (OBJCXX_OBJS): Added objc-map.o.
	(objcp/objc-map.o): New rule.
	(objcp/objcp-act.o): Depend on objc/objc-map.h.
	* config-lang.in (gtfiles): Added objc-map.h.

From-SVN: r179965
2011-10-14 10:19:01 +00:00
Michael Meissner e79983f458 Convert standard builtin functions from being arrays to using a functional interface
From-SVN: r179820
2011-10-11 19:55:09 +00:00
Richard Guenther 5d49b6a7b2 tree.h (fold_build_pointer_plus_loc): New helper function.
2011-07-19  Richard Guenther  <rguenther@suse.de>

	* tree.h (fold_build_pointer_plus_loc): New helper function.
	(fold_build_pointer_plus_hwi_loc): Likewise.
	(fold_build_pointer_plus): Define.
	(fold_build_pointer_plus_hwi): Likewise.

	* builtins.c (std_gimplify_va_arg_expr): Use fold_build_pointer_plus.
	(fold_builtin_memory_op): Likewise.
	(fold_builtin_stpcpy): Likewise.
	(fold_builtin_memchr): Likewise.
	(fold_builtin_strstr): Likewise.
	(fold_builtin_strchr): Likewise.
	(fold_builtin_strrchr): Likewise.
	(fold_builtin_strpbrk): Likewise.
	(fold_builtin_strcat): Likewise.
	(expand_builtin_memory_chk): Likewise.
	(fold_builtin_memory_chk): Likewise.
	* c-typeck.c (build_unary_op): Likewise.
	* cgraphunit.c (thunk_adjust): Likewise.
	* fold-const.c (build_range_check): Likewise.
	(fold_binary_loc): Likewise.
	* omp-low.c (extract_omp_for_data): Likewise.
	(expand_omp_for_generic): Likewise.
	(expand_omp_for_static_nochunk): Likewise.
	(expand_omp_for_static_chunk): Likewise.
	* tree-affine.c (add_elt_to_tree): Likewise.
	* tree-data-ref.c (split_constant_offset_1): Likewise.
	* tree-loop-distribution.c (generate_memset_zero): Likewise.
	* tree-mudflap.c (mf_xform_derefs_1): Likewise.
	* tree-predcom.c (ref_at_iteration): Likewise.
	* tree-ssa-address.c (tree_mem_ref_addr): Likewise.
	(add_to_parts): Likewise.
	(create_mem_ref): Likewise.
	* tree-ssa-loop-ivopts.c (force_expr_to_var_cost): Likewise.
	* tree-ssa-loop-niter.c (number_of_iterations_lt_to_ne): Likewise.
	(number_of_iterations_le): Likewise.
	* tree-ssa-loop-prefetch.c (issue_prefetch_ref): Likewise.
	* tree-vect-data-refs.c (vect_analyze_data_refs): Likewise.
	(vect_create_addr_base_for_vector_ref): Likewise.
	* tree-vect-loop-manip.c (vect_update_ivs_after_vectorizer): Likewise.
	(vect_create_cond_for_alias_checks): Likewise.
	* tree-vrp.c (extract_range_from_assert): Likewise.

	* config/alpha/alpha.c (alpha_va_start): Likewise.
	(alpha_gimplify_va_arg_1): Likewise.
	* config/i386/i386.c (ix86_va_start): Likewise.
	(ix86_gimplify_va_arg): Likewise.
	* config/ia64/ia64.c (ia64_gimplify_va_arg): Likewise.
	* config/mep/mep.c (mep_expand_va_start): Likewise.
	(mep_gimplify_va_arg_expr): Likewise.
	* config/mips/mips.c (mips_va_start): Likewise.
	(mips_gimplify_va_arg_expr): Likewise.
	* config/pa/pa.c (hppa_gimplify_va_arg_expr): Likewise.
	* config/rs6000/rs6000.c (rs6000_va_start): Likewise.
	(rs6000_gimplify_va_arg): Likewise.
	* config/s390/s390.c (s390_va_start): Likewise.
	(s390_gimplify_va_arg): Likewise.
	* config/sh/sh.c (sh_va_start): Likewise.
	(sh_gimplify_va_arg_expr): Likewise.
	* config/sparc/sparc.c (sparc_gimplify_va_arg): Likewise.
	* config/spu/spu.c (spu_va_start): Likewise.
	(spu_gimplify_va_arg_expr): Likewise.
	* config/stormy16/stormy16.c (xstormy16_expand_builtin_va_start):
	Likewise.
	(xstormy16_gimplify_va_arg_expr): Likewise.
	* config/xtensa/xtensa.c (xtensa_va_start): Likewise.
	(xtensa_gimplify_va_arg_expr): Likewise.

	c-family/
	* c-common.c (pointer_int_sum): Use fold_build_pointer_plus.
	* c-omp.c (c_finish_omp_for): Likewise.

	cp/
	* call.c (build_special_member_call): Use fold_build_pointer_plus.
	* class.c (build_base_path): Likewise.
	(convert_to_base_statically): Likewise.
	(dfs_accumulate_vtbl_inits): Likewise.
	* cp-gimplify.c (cxx_omp_clause_apply_fn): Likewise.
	* except.c (expand_start_catch_block): Likewise.
	* init.c (expand_virtual_init): Likewise.
	(build_new_1): Likewise.
	(build_vec_delete_1): Likewise.
	(build_vec_delete): Likewise.
	* rtti.c (build_headof): Likewise.
	(tinfo_base_init): Likewise.
	* typeck.c (get_member_function_from_ptrfunc): Likewise.
	(cp_build_addr_expr_1): Likewise.
	* typeck2.c (build_m_component_ref): Likewise.

	fortran/
	* trans-expr.c (fill_with_spaces): Use fold_build_pointer_plus.
	(gfc_trans_string_copy): Likewise.
	* trans-intrinsic.c (gfc_conv_intrinsic_repeat): Likewise.
	* trans-types.c (gfc_get_array_descr_info): Likewise.
	* trans.c (gfc_build_array_ref): Likewise.

	java/
	* builtins.c (static): Use fold_build_pointer_plus.
	* class.c (make_class_data): Likewise.
	(build_symbol_entry): Likewise.
	* except.c (build_exception_object_ref): Likewise.
	* expr.c (build_java_arrayaccess): Likewise.
	(build_field_ref): Likewise.
	(build_known_method_ref): Likewise.
	(build_invokevirtual): Likewise.

	objc/
	* objc-next-runtime-abi-02.c (objc_v2_build_ivar_ref):
	Use fold_build_pointer_plus.
	(objc2_build_ehtype_initializer): Likewise.

From-SVN: r176461
2011-07-19 14:01:59 +00:00
Nicola Pero a8f18c4037 In gcc/objc/: 2011-07-11 Nicola Pero <nicola.pero@meta-innovation.com>
In gcc/objc/:
2011-07-11  Nicola Pero  <nicola.pero@meta-innovation.com>

	* objc-encoding.h (obstack.h): Do not include.
	(util_obstack, util_firstobj): Do not declare.
	(encode_field_decl): Updated prototype to return a tree and take a
	single tree argument.  Updated comments.
	* objc-encoding.c (util_obstack, util_firstobj): Made static.
	(objc_encoding_init): New.
	(encode_field_decl): Existing function renamed to encode_field and
	made static.  New encode_field_decl wrapper function added.
	(encode_aggregate_fields): Update call to encode_field_decl to
	call encode_field.
	* objc-next-runtime-abi-02.c (obstack.h): Do not include.
	(util_obstack, util_firstobj): Do not declare.
	(build_v2_ivar_list_initializer): Updated call to
	encode_field_decl.
	* objc-runtime-shared-support.c (obstack.h): Do not include.
	(util_obstack, util_firstobj): Do not declare.
	(build_ivar_list_initializer): Updated call to encode_field_decl.
	* objc-act.c (objc_init): Use objc_encoding_init.
	* Make-lang.in (objc/objc-runtime-shared-support.o): Do not depend
	on OBSTACK_H.
	(objc/objc-gnu-runtime-abi-01.o): Likewise.
	(objc/objc-next-runtime-abi-01.o): Likewise.
	(objc/objc-next-runtime-abi-02.o): Likewise.
	(objc/objc-act.o): Likewise.
	
In gcc/objcp/:
2011-07-11  Nicola Pero  <nicola.pero@meta-innovation.com>

	* Make-lang.in (objcp/objc-runtime-shared-support.o): Do not
	depend on OBSTACK_H.
	(objcp/objc-gnu-runtime-abi-01.o): Likewise.
	(objcp/objc-next-runtime-abi-01.o): Likewise.
	(objcp/objc-next-runtime-abi-02.o): Likewise.
	(objcp/objcp-act.o): Likewise.

From-SVN: r176139
2011-07-11 09:42:23 +00:00
Nicola Pero f027ee7cb0 In gcc/objc/: 2011-07-04 Nicola Pero <nicola.pero@meta-innovation.com>
In gcc/objc/:
2011-07-04  Nicola Pero  <nicola.pero@meta-innovation.com>

	Refactored encoding code into objc-encoding.h and objc-encoding.c.
	* objc-act.c (util_obstack, util_firstobj, encode_type_qualifiers,
	encode_type, generating_instance_variables, objc_method_parm_type,
	objc_encoded_type_size, encode_method_prototype,
	objc_build_encode_expr, pointee_is_readonly, encode_pointer,
	encode_array, encode_vector, encode_aggregate_fields,
	encode_aggregate_within, encode_next_bitfield,
	encode_gnu_bitfield, encode_field_decl,
	objc_v2_encode_property_attr): Moved to objc-encoding.h and
	objc-encoding.c.  No change in the actual code.
	Include objc-encoding.h.
	(objc_init): Added TODO.
	(objc_build_property_setter_name): Made non-static so it can be
	called from objc-encoding.c.
	* objc-act.h (OBJC_ENCODE_INLINE_DEFS,
	OBJC_ENCODE_DONT_INLINE_DEFS): Moved to objc-encoding.h.
	* objc-runtime-shared-support.h (objc_v2_encode_property_attr,
	encode_method_prototype, encode_field_decl,
	generating_instance_variables): Moved to objc-encoding.h.	
	(objc_build_property_setter_name): Declare.
	* objc-encoding.c: New.
	* objc-encoding.h: New.
	* objc-gnu-runtime-abi-01.c: Include objc-encoding.h.
	* objc-next-runtime-abi-01.c: Likewise.
	* objc-next-runtime-abi-02.c: Likewise.	
	* objc-runtime-shared-support.c: Likewise.
	* Make-lang.in (OBJC_OBJS): Added objc-encoding.o.
	(objc/objc-lang.o): Reordered dependencies.
	(objc/objc-runtime-shared-support.o): Reordered dependencies.
	Added dependencies on objc-encoding.h and on $(GGC_H),
	$(DIAGNOSTIC_CORE_H), $(FLAGS_H) and input.h.
	(objc/objc-gnu-runtime-abi-01.o): Likewise.
	(objc/objc-next-runtime-abi-01.o): Likewise.
	(objc/objc-next-runtime-abi-02.o): Likewise.
	(objc/objc-act.o): Reordered dependencies.  Added dependency on
	objc-encoding.h.
	(objc/objc-encoding.o): New rule.

	* objc-encoding.c (encode_type): Use "%<%T%>" format when printing
	warning "unknown type %<%T%> found during Objective-C encoding"
	instead of using gen_type_name.
	
In gcc/objcp/:
2011-07-04  Nicola Pero  <nicola.pero@meta-innovation.com>

	* Make-lang.in (OBJCXX_OBJS): Added objc-encoding.o.
	(objcp/objcp-lang.o): Reordered dependencies.  Depend on GGC_H.
	(objcp/objcp-decl.o): Reordered dependencies.
	(objcp/objc-runtime-shared-support.o): Reordered dependencies.
	Updated them to be identical to the corresponding new objc/ ones,
	with the addition of objcp-decl.h.
	(objcp/objc-runtime-shared-support.o): Likewise.
	(objcp/objc-gnu-runtime-abi-01.o): Likewise.
	(objcp/objc-next-runtime-abi-01.o): Likewise.
	(objcp/objc-next-runtime-abi-02.o): Likewise.
	(objcp/objcp-act.o): Reordered dependencies.  Added dependency on
	objc-encoding.h.
	(objcp/objc-encoding.o): New rule.

From-SVN: r175797
2011-07-04 08:02:50 +00:00
Nicola Pero 419b55d0f9 In gcc/objc/: 2011-06-05 Nicola Pero <nicola.pero@meta-innovation.com>
In gcc/objc/:
2011-06-05  Nicola Pero  <nicola.pero@meta-innovation.com>

	* objc-act.c (receiver_is_class_object): Expanded comment.
	(objc_finish_message_expr): Likewise.

In gcc/testsuite/:
2011-06-05  Nicola Pero  <nicola.pero@meta-innovation.com>

	PR testsuite/49287
	* objc.dg/gnu-api-2-class.m: Updated testcase silencing compiler
	warning.
	* objc.dg/gnu-api-2-objc.m: Likewise.
	* obj-c++.dg/gnu-api-2-class.mm: Likewise
	* obj-c++.dg/gnu-api-2-objc.mm: Likewise.

From-SVN: r174657
2011-06-05 17:37:06 +00:00
Nicola Pero bf79cedb11 In gcc/objc/: 2011-06-02 Nicola Pero <nicola.pero@meta-innovation.com>
In gcc/objc/:
2011-06-02  Nicola Pero  <nicola.pero@meta-innovation.com>

	PR objc/48539
	* objc-act.c (objc_finish_message_expr): Warn if messaging a class
	that was only declared using @class without an @interface.  Warn
	if messaging an instance of a class that was only declared using
	@class without an @interface, unless the receiver was also typed
	with a protocol list.

In gcc/testsuite/:
2011-06-02  Nicola Pero  <nicola.pero@meta-innovation.com>

	PR objc/48539
	* objc.dg/method-5.m: Updated.	
	* objc.dg/method-19.m: Updated.
	* objc.dg/method-lookup-1.m: New.	
	* obj-c++.dg/method-6.mm: Updated.
	* obj-c++.dg/method-7.mm: Updated.
	* obj-c++.dg/method-lookup-1.mm: New.

From-SVN: r174575
2011-06-02 18:54:32 +00:00
Nicola Pero 98ab024860 In gcc/objc/: 2011-06-01 Nicola Pero <nicola.pero@meta-innovation.com>
In gcc/objc/:
2011-06-01  Nicola Pero  <nicola.pero@meta-innovation.com>

	* objc-act.c (objc_decl_method_attributes): Implement nonnull
	attribute for Objective-C methods.

In gcc/testsuite/:
2011-06-01  Nicola Pero  <nicola.pero@meta-innovation.com>

	* objc.dg/attributes/method-nonnull-1.m: New test.
	* obj-c++.dg/attributes/method-nonnull-1.mm: New test.

From-SVN: r174520
2011-06-01 09:30:18 +00:00
Nicola Pero 43e4226bb4 In gcc/objc/: 2011-05-21 Nicola Pero <nicola.pero@meta-innovation.com>
In gcc/objc/:
2011-05-21  Nicola Pero  <nicola.pero@meta-innovation.com>

	* config-lang.in (gtfiles): Updated order of files to fix building
	when the gcc/cp directory is missing, as in the case of some
	release tarballs.

From-SVN: r173998
2011-05-21 15:57:11 +00:00
Nathan Froyd 769b55b24f remove some TYPE_ARG_TYPES usage in objc/
remove some TYPE_ARG_TYPES usage in objc/
	* objc-act.c (objc_compare_types): Use function_args_iterator
	instead of TYPE_ARG_TYPES to compare function argument types.

From-SVN: r173977
2011-05-20 19:57:52 +00:00
Toon Moene e6e9475b4b objc-next-runtime-abi-02.c (newabi_append_ro): Add const qualifier to constant variable pointer declaration.
2011-05-13  Toon Moene  <toon@moene.org>

	* objc-next-runtime-abi-02.c (newabi_append_ro):
	Add const qualifier to constant variable pointer declaration.

From-SVN: r173723
2011-05-13 07:47:42 +00:00
Nathan Froyd 515456820e split tree_type
split tree_type
gcc/ada/
	* gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
	(TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
	(TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.

gcc/cp/
	* cp-tree.h (TYPENAME_TYPE_FULLNAME, TYPEOF_TYPE_EXPR): Use
	TYPE_VALUES_RAW.
	(UNDERLYING_TYPE_TYPE, DECLTYPE_TYPE_EXPR): Likewise.
	(DECLTYPE_TYPE_ID_EXPR_OR_MEMBER_ACCESS_P): Likewise.
	(TEMPLATE_TYPE_PARM_INDEX): Likewise.

gcc/
	* ggc-page.c (extra_order_size_table): Use struct
	tree_type_non_common.
	* lto-streamer-in.c (unpack_ts_type_value_fields): Rename to...
	(unpack_ts_type_common_value_fields): ...this.  Update comment.
	(unpack_value_fields): Adjust for renaming.
	(lto_input_ts_type_tree_pointers): Split into...
	(lto_input_ts_type_common_tree_pointer): ...this and...
	(lto_input_ts_type_non_common_tree_pointers): ...this.
	(lto_input_tree_pointers): Adjust for above split.
	* lto-streamer-out.c (pack_ts_type_value_fields): Rename to...
	(pack_ts_type_common_value_fields): ...this.  Update comment.
	(lto_output_ts_type_tree_pointers): Split into...
	(lto_output_ts_type_common_tree_pointers): ...this and...
	(lto_output_ts_type_non_common_tree_pointers): ...this.
	(lto_output_tree_pointers): Adjust for above split.
	* lto-streamer.c (check_handled_ts_structures): Mark TS_TYPE_COMMON,
	TS_TYPE_WITH_LANG_SPECIFIC, and TS_TYPE_NON_COMMON as handled.
	* stor-layout.c (vector_type_mode): Adjust location of mode field.
	* tree.h (MARK_TS_TYPE_COMMON, MARK_TS_TYPE_WITH_LANG_SPECIFIC):
	Define.
	(struct tree_type): Split into...
	(struct tree_type_common: ...this and...
	(struct tree_type_with_lang_specific): ...this and...
	(struct tree_type_non_common): ...this.  Adjust accessor macros
	accordingly.
	(TYPE_VALUES_RAW): Define.
	(union tree_node): Update for above changes.
	* tree.c (tree_node_structure_for_code) [tcc_type]: Return
	TS_TYPE_NON_COMMON.
	(initialize_tree_contains_struct) [TS_TYPE]: Use TS_TYPE_COMMON.
	Add TS_TYPE_WITH_LANG_SPECIFIC and TS_TYPE_NON_COMMON.
	(tree_code_size) [tcc_type]: Use struct tree_type_non_common.
	* treestructu.def (TS_TYPE): Remove.
	(TS_TYPE_COMMON, TS_TYPE_WITH_LANG_SPECIFIC, TS_TYPE_NON_COMMON):
	Define.

gcc/java/
	* java-tree.h (TYPE_ARGUMENT_SIGNATURE): Use TYPE_MINVAL.

gcc/lto/
	* lto.c (lto_ft_type): Use TYPE_MINVAL and TYPE_MAXVAL.  Adjust
	location of binfo field.
	(lto_fixup_prevailing_decls): Likewise.

gcc/objc/
	* objc-act.h (CLASS_NAME, CLASS_SUPER_NAME): Use proper accessors.
	(CLASS_NST_METHODS, CLASS_CLS_METHODS): Likewise.
	(PROTOCOL_NAME, PROTOCOL_NST_METHODS, PROTOCOL_CLS_METHODS): Likewise.

From-SVN: r173658
2011-05-11 13:48:55 +00:00
Nathan Froyd 6174da1b28 don't use build_function_type in the ObjC/C++ frontends
don't use build_function_type in the ObjC/C++ frontends
	* objc-runtime-shared-support.h (get_arg_type_list): Delete.
	(build_function_type_for_method): Declare.
	* objc-runtime-hooks.h (struct _objc_runtime_hooks_r): Change
	type of get_arg_type_base_list field.
	* objc-act.h (OBJC_VOID_AT_END): Delete.
	* objc-act.c (get_arg_type_list): Delete.
	(build_function_type_for_method): New function.
	(objc_decl_method_attributes): Call build_function_type_for_method.
	(really_start_method): Likewise.
	* objc-gnu-runtime-abi-01.c
	(gnu_runtime_abi_01_get_type_arg_list_base): Change prototype and
	adjust function accordingly.  Update header comment.
	(build_objc_method_call): Call build_function_type_for_method.
	* objc-next-runtime-abi-01.c
	(next_runtime_abi_01_get_type_arg_list_base): Change prototype and
	adjust function accordingly.  Update header comment.
	(build_objc_method_call): Call build_function_type_for_method.
	* objc-next-runtime-abi-02.c
	(next_runtime_abi_02_get_type_arg_list_base): Change prototype and
	adjust function accordingly.  Update header comment.
	(objc_copy_to_temp_side_effect_params): Take fntype instead of a
	typelist.  Use function_args_iterator for traversing fntype.
	(build_v2_build_objc_method_call): Adjust call to it.
	Call build_function_type_for_method

From-SVN: r173465
2011-05-06 01:37:00 +00:00
Joseph Myers a04a722b88 c-decl.c (finish_decl): Don't call get_pending_sizes.
* c-decl.c (finish_decl): Don't call get_pending_sizes.
	(grokparm): Add parameter expr.  Pass it to grokdeclarator.
	(push_parm_decl): Add parameter expr.  Pass it to grokdeclarator.
	(c_variable_size): Remove.
	(grokdeclarator): Use save_expr instead of c_variable_size.  Don't
	call put_pending_sizes.
	(get_parm_info): Add parameter expr.  Use it to set
	arg_info->pending_sizes.
	(store_parm_decls): Use arg_info->pending_sizes instead or calling
	get_pending_sizes.
	* c-parser.c (c_parser_parms_declarator): Update call to
	c_parser_parms_list_declarator.
	(c_parser_parms_list_declarator): Take parameter expr.  Update
	call to push_parm_decl.  Update recursive call.  Don't call
	get_pending_sizes.  Update calls to get_parm_info.
	(c_parser_objc_method_definition): Update calls to
	c_parser_objc_method_decl and objc_start_method_definition.
	(c_parser_objc_methodproto): Update call to
	c_parser_objc_method_decl.
	(c_parser_objc_method_decl): Add parameter expr.  Update call to
	grokparm.
	(c_parser_objc_try_catch_finally_statement): Update call to
	grokparm.
	* c-tree.h (struct c_arg_info.pending_sizes): Change to a tree.
	(get_parm_info, grokparm, push_parm_decl): Update prototypes.

c-family:
	* c-objc.h (objc_start_method_definition): Update prototype.
	* stub-objc.c (objc_start_method_definition): Add extra parameter.

cp:
	* parser.c (cp_parser_objc_method_definition_list): Update call to
	objc_start_method_definition.

objc:
	* objc-act.c (objc_start_method_definition): Add parameter expr.
	Update call to start_method_def.
	(objc_generate_cxx_ctor_or_dtor, objc_synthesize_getter,
	objc_synthesize_setter) Update calls to
	objc_start_method_definition.
	(objc_get_parm_info): Add parameter expr.  Update call to
	get_parm_info.
	(start_method_def): Add parameter expr.  Update call to
	objc_get_parm_info.
	* objc-gnu-runtime-abi-01.c (build_module_initializer_routine):
	Update call to objc_get_parm_info.
	* objc-runtime-shared-support.h (objc_get_parm_info): Add extra
	parameter.

From-SVN: r173422
2011-05-05 11:20:31 +01:00
Mike Stump 944fb7998b Fixup whitespacing.
From-SVN: r173388
2011-05-04 18:25:20 +00:00
Jason Merrill 3982d356b2 objc-act.c (objc_fold_objc_type_ref): Remove.
* objc-act.c (objc_fold_objc_type_ref): Remove.
	* objc-act.h: Remove prototype.

From-SVN: r172986
2011-04-26 17:12:57 -04:00
Nathan Froyd 491add7287 objc-act.c (synth_module_prologue): Call build_function_type_list instead of build_function_type.
* objc-act.c (synth_module_prologue): Call build_function_type_list
	instead of build_function_type.
	* objc-next-runtime-abi-02.c (next_runtime_02_initialize):
	Likewise.

From-SVN: r172844
2011-04-21 20:29:55 +00:00
Nicola Pero 5678a5a3bf In gcc/objc/: 2011-04-15 Nicola Pero <nicola.pero@meta-innovation.com>
In gcc/objc/:
2011-04-15  Nicola Pero  <nicola.pero@meta-innovation.com>

	* objc-act.c (ivar_of_class): New.
	(objc_is_public): Use ivar_of_class.

From-SVN: r172523
2011-04-15 21:46:00 +00:00
Nicola Pero 0dc33c3c14 In gcc/c-family/: 2011-04-15 Nicola Pero <nicola.pero@meta-innovation.com>
In gcc/c-family/:
2011-04-15  Nicola Pero  <nicola.pero@meta-innovation.com>

	* c-objc.h (objc_get_interface_ivars): Removed.
	(objc_detect_field_duplicates): New.	
	* stub-objc.c: Likewise.
	
In gcc/:
2011-04-15  Nicola Pero  <nicola.pero@meta-innovation.com>

	* c-decl.c (detect_field_duplicates): Call
	objc_detect_field_duplicates instead of objc_get_interface_ivars.

In gcc/objc/:
2011-04-15  Nicola Pero  <nicola.pero@meta-innovation.com>

	* objc-act.c (objc_get_interface_ivars): Removed.
	(objc_detect_field_duplicates): New.
	(hash_instance_variable): New.
	(eq_instance_variable): New.
	
In gcc/objcp/:
2011-04-15  Nicola Pero  <nicola.pero@meta-innovation.com>

	* objcp-decl.c (objcp_finish_struct): Use
	objc_detect_field_duplicates instead of having a local
	implementation.

In gcc/testsuite/:
2011-04-15  Nicola Pero  <nicola.pero@meta-innovation.com>

	* objc.dg/naming-4.m: Updated.
	* objc.dg/naming-5.m: Updated.	
	* objc.dg/naming-6.m: New.
	* objc.dg/naming-7.m: New.	
	* obj-c++.dg/naming-1.mm: Updated.
	* obj-c++.dg/naming-2.mm: Updated.
	* obj-c++.dg/naming-3.mm: New.
	* obj-c++.dg/naming-4.mm: New.

From-SVN: r172511
2011-04-15 18:15:35 +00:00
Nicola Pero c59633d9da In gcc/c-family/: 2011-04-14 Nicola Pero <nicola.pero@meta-innovation.com>
In gcc/c-family/:
2011-04-14  Nicola Pero  <nicola.pero@meta-innovation.com>

	* stub-objc.c (objc_declare_protocols): Renamed to
	objc_declare_protocol.
	* c-objc.h: Likewise.
	
In gcc/:
2011-04-14  Nicola Pero  <nicola.pero@meta-innovation.com>

	* c-parser.c (c_parser_objc_protocol_definition): Updated for
	change from objc_declare_protocols() to objc_declare_protocol().

In gcc/objc/:
2011-04-14  Nicola Pero  <nicola.pero@meta-innovation.com>

	* objc-act.c (objc_declare_protocols): Renamed to
	objc_declare_protocol.  Changed first argument to be an identifier
	instead of a tree chain of identifiers, so that callers don't have
	to create a temporary tree chain.

In gcc/cp/:
2011-04-14  Nicola Pero  <nicola.pero@meta-innovation.com>

	* parser.c (cp_parser_objc_protocol_declaration): Updated for
	change from objc_declare_protocols() to objc_declare_protocol().

From-SVN: r172444
2011-04-14 19:34:06 +00:00
Nicola Pero 32dabdaff8 In gcc/: 2011-04-14 Nicola Pero <nicola.pero@meta-innovation.com>
In gcc/:
2011-04-14  Nicola Pero  <nicola.pero@meta-innovation.com>

	* c-parser.c (c_parser_objc_class_declaration): Updated call to
	objc_declare_class.

In gcc/c-family/:
2011-04-14  Nicola Pero  <nicola.pero@meta-innovation.com>

	* stub-objc.c (objc_declare_class): Updated argument name.

In gcc/cp/:
2011-04-14  Nicola Pero  <nicola.pero@meta-innovation.com>

	* parser.c (cp_parser_objc_class_declaration): Updated for change
	in objc_declare_class().

In gcc/objc/:
2011-04-14  Nicola Pero  <nicola.pero@meta-innovation.com>

	* objc-act.c (objc_declare_class): Changed to take a single
	identifier as argument instead of a tree list.  This means callers
	don't have to build temporary tree lists to call this function.
	(synth_module_prologue): Updated calls to objc_declare_class.

From-SVN: r172425
2011-04-14 12:12:55 +00:00
Nicola Pero 1328049a7b In gcc/objc/: 2011-04-13 Nicola Pero <nicola.pero@meta-innovation.com>
In gcc/objc/:
2011-04-13  Nicola Pero  <nicola.pero@meta-innovation.com>

	* objc-act.c (build_keyword_selector): Use get_identifier_with_length
	instead of get_identifier.

From-SVN: r172360
2011-04-13 04:02:26 +00:00
Nathan Froyd 81f653d624 ada-tree.h (union lang_tree_node): Check for TS_COMMON before calling TREE_CHAIN.
gcc/ada/
	* gcc-interface/ada-tree.h (union lang_tree_node): Check for
	TS_COMMON before calling TREE_CHAIN.
	* gcc-interface/misc.c (gnat_init_ts): New function.
	(LANG_HOOKS_INIT_TS): Define.

gcc/
	* c-decl.c (union lang_tree_node): Check for TS_COMMON before
	calling TREE_CHAIN.
	* print-tree.c (print_node): Likewise.
	* tree-inline.c (copy_tree_r): Likewise.
	* c-lang.c (LANG_HOOKS_INIT_TS): Define.
	* lto-streamer-in.c (lto_input_tree_pointers): Check for TS_TYPED
	instead of TS_COMMON.
	* lto-streamer-out.c (lto_output_tree_pointers): Likewise.
	* tree.c (initialize_tree_contains_struct): Handle TS_TYPED.
	(copy_node_stat): Zero TREE_CHAIN only if necessary.
	(MARK_TS_BASE, MARK_TS_TYPED, MARK_TS_COMMON): Move these...
	(MARK_TS_DECL_COMMON, MARK_TS_DECL_COMMON, MARK_TS_DECL_WRTL):
	...and these...
	(MARK_TS_DECL_WITH_VIS, MARK_TS_DECL_NON_COMMON): ...and these...
	* tree.h: ...here.
	(TREE_CHAIN): Check for a TS_COMMON structure.
	(TREE_TYPE): Check for a TS_TYPED structure.

gcc/c-family/
	* c-common.h (c_common_init_ts): Declare.
	* c-common.c (c_common_init_ts): Define.

gcc/cp/
	* cp-lang.c (cp_init_ts): Call cp_common_init_ts.  Move
	tree_contains_struct initialization to...
	* cp-objcp-common.c (cp_common_init_ts): ...here.  Use MARK_*
	macros.
	* cp-objcp-common.h (cp_common_init_ts): Declare.
	* cp-tree.h (union lang_tree_node): Check for TS_COMMON before
	calling TREE_CHAIN.

gcc/fortran/
	* f95-lang.c (union lang_tree_node): Check for TS_COMMON before
	calling TREE_CHAIN.

gcc/go/
	* go-lang.c (union lang_tree_node): Check for TS_COMMON before
	calling TREE_CHAIN.

gcc/java/
	* java-tree.h (union lang_tree_node): Check for TS_COMMON before
	calling TREE_CHAIN.

gcc/lto/
	* lto-tree.h (union lang_tree_node): Check for TS_COMMON before
	calling TREE_CHAIN.
	* lto.c (lto_fixup_common): Likewise.

gcc/objc/
	* objc-lang.c (objc_init_ts): Move code for this function...
	* objc-act.c (objc_common_init_ts): ...here. Define.
	* objc-act.h (objc_common_init_ts): Declare.

gcc/objcp/
	* objcp-lang.c (objcxx_init_ts): Call objc_common_init_ts and
	cp_common_init_ts.

From-SVN: r172359
2011-04-13 03:09:53 +00:00
Nicola Pero eb345401a1 In gcc/: 2011-04-12 Nicola Pero <nicola.pero@meta-innovation.com>
In gcc/:
2011-04-12  Nicola Pero  <nicola.pero@meta-innovation.com>

	* c-parser.c (c_parser_initelt): Updated call to
	objc_build_message_expr.
	(c_parser_postfix_expression): Likewise.

In gcc/c-family/:
2011-04-12  Nicola Pero  <nicola.pero@meta-innovation.com>

	* c-objc.h (objc_build_message_expr): Updated prototype.
	* stub-objc.c (objc_build_message_expr): Likewise.
	
In gcc/objc/:
2011-04-12  Nicola Pero  <nicola.pero@meta-innovation.com>

	* objc-act.c (objc_build_message_expr): Accept two arguments
	instead of one so that callers can simply pass the arguments
	without having to create a temporary chain to hold them.

In gcc/cp/:
2011-04-12  Nicola Pero  <nicola.pero@meta-innovation.com>

	* parser.c (cp_parser_objc_message_expression): Updated call
	to objc_build_message_expr.

From-SVN: r172338
2011-04-12 19:02:14 +00:00
Nicola Pero dc2dc51254 In gcc/objc/: 2011-04-12 Nicola Pero <nicola.pero@meta-innovation.com>
In gcc/objc/:
2011-04-12  Nicola Pero  <nicola.pero@meta-innovation.com>

	* objc-act.c (comp_proto_with_proto): Do not create and use
	inefficient temporary argument lists.  Compare the arguments
	directly.  (match_proto_with_proto): Removed; incorporated into
	comp_proto_with_proto ().

From-SVN: r172337
2011-04-12 18:53:08 +00:00
Nicola Pero cf3caeaf0a In gcc/objc/: 2011-04-12 Nicola Pero <nicola.pero@meta-innovation.com>
In gcc/objc/:
2011-04-12  Nicola Pero  <nicola.pero@meta-innovation.com>

	* objc-act.c (printable_ivar_name): New.
	(add_instance_variable): Call printable_ivar_name() when an error
	message needs to be printed.  Do not prepare the instance variable
	for printing unless there is an actual error.

From-SVN: r172328
2011-04-12 17:37:39 +00:00
Nicola Pero 0d8a252826 In gcc/: 2011-04-12 Nicola Pero <nicola.pero@meta-innovation.com>
In gcc/:
2011-04-12  Nicola Pero  <nicola.pero@meta-innovation.com>

	* c-parser.c (c_lex_one_token): Rewritten conditional used when
	compiling Objective-C to be more efficient.

In gcc/objc/:
2011-04-12  Nicola Pero  <nicola.pero@meta-innovation.com>

	* objc-act.c (objc_is_class_name, objc_is_id): For efficiency,
	avoid calling identifier_global_value() multiple times.

From-SVN: r172327
2011-04-12 16:45:40 +00:00
Martin Jambor a358e18845 cgraph.h (cgraph_node): Remove function declaration.
2011-04-12  Martin Jambor  <mjambor@suse.cz>

	* cgraph.h (cgraph_node): Remove function declaration.
	(cgraph_create_node): Declare.
	(cgraph_get_create_node): Likewise.
	* cgraph.c (cgraph_create_node): Renamed to cgraph_create_node_1.
	Updated all callers.
	(cgraph_node): Renamed to cgraph_create_node, assert that a node for
	the decl does not already exist.  Call cgraph_get_create_node instead
	of cgraph_node.
	(cgraph_get_create_node): New function.
	(cgraph_same_body_alias): Update comment.
	(cgraph_set_call_stmt): Call cgraph_get_node instead of cgraph_node,
	assert it does not return NULL.
	(cgraph_update_edges_for_call_stmt): Likewise.
	(cgraph_clone_edge): Likewise.
	(cgraph_create_virtual_clone): Likewise.
	(cgraph_update_edges_for_call_stmt_node): Call cgraph_get_create_node
	instead of cgraph_node.
	(cgraph_add_new_function): Call cgraph_create_node or
	cgraph_get_create_node instead of cgraph_node.
	* cgraphbuild.c (record_reference): Call cgraph_get_create_node
	instead of cgraph_node.
	(record_eh_tables): Likewise.
	(mark_address): Likewise.
	(mark_load): Likewise.
	(build_cgraph_edges): Call cgraph_get_create_node instead
	of cgraph_node.
	(rebuild_cgraph_edges): Likewise.
	* cgraphunit.c (cgraph_finalize_function): Call cgraph_get_create_node
	instead of cgraph_node.
	(cgraph_copy_node_for_versioning): Call cgraph_create_node instead of
	cgraph_node.
	* lto-symtab.c (lto_symtab_merge_cgraph_nodes_1): Call
	cgraph_create_node instead of cgraph_node.
	* c-decl.c (finish_function): Call cgraph_get_create_node instead
	of cgraph_node.
	* lto-cgraph.c (input_node): Likewise.
	* lto-streamer-in.c (input_function): Likewise.
	* varasm.c (mark_decl_referenced): Likewise.
	(assemble_alias): Likewise.

gcc/c-family/
	* c-gimplify.c (c_genericize): Call cgraph_get_create_node instead
	of cgraph_node.

gcc/cp/
	* cp/class.c (cp_fold_obj_type_ref): Call cgraph_get_create_node
	instead of cgraph_node.
	* cp/decl2.c (cxx_callgraph_analyze_expr): Likewise.
	(cp_write_global_declarations): Likewise.
	* cp/optimize.c (maybe_clone_body): Likewise.
	* cp/semantics.c (maybe_add_lambda_conv_op): Likewise.
	* cp/mangle.c (mangle_decl): Likewise.
	* cp/method.c (make_alias_for_thunk): Likewise.
	(use_thunk): Likewise.

gcc/ada/
	* gcc-interface/utils.c (end_subprog_body): Call
	cgraph_get_create_node instead of cgraph_node.

gcc/fortran/
	* trans-decl.c (gfc_generate_function_code): Call
	cgraph_get_create_node instead of cgraph_node.

gcc/objc/
	* objc-act.c (mark_referenced_methods): Call cgraph_get_create_node
	instead of cgraph_node.

From-SVN: r172307
2011-04-12 11:27:18 +02:00
Mike Stump dd5a833e6e Remove doubled up words.
From-SVN: r172247
2011-04-10 18:46:45 +00:00
Joseph Myers acce4e7738 tm.texi.in: Document C target hooks as separate from general target hooks.
* doc/tm.texi.in: Document C target hooks as separate from general
	target hooks.
	* doc/tm.texi: Regenerate.
	* genhooks.c (struct hook_desc): Add docname field.
	(HOOK_VECTOR_1, DEFHOOKPOD, DEFHOOK, DEFHOOK_UNDOC).  Initialize
	docname field.
	(hook_array): Include c-target.def.
	(emit_documentation): Use docname field in output.
	(emit_init_macros): Take docname argument.  Only emit definitions
	for hooks matching docname.
	(main): Expect additional arguments in all cases.  Pass argument
	to emit_init_macros.
	* target.def: Move initial macro definitions and comments to
	target-hooks-macros.h.
	(gcc_targetcm): Move to c-family/c-target.def.
	* target.h (targetcm): Move declaration to c-family/c-target.h.
	* targhooks.c (default_handle_c_option): Move to
	c-family/c-opts.c.
	* targhooks.h (default_handle_c_option): Move declaration to
	c-family/c-common.h.
	* target-hooks-macros.h: New file.
	* config.gcc (target_has_targetcm): Define and use to add to
	c_target_objs and cxx_target_objs.
	* config/default-c.c: New file.
	* config/darwin-c.c: Include c-target.h and c-target-def.h instead
	of target.h and target-def.h.
	(TARGET_HANDLE_C_OPTION, targetcm): Define later in file.
	(darwin_objc_construct_string, darwin_cfstring_ref_p,
	darwin_check_cfstring_format_arg): Make static.
	(TARGET_OBJC_CONSTRUCT_STRING_OBJECT,
	TARGET_STRING_OBJECT_REF_TYPE_P,
	TARGET_CHECK_STRING_OBJECT_FORMAT_ARG): Define here.
	* config/darwin-protos.h (darwin_objc_construct_string,
	darwin_cfstring_ref_p, darwin_check_cfstring_format_arg): Don't
	declare.
	* config/darwin.h (TARGET_OBJC_CONSTRUCT_STRING_OBJECT,
	TARGET_STRING_OBJECT_REF_TYPE_P,
	TARGET_CHECK_STRING_OBJECT_FORMAT_ARG, TARGET_HAS_TARGETCM):
	Remove.
	* config/t-darwin (darwin-c.o): Update dependencies.
	* system.h (TARGET_HAS_TARGETCM): Poison.
	* Makefile.in (TARGET_H): Update.
	(TARGET_DEF, C_TARGET_DEF, C_TARGET_H, C_TARGET_DEF_H): Define.
	(c-family/c-format.o, c-family/c-opts.o): Update dependencies.
	(default-c.o): New target.
	(s-target-hooks-def-h): Pass "Target Hook" string to genhooks.
	(c-family/c-target-hooks-def.h, s-c-target-hooks-def-h): New
	targets.
	(s-tm-texi): Pass -d option to genhooks.  Also test timestamp on
	c-target.def.
	(build/genhooks.o): Update dependencies.

c-family:
	* c-target-def.h: New file.
	* c-target.def: New file.
	* c-target.h: New file.
	* c-common.c (targetcm): Don't define here.
	* c-common.h (default_handle_c_option): Declare.
	* c-format.c: Include c-target.h instead of target.h.
	* c-opts.c: Include c-target.h instead of target.h.  Explicitly
	include tm.h.
	(default_handle_c_option): Move from targhooks.c.

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

From-SVN: r172035
2011-04-06 12:08:17 +01:00
Joseph Myers 787a8c0feb lang-specs.h: Match -save-temps* instead of -save-temps.
cp:
	* lang-specs.h: Match -save-temps* instead of -save-temps.

objc:
	* lang-specs.h: Match -save-temps* instead of -save-temps.

objcp
	* lang-specs.h: Match -save-temps* instead of -save-temps.

From-SVN: r170715
2011-03-06 16:27:57 +00:00
Nicola Pero 39113df12c Implemented encoding property types for new ObjC ABIs
From-SVN: r170516
2011-02-26 11:33:02 +00:00
Nicola Pero 79d822528c Removed conflict in usage of TYPE_LANG_SLOT_0 between Objective-C and C
From-SVN: r170436
2011-02-23 10:57:59 +00:00
Nicola Pero 4597541a68 Fixed check for flexible array members used in Objective-C instance variables
From-SVN: r170412
2011-02-22 18:30:44 +00:00
Mike Stump d277ec6ebb * Make-lang.in (check_objc_parallelize): Refine for 4 processor machines.
From-SVN: r170391
2011-02-22 07:58:28 +00:00
Nicola Pero a3e5390d5f Fixed ChangeLog dates of my last two commits
From-SVN: r170344
2011-02-20 17:56:04 +00:00
Nicola Pero 6d54914869 Reverted usage of TARGET_64BIT for code generation for GNU Objective-C runtime
From-SVN: r170343
2011-02-20 17:52:44 +00:00
Nicola Pero 3890ce93e2 Fixed Objective-C dotsyntax with a constant type right-hand side
From-SVN: r170342
2011-02-20 17:41:36 +00:00
Nicola Pero c2beaa0254 Updated comments
From-SVN: r170308
2011-02-19 05:11:21 +00:00
Nicola Pero 6da97b7be4 Updated comments in objc-act.c
From-SVN: r170299
2011-02-19 01:54:03 +00:00
Nicola Pero d4c433f96c Updated comments - no change in code
From-SVN: r170298
2011-02-19 01:42:17 +00:00
Nicola Pero 475b5d2a3b Do no emit GNU metadata if there is nothing to put into it
From-SVN: r170292
2011-02-19 00:12:45 +00:00
Iain Sandoe d764a8e6bd Added support for the 64-bit Apple Objective-C runtime
From-SVN: r170260
2011-02-18 00:07:38 +00:00
Nicola Pero f0fc7be525 In gcc/objc/: 2011-01-17 Nicola Pero <nicola.pero@meta-innovation.com>
In gcc/objc/:
2011-01-17  Nicola Pero  <nicola.pero@meta-innovation.com>

	PR objc/47314
	* objc-act.c (finish_objc): When calling check_duplicates to check
	duplicated instance methods, set 'is_class' to 0, not 1.

In gcc/testsuite/:
2011-01-17  Nicola Pero  <nicola.pero@meta-innovation.com>

	PR objc/47314
	* objc.dg/selector-warn-1.m: New.
	* obj-c++.dg/selector-warn-1.mm: New.

From-SVN: r168934
2011-01-17 22:17:47 +00:00
Mike Stump dc0d2dae5a re PR target/19162 (ICE while building libobjc's sendmsg.c)
PR 19162
	* objc-act.c (generate_struct_by_value_array): Do not output a
	definition for struct_forward_array.

From-SVN: r168824
2011-01-14 21:50:11 +00:00
Ben Elliston 2d66a8d3c1 objc-act.c (generate_struct_by_value_array): Do not output a definition for struct_forward_array.
2011-01-14  Ben Elliston  <bje@au.ibm.com>

	* objc-act.c (generate_struct_by_value_array): Do not output a
	definition for struct_forward_array.

From-SVN: r168823
2011-01-14 21:38:17 +00:00
Iain Sandoe 28a2c1d594 update gcc/objc/Changelog copyright years.
From-SVN: r168603
2011-01-08 20:47:27 +00:00
Iain Sandoe 5d19c15004 objc-act.c (objc_finish_foreach_loop): Mark collection expression as read.
gcc/objc:

	* objc-act.c (objc_finish_foreach_loop): Mark collection expression
	as read.

gcc/testsuite:

	* objc.dg/foreach-1.m: Add "-Wall" to flags.

From-SVN: r168602
2011-01-08 20:32:32 +00:00
Jakub Jelinek d652f226fc Update Copyright years for files modified in 2010.
From-SVN: r168438
2011-01-03 21:52:22 +01:00
H.J. Lu 7dfef5845a Fix a typo.
2011-01-02  H.J. Lu  <hongjiu.lu@intel.com>

	* objc-act.c (check_that_protocol_is_defined): Fix a typo.

From-SVN: r168400
2011-01-02 08:24:44 -08:00
Nicola Pero ca2ed3ba8e In gcc/objc/: 2011-01-02 Nicola Pero <nicola.pero@meta-innovation.com>
In gcc/objc/:
2011-01-02  Nicola Pero  <nicola.pero@meta-innovation.com>

	* objc-act.c (check_that_protocol_is_defined): New.
	(lookup_protocol): Call check_that_protocol_is_defined.

In gcc/testsuite/:
2011-01-02  Nicola Pero  <nicola.pero@meta-innovation.com>

	* objc.dg/protocol-forward-1.m: Removed TODO.
	* objc.dg/protocol-forward-2.m: New.
	* obj-c++.dg/protocol-forward-2.mm: Removed TODO.
	* obj-c++.dg/protocol-forward-2.mm: New.

From-SVN: r168398
2011-01-02 10:19:42 +00:00
Nicola Pero 2219929499 Fixed typo in one of my last changelog entries
From-SVN: r168357
2010-12-30 22:03:02 +00:00
Nicola Pero 27e09ff9fc In gcc/objc/: 2010-12-30 Nicola Pero <nicola.pero@meta-innovation.com>
In gcc/objc/:
2010-12-30  Nicola Pero  <nicola.pero@meta-innovation.com>

	* objc-act.c (objc_types_are_equivalent): Fixed comparing protocol
	lists.  Check them two-ways to fix comparisons when one protocol
	implements the other one, or when one list contains duplicated
	protocols.

In gcc/testsuite/:
2010-12-30  Nicola Pero  <nicola.pero@meta-innovation.com>

	* objc.dg/method-conflict-3.m: New.
	* objc.dg/method-conflict-4.m: New.	
	* obj-c++.dg/method-conflict-3.m: New.	
	* obj-c++.dg/method-conflict-4.mm: New.

From-SVN: r168356
2010-12-30 22:02:09 +00:00
Nicola Pero 223706ad62 In gcc/objc/: 2010-12-30 Nicola Pero <nicola.pero@meta-innovation.com>
In gcc/objc/:
2010-12-30  Nicola Pero  <nicola.pero@meta-innovation.com>

	* objc-act.c (objc_add_method): When emitting an error because a
	method with the same name but conflicting types is found in the
	same class or category interface, print a note with the location
	of the original method.  Also, improved the error message to
	clearly state that the conflict is due to conflicting types, and
	produce it for protocols as well.  Emit an error if two identical
	methods are declared in a protocol, but one is @required and the
	other one is @optional.  When

In gcc/testsuite/:
2010-12-30  Nicola Pero  <nicola.pero@meta-innovation.com>
	
	* objc.dg/class-extension-3.m: Updated.
	* objc.dg/method-1.m: Updated.
	* objc.dg/method-conflict-1.m: New.
	* objc.dg/method-conflict-2.m: New.	
	* obj-c++.dg/class-extension-3.mm: Updated.
	* obj-c++.dg/method-8.mm: Updated.
	* obj-c++.dg/method-conflict-1.mm: New.
	* obj-c++.dg/method-conflict-2.mm: New.

From-SVN: r168350
2010-12-30 18:26:56 +00:00
Nicola Pero fd3ce292ae In gcc/objc/: 2010-12-30 Nicola Pero <nicola@nicola.brainstorm.co.uk>
In gcc/objc/:
2010-12-30  Nicola Pero  <nicola@nicola.brainstorm.co.uk>

	* objc-act.c (start_class): Warn when a class attribute is
	ignored.
	(objc_declare_protocols): Warn when a protocol attribute in a
	protocol forward-declaration is ignored.
	(start_protocol): Warn when a protocol attribute is ignored.

In gcc/testsuite/:
2010-12-30  Nicola Pero  <nicola.pero@meta-innovation.com>

	* objc.dg/attributes/class-attribute-3.m: New.
	* objc.dg/attributes/proto-attribute-4.m: New.
	* obj-c++.dg/attributes/class-attribute-3.mm: New.
	* obj-c++.dg/attributes/proto-attribute-4.mm: New.

From-SVN: r168337
2010-12-30 08:59:29 +00:00
Nicola Pero 445eb4c664 In gcc/objc/: 2010-12-30 Nicola Pero <nicola.pero@meta-innovation.com>
In gcc/objc/:
2010-12-30  Nicola Pero  <nicola.pero@meta-innovation.com>

	* objc-act.c (objc_set_method_opt): Tidy up error messages.  In
	particular, explicitly mention whether the error is due to the
	@optional or @required keyword instead of mentioning
	"@optional/@required".

In gcc/testsuite/:
2010-12-30  Nicola Pero  <nicola.pero@meta-innovation.com>

	* objc.dg/enhanced-proto-2.m: Updated.
	* obj-c++.dg/enhanced-proto-2.mm: Updated.

From-SVN: r168327
2010-12-29 22:59:46 +00:00
Nicola Pero 37153b1e07 In gcc/objc/: 2010-12-29 Nicola Pero <nicola.pero@meta-innovation.com>
In gcc/objc/:
2010-12-29  Nicola Pero  <nicola.pero@meta-innovation.com>

	PR objc/47118
	* objc-act.c (objc_build_synchronized): Check the argument of
	@synchronized and emit an appropriate error if it is not a valid
	Objective-C object.  Deal gracefully with that case.  Updated
	comments and variable names.

In gcc/testsuite/:
2010-12-29  Nicola Pero  <nicola.pero@meta-innovation.com>

	PR objc/47118
	* objc.dg/sync-3.m: New.
	* obj-c++.dg/sync-3.mm: New.

From-SVN: r168326
2010-12-29 21:52:00 +00:00
Nicola Pero b4f588c48d In gcc/c-family/: 2010-12-29 Nicola Pero <nicola@nicola.brainstorm.co.uk>
In gcc/c-family/:
2010-12-29  Nicola Pero  <nicola@nicola.brainstorm.co.uk>

	PR objc/47075
	* c-objc.h (objc_finish_message_expr): Added argument to
	prototype.

In gcc/objc/:
2010-12-29  Nicola Pero  <nicola.pero@meta-innovation.com>

	PR objc/47075
	* objc-act.h (PROPERTY_REF_DEPRECATED_GETTER): New.
	* objc-tree.def (PROPERTY_REF): Increased the number of operands
	from 3 to 4.
	* objc-act.c (objc_finish_message_expr): Added optional argument
	allowing to return the deprecated method prototype for deprecated
	methods, instead of immediately emitting the deprecation warning.
	(objc_maybe_build_component_ref): Do not warn for a deprecated
	property.  When building the getter call, get the deprecated
	method prototype from objc_finish_message_expr() and put it into
	the PROPERTY_REF.
	(objc_build_class_component_ref): Same change.
	(finish_class): Mark the getter and setter as deprecated if they
	are generated from a deprecated property.
	(objc_gimplify_property_ref): If the getter is deprecated, emit a
	deprecation warning.
	(objc_build_setter_call, objc_build_message_expr,
	objc_finish_foreach_loop): Updated call to
	objc_finish_message_expr.
	
In gcc/objcp/:
2010-12-29  Nicola Pero  <nicola.pero@meta-innovation.com>

	* objcp-lang.c (objcp_tsubst_copy_and_build): Update call to
	objc_finish_message_expr.

In gcc/testsuite/:
2010-12-29  Nicola Pero  <nicola.pero@meta-innovation.com>

	PR objc/47075
	* objc.dg/property/at-property-deprecated-1.m: Updated.
	* objc.dg/property/at-property-deprecated-2.m: New.
	* objc.dg/property/dotsyntax-deprecated-1.m: New.
	* obj-c++.dg/property/at-property-deprecated-1.mm: Updated.
	* obj-c++.dg/property/at-property-deprecated-2.mm: New.
	* obj-c++.dg/property/dotsyntax-deprecated-1.mm: New.

From-SVN: r168315
2010-12-29 12:22:09 +00:00
Nicola Pero db0581ae63 In gcc/objc/: 2010-12-28 Nicola Pero <nicola.pero@meta-innovation.com>
In gcc/objc/:
2010-12-28  Nicola Pero  <nicola.pero@meta-innovation.com>

	PR objc/47076
	* objc-act.c (lookup_protocol): Added 'definition_required'
	argument.  If 'definition_required', and the protocol is not
	defined, emit a warning.
	(objc_declare_protocols): Updated call to lookup_protocol.
	(start_protocol): Same change.
	(check_protocol_recursively): Same change.
	(objc_build_protocol_expr): Same change.
	(lookup_and_install_protocols): Added definition_required argument.
	Pass it to lookup_protocol.
	(objc_get_protocol_qualified_type): Updated call to
	lookup_and_install_protocols.
	(start_class): Updated calls to lookup_and_install_protocols; pass
	true to 'definition_required' to get the warnings.
	(start_protocol): Updated calls to lookup_and_install_protocols.

In gcc/testsuite/:
2010-12-28  Nicola Pero  <nicola.pero@meta-innovation.com>

	PR objc/47076
	* objc.dg/protocol-forward-1.m: New.
	* obj-c++.dg/protocol-forward-1.mm: New.
	* objc.dg/attributes/proto-attribute-2.m: Updated.
	* objc.dg/class-protocol-1.m: Updated.
	* obj-c++.dg/attributes/proto-attribute-2.mm: Updated.
	* obj-c++.dg/class-protocol-1.mm: Updated.

From-SVN: r168307
2010-12-29 01:16:55 +00:00
Nicola Pero 35bce82a80 In gcc/objc/: 2010-12-28 Nicola Pero <nicola.pero@meta-innovation.com>
In gcc/objc/:
2010-12-28  Nicola Pero  <nicola.pero@meta-innovation.com>

	* objc-act.c (objc_start_category_interface): Produce an error if
	a class extension is found after the class @implementation.

In gcc/testsuite/:
2010-12-28  Nicola Pero  <nicola.pero@meta-innovation.com>

	* objc.dg/class-extension-4.m: New.
	* obj-c++.dg/class-extension-4.mm: New.

From-SVN: r168294
2010-12-28 12:39:29 +00:00
Nicola Pero 333031f2d3 In gcc/testsuite/: 2010-12-28 Nicola Pero <nicola.pero@meta-innovation.com>
In gcc/testsuite/:
2010-12-28  Nicola Pero  <nicola.pero@meta-innovation.com>

	PR objc/47073
	* objc.dg/incomplete-type-1.m: New test.

In gcc/objc/:
2010-12-28  Nicola Pero  <nicola.pero@meta-innovation.com>

	PR objc/47073
	* objc-act.c (encode_method_prototype): Fixed both location and
	format string of error "type %qT does not have a known size".

From-SVN: r168285
2010-12-28 03:40:58 +00:00
Nicola Pero b992d9b062 In gcc/testsuite/: 2010-12-26 Nicola Pero <nicola.pero@meta-innovation.com>
In gcc/testsuite/:
2010-12-26  Nicola Pero  <nicola.pero@meta-innovation.com>

	* objc.dg/pr44509.m: New.

In gcc/objc/:
2010-12-26  Nicola Pero  <nicola.pero@meta-innovation.com>

	* config-lang.in (gtfiles): Added c-family/c-cppbuiltin.c.

In gcc/objcp/:
2010-12-26  Nicola Pero  <nicola.pero@meta-innovation.com>

	* config-lang.in (gtfiles): Added c-family/c-cppbuiltin.c.

From-SVN: r168254
2010-12-26 18:21:38 +00:00
Nathan Froyd f4da8dce7a c-aux-info.c (gen_formal_list_for_type): Use prototype_p.
gcc/
	* c-aux-info.c (gen_formal_list_for_type): Use prototype_p.
	* c-decl.c (diagnose_arglist_conflict): Likewise.
	(diagnose_mismatched_decls, merge_decls): Likewise.
	(c_builtin_function, c_builtin_function_ext_scope): Likewise.
	(start_decl, start_function): Likewise.
	* c-tree.h (C_DECL_ISNT_PROTOTYPED): Likewise.
	* config/ia64/ia64.h (INIT_CUMULATIVE_ARGS): Likewise.
	* config/mep/mep.c (mep_validate_interrupt): Likewise.
	* config/pa/pa.h (INIT_CUMULATIVE_ARGS): Likewise.
	* config/rs6000/rs6000.c (init_cumulative_args): Likewise.
	* config/sh/sh.c (sh_init_cumulative_args): Likewise.
	* config/sparc/sparc.c (init_cumulative_args): Likewise.
	* dwarf2out.c (add_prototyped_attribute): Likewise.
	(gen_subprogram_die): Likewise.
	* ipa-type-escape.c (check_function_parameter_and_return_types):
	Likewise.
	(check_call): Likewise.
	* tree-ssa.c (useless_type_conversion_p): Likewise.

gcc/ada/
	* gcc-interface/utils.c (handle_nonnull_attribute): Use prototype_p.
	(handle_sentinel_attribute): Likewise.

gcc/c-family/
	* c-common.c (handle_nonnull_attribute, handle_sentinel_attribute):
	Use prototype_p.

gcc/cp/
	* decl.c (decls_match, duplicate_decls): Use prototype_p.
	* pt.c (push_template_decl_real): Likewise.

gcc/lto/
	* lto-lang.c (handle_nonnull_attribute, handle_sentinel_attribute):
	Use prototype_p.

gcc/objc/
	* objc-act.c (next_sjlj_build_enter_and_setjmp): Use prototype_p.

From-SVN: r168181
2010-12-22 19:45:58 +00:00
Nicola Pero 46270f141b In gcc/: 2010-12-18 Nicola Pero <nicola.pero@meta-innovation.com>
In gcc/:
2010-12-18  Nicola Pero  <nicola.pero@meta-innovation.com>

	* c-parser.c (c_parser_objc_try_catch_finally_statement): Call
	objc_maybe_warn_exceptions.
	(c_parser_objc_synchronized_statement): Call
	objc_maybe_warn_exceptions.
	
In gcc/cp/:
2010-12-18  Nicola Pero  <nicola.pero@meta-innovation.com>

	* parser.c (cp_parser_objc_try_catch_finally_statement): Call
	objc_maybe_warn_exceptions.
	(cp_parser_objc_synchronized_statement): Same change.

In gcc/c-family/:
2010-12-18  Nicola Pero  <nicola.pero@meta-innovation.com>

	* c-objc.h (objc_maybe_warn_exceptions): New.
	* stub-objc.c (objc_maybe_warn_exceptions): New.	
	
In gcc/objc/:
2010-12-18  Nicola Pero  <nicola.pero@meta-innovation.com>

	* objc-act.c (objc_init): Call using_eh_for_cleanups.
	(objc_init_exceptions): Renamed to objc_maybe_warn_exceptions.  Do
	not call using_eh_for_cleanups.
	(objc_begin_try_stmt): Do not call objc_init_exceptions.
	(objc_build_throw_stmt): Updated call to
	objc_maybe_warn_exceptions.

In gcc/testsuite/:
2010-12-18  Nicola Pero  <nicola.pero@meta-innovation.com>

	* objc.dg/fobjc-exceptions-1.m: Updated.
	* objc.dg/fobjc-exceptions-2.m: New.
	* objc.dg/fobjc-exceptions-3.m: New.
	* obj-c++.dg/fobjc-exceptions-1.mm: New.
	* obj-c++.dg/fobjc-exceptions-2.mm: New.
	* obj-c++.dg/fobjc-exceptions-3.mm: New.

From-SVN: r168032
2010-12-18 20:28:07 +00:00
Iain Sandoe 5287cfd594 objc-act.c (objc_eh_personality): Select personality name on runtime.
gcc/objc:

	* objc/objc-act.c (objc_eh_personality): Select personality name on
	runtime.
	(objc_init_exceptions): New.
	(objc_begin_try_stmt): Use objc_init_exceptions.
	(objc_build_throw_stmt): Likewise.

gcc/testsuite:

	* fobjc-exceptions.m: Update dg-error syntax.

From-SVN: r168020
2010-12-18 11:28:46 +00:00
Nicola Pero ec3e9f8267 In gcc/: 2010-12-10 Nicola Pero <nicola.pero@meta-innovation.com>
In gcc/:
2010-12-10  Nicola Pero  <nicola.pero@meta-innovation.com>

	* c-parser.c (c_parser_objc_class_definition): Recognize
	Objective-C 2.0 class extensions.

In gcc/cp/:
2010-12-10  Nicola Pero  <nicola.pero@meta-innovation.com>

	* parser.c (cp_parser_objc_superclass_or_category): Recognize
	Objective-C 2.0 class extensions.  Added iface_p and
	is_class_extension arguments.
	(cp_parser_objc_class_interface): Updated call to
	cp_parser_objc_superclass_or_category.
	(cp_parser_objc_class_implementation): Same change.
	
In gcc/objc/:
2010-12-10  Nicola Pero  <nicola.pero@meta-innovation.com>

	* objc-act.c (objc_in_class_extension): New.
	(objc_start_category_interface): If -fobjc-std=objc1
	was specified, produce an error if a class extension is used.
	(objc_finish_interface): Reset objc_in_class_extension to false.
	(objc_add_property_declaration): Allow a class extension to extend
	readonly properties in the main @interface to be readwrite.
	(start_class): Added code to deal with class extensions.  In that
	case, return the existing interface after adding any additional
	protocols to it and setting objc_in_class_extension to true.
	(continue_class): If in a class extension, do not generate the
	instance variable template.

In gcc/testsuite/:
2010-12-10  Nicola Pero  <nicola.pero@meta-innovation.com>

	* objc.dg/class-extension-1.m: New.
	* objc.dg/class-extension-2.m: New.
	* objc.dg/class-extension-3.m: New.
	* objc.dg/property/at-property-26.m: New.
	* objc.dg/property/at-property-27.m: New.
	* objc.dg/property/at-property-28.m: New.
	* obj-c++.dg/class-extension-1.mm: New.
	* obj-c++.dg/class-extension-2.mm: New.
	* obj-c++.dg/class-extension-3.mm: New.
	* obj-c++.dg/property/at-property-26.mm: New.
	* obj-c++.dg/property/at-property-27.mm: New.
	* obj-c++.dg/property/at-property-28.mm: New.

From-SVN: r167680
2010-12-10 09:38:52 +00:00
Nicola Pero 6347cf3119 In gcc/objc/: 2010-12-08 Nicola Pero <nicola.pero@meta-innovation.com>
In gcc/objc/:
2010-12-08  Nicola Pero  <nicola.pero@meta-innovation.com>

	* objc-act.c (objc_build_throw_stmt): Check that the argument of
	@throw is an object and emit an error if not.

In gcc/testsuite/:
2010-12-08  Nicola Pero  <nicola.pero@meta-innovation.com>

	* objc.dg/exceptions-7.m: New.
	* obj-c++.dg/exceptions-7.mm: New.
	* obj-c++.dg/exceptions-3.mm: Adjust for new C++ messages.
	* obj-c++.dg/exceptions-5.mm: Same change.

From-SVN: r167615
2010-12-08 23:46:28 +00:00
Nicola Pero 7c35d89dca In gcc/objc/: 2010-12-08 Nicola Pero <nicola.pero@meta-innovation.com>
In gcc/objc/:
2010-12-08  Nicola Pero  <nicola.pero@meta-innovation.com>

	* objc-act.c (objc_finish_foreach_loop): Use error_at() instead of
	error() when printing an error about the iterating variable or
	collection not being an object.

In gcc/testsuite/:
2010-12-08  Nicola Pero  <nicola.pero@meta-innovation.com>

	* objc.dg/foreach-6.m: Updated location of error messages.
	* objc.dg/foreach-7.m: Same change.

From-SVN: r167610
2010-12-08 23:20:21 +00:00
Nicola Pero 69a9720167 In gcc/: 2010-12-06 Nicola Pero <nicola.pero@meta-innovation.com>
In gcc/:
2010-12-06  Nicola Pero  <nicola.pero@meta-innovation.com>

	* c-parser.c (c_parser_for_statement): Use c_fully_fold() instead
	of c_process_expr_stmt() for the iterating and collection
	expressions of an Objective-C fast enumeration loop.

In gcc/objc/:
2010-12-06  Nicola Pero  <nicola.pero@meta-innovation.com>

	* objc-act.c (objc_finish_foreach_loop): Mark the
	object_expression as used.

In gcc/testsuite/:
2010-12-06  Nicola Pero  <nicola.pero@meta-innovation.com>

	* objc.dg/foreach-8.m: New.

From-SVN: r167518
2010-12-06 21:27:01 +00:00
Nicola Pero 61d3ce2026 In gcc/: 2010-12-06 Nicola Pero <nicola.pero@meta-innovation.com>
In gcc/:
2010-12-06  Nicola Pero  <nicola.pero@meta-innovation.com>

	* c-family/c-common.h: Removed the declarations of all the objc_
	callbacks, and moved them into c-objc.h.  Removed
	objc_ivar_visibility_kind and moved it into c-objc.h.
	* c-family/c-objc.h: New file.
	* c-family/c-common.c: Include c-objc.h.
	* c-family/c-format.c: Same change.
	* c-family/stub-objc.c: Same change.
	* c-decl.c: Include c-family/c-objc.h.
	* c-parser.c: Same change.	
	* c-typeck.c: Same change.
	* c-config-lang.in (gtfiles): Added c-family/c-objc.h.
	* Makefile.in (c-decl.o): Depend on c-family/c-objc.h.
	(c-parser.o): same change.
	(c-typeck.o): Same change.
	(c-family/c-format.o): Same change.
	(c-family/stub-objc.o): Same change.
	(c-family/c-common.o): Same change.
	(PLUGIN_HEADERS): Added c-family/c-objc.h.
	
In gcc/cp/:
2010-12-06  Nicola Pero  <nicola.pero@meta-innovation.com>

	* call.c: Include c-family/c-objc.h.
	* decl.c: Same change.
	* decl2.c: Same change.
	* error.c: Same change.
	* lex.c: Same change.
	* parser.c: Same change.
	* pt.c: Same change.
	* semantics.c: Same change.
	* typeck.c: Same change.
	* Make-lang.in (cp/decl.o): Depend on c-family/c-objc.h.
	(cp/decl2.o): Same change.
	(cp/call.o): Same change.
	(cp/error.o): Same change.
	(cp/lex.o): Same change.
	(cp/parser.o): Same change.
	(cp/pt.o): Same change.
	(cp/semantics.o): Same change.
	(cp/typeck.o): Same change.
	* config-lang.in (gtfiles): Added c-family/c-objc.h.
	
In gcc/objc/:
2010-12-06  Nicola Pero  <nicola.pero@meta-innovation.com>

	* objc-act.c: Include c-family/c-objc.h.
	* objc-lang.c: Same change.
	* Make-lang.in (objc/objc-act.o): Depend on
	c-family/c-objc.h.
	(objc/objc-lang.o): Same change.
	* config-lang.in (gtfiles): Added c-family/c-objc.h.
	
In gcc/objcp/:
2010-12-06  Nicola Pero  <nicola.pero@meta-innovation.com>

	* config-lang.in (gtfiles): Added c-family/c-objc.h.
	* Make-lang.in (objcp/objcp-act.o): Depend on
	c-family/c-objc.h.
	(objcp/objcp-lang.o): Same change.
	(objcp/objcp-decl.o): Same change.
	* objcp-lang.c: Include c-family/c-objc.h.
	* objcp-decl.c: Same change.

From-SVN: r167481
2010-12-06 00:56:06 +00:00
Joseph Myers 3028a95cd6 gcc.c (trad_capable_cpp, [...]): Don't handle -ftraditional.
* gcc.c (trad_capable_cpp, default_compilers): Don't handle
	-ftraditional.

objc:
	* lang-specs.h: Don't handle -ftraditional.

From-SVN: r167385
2010-12-02 19:39:16 +00:00