Age | Commit message (Collapse) | Author | Files | Lines |
|
PR c/25309
* c-common.c (complete_array_type): Diagnose too-large arrays and
set type to error_mark_node.
testsuite:
* gcc.dg/large-size-array-2.c: Expect diagnostic for too-large
array.
* gcc.dg/large-size-array-4.c: New. Copy of large-size-array-2.c
without -O2.
From-SVN: r128811
|
|
CALL_EXPR_FN directly to test for...
* expr.c (expand_expr_real_1) <case CALL_EXPR>: Use get_callee_fndecl
instead of checking CALL_EXPR_FN directly to test for builtins.
If error or warning attributes are present, print
error resp. warning.
* c-common.c (handle_error_attribute): New function.
(c_common_attribute_table): Add error and warning
attributes.
* doc/extend.texi: Document error and warning attributes.
* gcc.dg/va-arg-pack-len-1.c: Use error and warning
attributes.
* gcc.dg/va-arg-pack-len-2.c: New test.
* g++.dg/ext/va-arg-pack-len-1.C: Use error and warning
attributes.
* g++.dg/ext/va-arg-pack-len-2.C: New test.
From-SVN: r128687
|
|
* tree.h (block_nonartificial_location): New prototype.
* tree.c (block_nonartificial_location): New function.
* dwarf2out.c (gen_subprogram_die): Add DW_AT_artificial
if artificial attribute is present on abstract inline decl.
* c-common.c (handle_artificial_attribute): New function.
(c_common_attribute_table): Add artificial attribute.
* final.c (override_filename, override_linenum): New variables.
(final_scan_insn): For DBX_DEBUG or SDB_DEBUG, set override_filename
and override_linenum if inside of a block inlined from
__attribute__((__artificial__)) function.
(notice_source_line): Honor override_filename and override_linenum.
* doc/extend.texi: Document __attribute__((__artificial__)).
* config/i386/emmintrin.h: Add __artificial__ attribute to
all __always_inline__ functions.
* config/i386/mmintrin.h: Likewise.
* config/i386/tmmintrin.h: Likewise.
* config/i386/mm3dnow.h: Likewise.
* config/i386/pmmintrin.h: Likewise.
* config/i386/ammintrin.h: Likewise.
* config/i386/xmmintrin.h: Likewise.
* config/i386/smmintrin.h: Likewise.
* config/i386/bmmintrin.h: Likewise.
* config/i386/mmintrin-common.h: Likewise.
From-SVN: r128686
|
|
gcc
* c-common.c (fname_as_string): Update.
* c-parser.c (c_parser) <lex_untranslated_string>: New field.
(c_lex_one_token): Update. Add 'parser' argument.
(c_parser_simple_asm_expr): Update.
(c_parser_attributes): Update.
(c_parser_asm_statement): Update.
(c_parser_asm_operands): Update.
(c_parser_peek_token): Update.
(c_parser_peek_2nd_token): Update.
* c-lex.c (c_lex_string_translate): Remove.
(c_lex_return_raw_strings): Likewise.
(c_lex_with_flags): Added 'lex_flags' argument.
(lex_string): Added 'translate' argument.
* c-pragma.h (c_lex_with_flags): Update.
(c_lex_string_translate, c_lex_return_raw_strings): Remove.
(C_LEX_STRING_NO_TRANSLATE): New define.
(C_LEX_RAW_STRINGS): Likewise.
gcc/cp
* parser.c (cp_lexer_new_main): Don't use
c_lex_return_raw_strings.
(cp_lexer_get_preprocessor_token): Update. Add special case when
lexer is NULL.
From-SVN: r128479
|
|
* decl.c (java_expand_body): Kill.
(LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Kill.
* toplev.c (process_options): all frontends now do unit-at-a-time.
* cgraphunit.c: update comments.
(cgraph_expand_function): call passmanager dirrectly; emit thunks.
* c-decl.c (finish_function): use cgraph_add_new_function.
* method.c (use_thunk): Use tree_rest_of_compilation
* cp-objecp-common.h (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Kill.
(LANG_HOOKS_CALLGRAPH_EMIT_ASSOCIATED_THUNKS): Define.
* cp-tree.h (expand_body): Kill.
(emit_associated_thunks): Declare.
* semantics.c (emit_associated_thunks): Export.
(expand_body): Kill.
* misc.c (gnat_expand_body): Kill.
(LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Kill.
* f95-lang.c (gfc_expand_function): Kill.
(LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Kill.
* function.c (expand_function_end): We are always unit-at-a-time.
From-SVN: r128367
|
|
* c-common.c (const_strip_array_types): Delete.
* c-common.h (const_strip_array_types): Likewise.
* emit-rtl.c (const_next_insn, const_previous_insn,
const_next_nonnote_insn, const_prev_nonnote_insn,
const_next_real_insn, const_prev_real_insn,
const_next_active_insn, const_prev_active_insn, const_next_label,
const_prev_label): Delete.
* gimple-low.c (block_may_fallthru): Use expr_last.
* jump.c (reversed_comparison_code_parts): Use prev_nonnote_insn.
* rtl.h (const_previous_insn, const_next_insn,
const_prev_nonnote_insn, const_next_nonnote_insn,
const_prev_real_insn, const_next_real_insn,
const_prev_active_insn, const_next_active_insn, const_prev_label,
const_next_label): Delete.
* rtlanal.c (keep_with_call_p): Use next_nonnote_insn.
* system.h (CONST_CAST): Update comment.
* tree-cfg.c (tree_can_merge_blocks_p): Use last_stmt.
(const_first_stmt, const_last_stmt): Delete.
(tree_block_ends_with_condjump_p): Use last_stmt.
* tree-flow.h (const_first_stmt, const_last_stmt): Delete.
* tree-iterator.c (const_expr_first, const_expr_last,
const_expr_only): Delete.
* tree.c (const_lookup_attribute): Likewise.
(attribute_list_contained): Use lookup_attribute.
* tree.h (const_lookup_attribute, const_expr_first,
const_expr_last, const_expr_only): Delete.
cp:
* tree.c (pod_type_p, zero_init_p): Use strip_array_types.
* typeck.c (cp_type_quals, cp_type_readonly, cp_has_mutable_p):
Likewise.
From-SVN: r128014
|
|
2007-08-28 Richard Guenther <rguenther@suse.de>
* tree.h (DECL_DISREGARD_INLINE_LIMITS): New.
(struct tree_function_decl): Make function_code a bitfield.
Add disregard_inline_limits flag.
* cgraphunit.c (cgraph_process_new_functions): Check
DECL_DISREGARD_INLINE_LIMITS instead of disregard_inline_limits_p.
(cgraph_preserve_function_body_p): Likewise.
* ipa-inline.c (compute_inline_parameters): Likewise.
* c-decl.c (finish_function): Set DECL_DISREGARD_INLINE_LIMITS
for GNU C extern inline functions.
(merge_decls): Merge DECL_DISREGARD_INLINE_LIMITS.
* tree-inline.c (disregard_inline_limits_p): Remove.
* tree-inline.h (disregard_inline_limits_p): Likewise.
* c-common.c (handle_always_inline_attribute): Set
DECL_DISREGARD_INLINE_LIMITS.
* langhooks.c (add_builtin_function): Verify the function code
fits in the bitfield.
cp/
* decl.c (duplicate_decls): Merge DECL_DISREGARD_INLINE_LIMITS.
From-SVN: r127851
|
|
* c-common.c (vector_types_convertible_p,
decl_with_nonnull_addr_p, c_promoting_integer_type_p,
self_promoting_args_p): Constify.
* c-common.h (has_c_linkage, decl_with_nonnull_addr_p,
c_promoting_integer_type_p, self_promoting_args_p,
anon_aggr_type_p, vector_types_convertible_p): Likewise.
* c-decl.c (anon_aggr_type_p): Likewise.
* * c-dump.c (dump_stmt): Likewise.
* c-objc-common.c (has_c_linkage): Likewise.
* c-tree.h (same_translation_unit_p): Likewise.
* c-typeck.c (null_pointer_constant_p,
tagged_types_tu_compatible_p, function_types_compatible_p,
type_lists_compatible_p, lvalue_or_else, lvalue_p,
comptypes_internal, struct tagged_tu_seen_cache,
same_translation_unit_p, alloc_tagged_tu_seen_cache,
c_size_in_bytes): Likewise.
* ggc-common.c (compare_ptr_data, hash_descriptor, eq_descriptor,
hash_ptr, eq_ptr): Likewise.
* langhooks-def.h (lhd_decl_ok_for_sibcall,
LANG_HOOKS_OMP_PRIVATIZE_BY_REFERENCE): Likewise.
* langhooks.c (lhd_decl_ok_for_sibcall): Likewise.
* langhooks.h (ok_for_sibcall, omp_privatize_by_reference):
Likewise.
* optabs.c (optab_for_tree_code): Likewise.
* optabs.h (optab_for_tree_code): Likewise.
* rtl.h (simplify_rtx): Likewise.
* simplify-rtx.c (simplify_rtx): Likewise.
* tree-dump.c (queue, queue_and_dump_index, queue_and_dump_type,
dump_flag, dump_node): Likewise.
* tree-dump.h (struct dump_info, dump_stmt, queue_and_dump_index,
queue_and_dump_type, dump_flag): Likewise.
* tree-flow.h (vect_can_force_dr_alignment_p): Likewise.
* tree-pass.h (dump_node): Likewise.
* tree-vectorizer.c (vect_can_force_dr_alignment_p,
supportable_narrowing_operation): Likewise.
* tree-vectorizer.h (vect_can_force_dr_alignment_p,
supportable_narrowing_operation): Likewise.
* tree-vrp.c (needs_overflow_infinity, supports_overflow_infinity,
is_negative_overflow_infinity, is_positive_overflow_infinity,
is_overflow_infinity, vrp_val_is_max, vrp_val_is_min,
nonnull_arg_p, get_value_range, vrp_operand_equal_p,
update_value_range, add_equivalence, ssa_name_nonnegative_p,
ssa_name_nonzero_p, fp_predicate): Likewise.
* tree.c (auto_var_in_fn_p, empty_body_p): Likewise.
* tree.h (empty_body_p, auto_var_in_fn_p, ssa_name_nonzero_p,
ssa_name_nonnegative_p): Likewise.
cp:
* call.c (sufficient_parms_p): Constify.
* class.c (same_signature_p): Likewise.
* cp-gimplify.c (is_invisiref_parm,
cxx_omp_privatize_by_reference): Likewise.
* cp-objcp-common.c (has_c_linkage): Likewise.
* cp-tree.h (NON_THUNK_FUNCTION_CHECK, THUNK_FUNCTION_CHECK,
sufficient_parms_p, same_signature_p, copy_fn_p, move_fn_p,
grok_ctor_properties, nothrow_libfn_p, skip_artificial_parms_for,
num_artificial_parms_for, comp_template_parms,
template_parameter_pack_p, any_dependent_template_arguments_p,
any_type_dependent_arguments_p, any_value_dependent_elements_p,
repo_export_class_p, cxx_omp_privatize_by_reference, pod_type_p,
zero_init_p, member_p, cp_lvalue_kind,
builtin_valid_in_constant_expr_p, decl_anon_ns_mem_p,
varargs_function_p, is_dummy_object, special_function_kind,
string_conv_p, type_unknown_p, comp_except_specs, compparms,
comp_cv_qualification, is_bitfield_expr_with_lowered_type,
unlowered_expr_type, ptr_reasonably_similar, cp_type_readonly,
cp_has_mutable_p, at_least_as_qualified_p,
invalid_nonstatic_memfn_p, lvalue_or_else, lvalue_p): Likewise.
* decl.c (copy_fn_p, move_fn_p, grok_ctor_properties): Likewise.
* except.c (nothrow_libfn_p): Likewise.
* method.c (skip_artificial_parms_for, num_artificial_parms_for):
Likewise.
* pt.c (comp_template_parms, template_parameter_pack_p,
any_type_dependent_arguments_p, any_value_dependent_elements_p,
any_dependent_template_arguments_p): Likewise.
* repo.c (repo_export_class_p): Likewise.
* semantics.c (anon_aggr_type_p): Likewise.
* tree.c (lvalue_p_1, real_lvalue_p, lvalue_p,
builtin_valid_in_constant_expr_p, decl_anon_ns_mem_p,
varargs_function_p, member_p, is_dummy_object, pod_type_p,
zero_init_p, special_function_p): Likewise.
* typeck.c (comp_array_types, type_unknown_p, comp_except_specs,
comp_array_types, at_least_as_qualified_p, comp_cv_qualification,
compparms, invalid_nonstatic_memfn_p,
is_bitfield_expr_with_lowered_type, unlowered_expr_type,
string_conv_p, ptr_reasonably_similar, cp_type_readonly,
cp_has_mutable_p, lvalue_or_else): Likewise.
fortran:
* trans-openmp.c (gfc_omp_privatize_by_reference): Constify.
* trans.h (gfc_omp_privatize_by_reference): Likewise.
java:
* lang.c (java_decl_ok_for_sibcall): Likewise.
From-SVN: r127799
|
|
RID_ACCUM.
* c-common.h (enum rid): Add new enumeration values of RID_SAT,
RID_FRACT, and RID_ACCUM. RID_SAT needs to be inserted before
RID_ONEWAY, so that it can be checked in declspecs_add_type.
(c_common_fixed_point_type_for_size): Declare.
* c-parser.c (reswords): Add _Fract, _Accum, and _Sat.
(c_token_starts_typename): Handle RID_FRACT, RID_ACCUM, and RID_SAT.
(c_token_starts_declspecs): Likewise.
(c_parser_declspecs): Likewise.
(c_parser_attributes): Likewise.
* c-tree.h (enum c_typespec_keyword): Add cts_fract and cts_accum.
(c_declspecs): Add saturating_p.
* c-decl.c (build_null_declspecs): Initialize saturating_p.
(declspecs_add_type): Avoid using complex with _Fract, _Accum, or _Sat.
Handle RID_SAT.
Avoid using void, bool, char, int, float, double, _Decimal32,
_Decimal64, _Decimal128, and complex with _Sat.
Handle RID_FRACT and RID_ACCUM.
Make sure _Sat is used with _Fract or _Accum.
(finish_declspecs): Handle cts_fract and cts_accum.
* c-common.c (fixed-value.h): New include.
(constant_expression_warning): Handle FIXED_CST.
(overflow_warning): Likewise.
(warnings_for_convert_and_check): Likewise.
(c_common_fixed_point_type_for_size): New.
(c_common_type_for_mode): Handle fixed-point modes to
return various saturating/non-saturating, signed/unsigned types.
(c_common_signed_or_unsigned_type): Support fixed-point types.
(shorten_compare): Check fixed-point zero.
Handle FIXED_POINT_TYPE.
(c_common_truthvalue_conversion): Handle FIXED_CST.
Handle FIXED_POINT_TYPE.
(c_common_nodes_and_builtins): Record builtin types for fixed-point
types.
(handle_mode_attribute): Handle fixed-point modes. Need to check
if the signness of base type and fixed-point modes are consistent.
(handle_vector_size_attribute): Handle fixed-point modes.
(same_scalar_type_ignoring_signedness): Handle FIXED_POINT_TYPE.
(warn_for_div_by_zero): Check fixed-point zero.
* c-typeck.c (c_common_type): Check FIXED_POINT_TYPE. Build
a common fixed-point type based on fbit, ibit, sign, and saturation.
(build_unary_op): Allow FIXED_POINT_TYPE for CONVERT_EXPR,
NEGATE_EXPR, TRUTH_NOT_EXPR, PREINCREMENT_EXPR, POSTINCREMENT_EXPR,
PREDECREMENT_EXPR, and POSTDECREMENT_EXPR.
(convert_for_assignment): Support FIXED_POINT_TYPE.
(digest_init): Handle FIXED_POINT_TYPE.
(build_binary_op): Support FIXED_POINT_TYPE in *_DIV_EXPR,
TRUTH_ANDIF_EXPR, TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR,
TRUTH_XOR_EXPR, RSHIFT_EXPR, LSHIFT_EXPR, EQ_EXPR, NE_EXPR, LE_EXPR,
GE_EXPR, LT_EXPR, GT_EXPR.
* target-def.h (TARGET_FIXED_POINT_SUPPORTED_P): New.
(TARGET_INITIALIZER): Add TARGET_FIXED_POINT_SUPPORTED_P.
* target.h (gcc_target): Add fixed_point_supported_p.
* targhooks.c (default_scalar_mode_supported_p): Handle MODE_FRACT,
MODE_UFRACT, MODE_ACCUM, and MODE_UACCUM.
(default_fixed_point_supported_p): Define.
* targhooks.h (default_fixed_point_supported_p): Declare.
* doc/tm.texi (TARGET_FIXED_POINT_SUPPORTED_P): Add.
* doc/install.texi (Configuration): Add --enable-fixed-point.
* configure.ac (--enable-fixed-point): New to enable fixed-point
arithmetic extension to C. For mips targets, we enable it by default.
* configure, config.in: Regenerate.
From-SVN: r127652
|
|
* c-common.c (const_strip_array_types): New.
* c-common.h (lang_missing_noreturn_ok_p): Delete.
(const_strip_array_types): New.
* c-objc-common.c (c_disregard_inline_limits,
c_warn_unused_global_decl): Constify.
* c-tree.h (c_disregard_inline_limits, c_warn_unused_global_decl,
c_vla_type_p, c_incomplete_type_error): Likewise.
* c-typeck.c (c_incomplete_type_error, c_vla_type_p): Likewise.
* hooks.c (hook_bool_const_tree_false): New.
* hooks.h (hook_bool_const_tree_false): Likewise.
* langhooks-def.h (lhd_warn_unused_global_decl,
lhd_incomplete_type_error, lhd_expr_size,
lhd_tree_inlining_disregard_inline_limits,
lhd_tree_inlining_auto_var_in_fn_p, lhd_tree_dump_type_quals,
LANG_HOOKS_GENERIC_TYPE_P, LANG_HOOKS_TYPE_MAX_SIZE): Constify.
* langhooks.c (lhd_warn_unused_global_decl,
lhd_incomplete_type_error,
lhd_tree_inlining_disregard_inline_limits,
lhd_tree_inlining_auto_var_in_fn_p, lhd_tree_dump_type_quals,
lhd_expr_size): Likewise.
* langhooks.h (lang_hooks_for_tree_inlining,
lang_hooks_for_tree_dump, lang_hooks_for_types,
lang_hooks_for_decls, lang_hooks): Likewise.
* pointer-set.c (pointer_set_t, pointer_set_create,
pointer_set_contains, insert_aux, pointer_set_insert,
pointer_set_traverse, pointer_map_t, pointer_map_create,
pointer_map_contains, pointer_map_insert, pointer_map_traverse):
Likewise.
* pointer-set.h (pointer_set_contains, pointer_set_insert,
pointer_set_traverse, pointer_map_contains, pointer_map_insert,
pointer_map_traverse): Likewise.
* predict.c (assert_is_empty): Likewise.
* tree-affine.c (free_name_expansion): Likewise.
* tree-cfg.c (edge_to_cases_cleanup): Likewise.
* tree.c (size_in_bytes, max_int_size_in_bytes): Likewise.
* tree.h (size_in_bytes, max_int_size_in_bytes): Likewise.
ada:
* misc.c (gnat_type_max_size): Constify.
cp:
* cp-objcp-common.c (cxx_warn_unused_global_decl, cp_expr_size):
Constify.
* cp-tree.h (local_variable_p, nonstatic_local_decl_p,
class_tmpl_impl_spec_p, cp_auto_var_in_fn_p, cp_type_quals,
cxx_incomplete_type_diagnostic, cxx_incomplete_type_error,
cxx_warn_unused_global_decl, cp_expr_size): Likewise.
* decl.c (local_variable_p, nonstatic_local_decl_p): Likewise.
* tree.c (class_tmpl_impl_spec_p, cp_auto_var_in_fn_p): Likewise.
* typeck.c (cp_type_quals): Likewise.
* typeck2.c (cxx_incomplete_type_diagnostic,
cxx_incomplete_type_error): Likewise.
From-SVN: r127560
|
|
./: * alias.h (alias_set_type): Define new type.
(ALIAS_SET_MEMORY_BARRIER): Use it.
* rtl.h: Include alias.h.
(struct mem_attrs): Use alias_set_type.
* tree.h: Include alias.h
(struct tree_type): Use alias_set_type.
(struct tree_struct_field_tag): Likewise.
(struct tree_decl_common): Likewise.
* alias.c (struct alias_set_entry): Use alias_set_type.
(get_alias_set_entry, alias_set_subset_of): Likewise.
(alias_sets_conflict_p): Likewise.
(alias_sets_must_conflict_p): Likewise.
(objects_must_conflict_p): Likewise.
(get_alias_set, new_alias_set): Likewise.
(record_alias_subset, record_component_aliases): Likewise.
(varargs_set, frame_set): Change to alias_set_type.
(get_varargs_alias_set): Use alias_set_type.
(get_frame_alias_set): Likewise.
* builtins.c (setjmp_alias_set): Change to alias_set_type.
* dse.c (struct store_info): Use alias_set_type.
(struct read_info, struct clear_alias_mode_holder): Likewise.
(clear_alias_set_lookup, canon_address): Likewise.
(record_store, check_mem_read_rtx): Likewise.
(dse_record_singleton_alias_set): Likewise.
(dse_invalidate_singleton_alias_set): Likewise.
* emit-rtl.c (get_mem_attrs): Likewise.
(set_mem_attributes_minus_bitpos): Likewise.
(set_mem_alias_set): Likewise.
* expr.c (store_constructor_field, store_field): Likewise.
* gimplify.c (struct gimplify_init_ctor_preeval_data): Likewise.
* langhooks.c (lhd_get_alias_set): Likewise.
* langhooks-def.h (lhd_get_alias_set): Likewise.
* reload1.c (alter_reg): Likewise.
* tree-flow.h (struct fieldoff): Likewise.
* tree-ssa-alias.c (struct alias_map_d): Likewise.
(may_alias_p, get_smt_for, create_sft): Likewise.
* tree-ssa-alias-warnings.c (nonstandard_alias_types_p): Likewise.
* tree-ssa-structalias.c (set_uids_in_ptset): Likewise.
(merge_smts_into): Likewise.
* varasm.c (const_alias_set): Likewise.
* c-common.c (strict_aliasing_warning): Likewise.
(c_common_get_alias_set): Likewise.
* dse.h (dse_record_singleton_alias_set): Update declaration.
(dse_invalidate_singleton_alias_set): Likewise.
* emit-rtl.h (set_mem_alias_set): Likewise.
* c-common.h (c_common_get_alias_set): Likewise.
* print-rtl.c (print_rtx): Cast MEM_ALIAS_SET when printing it.
* print-tree.c (print_node): Likewise.
* config/alpha/alpha.c (alpha_sr_alias_set): Change to
alias_set_type.
(alpha_setup_incoming_varargs): Use alias_set_type.
* config/i386/i386.c (setup_incoming_varargs_64): Use
alias_set_type.
(setup_incoming_varargs_ms_64): Likewise.
(ix86_GOT_alias_set): Likewise.
* config/mn10300/mn10300.c (mn10300_builtin_saveregs): Likewise.
* config/rs6000/rs6000.c (setup_incoming_varargs): Likewise.
(set): Change to alias_set_type.
(get_TOC_alias_set): Use alias_set_type.
* config/rs6000/rs6000-protos.h (get_TOC_alias_set): Update
declaration.
* config/sh/sh.c (sh_builtin_saveregs): Use alias_set_type.
* config/sparc/sparc.c (sparc_sr_alias_set): Change to
alias_set_type.
(struct_value_alias_set): Likewise.
* Makefile.in (GTFILES): Add $(srcdir)/alias.h.
ada/:
* misc.c (gnat_get_alias_set): Change return type to
alias_set_type.
cp/:
* cp-objcp-common.c (cxx_get_alias_set): Change return type to
alias_set_type.
* cp/cp-tree.h (cxx_get_alias_set): Update declaration.
fortran:/
* f95-lang.c (gfc_get_alias_set): Change return type to
alias_set_type.
From-SVN: r127362
|
|
License and to point readers at the COPYING3 file and the FSF's license web page.
From-SVN: r126948
|
|
* c-common.c (fname_as_string, c_type_hash): Constify.
* c-typeck.c (free_all_tagged_tu_seen_up_to): Likewise.
* cgraph.c (edge_hash, edge_eq): Likewise.
* dwarf2out.c (decl_die_table_eq, decl_loc_table_eq): Likewise.
* emit-rtl.c (mem_attrs_htab_eq, reg_attrs_htab_hash,
reg_attrs_htab_eq): Likewise.
* except.c (t2r_eq, t2r_hash, ttypes_filter_eq, ehl_hash, ehl_eq):
Likewise.
* genautomata.c (const_reserv_sets_t, const_unit_decl_t,
const_decl_t, const_state_t, const_automata_list_el_t): New.
(first_out_arc, DECL_UNIT, DECL_BYPASS, DECL_AUTOMATON, DECL_EXCL,
DECL_PRESENCE, DECL_ABSENCE, DECL_RESERV, DECL_INSN_RESERV,
automaton_decl_hash, automaton_decl_eq_p, insn_decl_hash,
insn_decl_eq_p, decl_hash, decl_eq_p, alt_state_cmp,
reserv_sets_cmp, reserv_sets_eq, state_hash, state_eq_p,
automata_list_hash, automata_list_eq_p, compare_states_for_equiv,
compare_max_occ_cycle_nums, out_state_arcs_num,
compare_transition_els_num, units_cmp, state_reservs_cmp):
Constify.
* genmodes.c (cmp_modes): Likewise.
* ggc-common.c (saving_htab_hash, saving_htab_eq): Likewise.
* gimplify.c (compare_case_labels): Likewise.
* ipa-type-escape.c (get_name_of_type, type_brand_s): Likewise.
* loop-unroll.c (si_info_hash, ve_info_hash): Likewise.
* matrix-reorg.c (mtt_info_hash): Likewise.
* postreload-gcse.c (hash_expr_for_htab, expr_equiv_p): Likewise.
* rtl-factoring.c (const_p_hash_bucket, const_p_hash_elem): New.
(htab_hash_bucket, htab_hash_elem): Constify.
* tree-browser.c (TB_parent_eq): Likewise.
* tree-scalar-evolution.c (hash_scev_info): Likewise.
* tree-ssa-alias.c (sort_tags_by_id): Likewise.
* tree-ssa-coalesce.c (const_coalesce_pair_p): New.
(coalesce_pair_map_hash, coalesce_pair_map_eq, compare_pairs):
Constify.
* tree-ssa-dom.c (avail_expr_hash, avail_expr_eq): Likewise.
* tree-ssa-pre.c (const_expr_pred_trans_t): New.
(expr_pred_trans_hash, expr_pred_trans_eq): Constify.
* tree-ssa-sccvn.c (const_vn_binary_op_t, const_vn_unary_op_t,
const_vn_phi_t, const_vn_reference_op_t, const_vn_reference_t):
New.
(vn_reference_op_eq, vn_reference_hash, vn_reference_eq,
vn_unary_op_hash, vn_unary_op_eq, vn_binary_op_hash,
vn_binary_op_eq, vn_phi_hash, vn_phi_eq): Constify.
* tree-ssa-threadupdate.c (redirection_data_hash,
redirection_data_eq): Likewise.
* tree-ssa-uncprop.c (equiv_hash, equiv_eq): Likewise.
* tree-ssa.c (var_ann_eq): Likewise.
* tree-vrp.c (compare_case_labels): Likewise.
* tree.c (int_cst_hash_hash, int_cst_hash_eq,
tree_map_base_marked_p, type_hash_marked_p, tree_check_failed,
tree_not_check_failed, tree_class_check_failed,
tree_range_check_failed, tree_not_class_check_failed,
omp_clause_check_failed, omp_clause_range_check_failed,
tree_contains_struct_check_failed, tree_operand_check_failed):
Likewise.
* tree.h (tree_contains_struct_check_failed, tree_check_failed,
tree_not_check_failed, tree_class_check_failed,
tree_range_check_failed, tree_not_class_check_failed,
tree_operand_check_failed, omp_clause_operand_check_failed,
tree_operand_length): Likewise.
* var-tracking.c (const_variable): New.
(variable_htab_hash, variable_htab_eq): Constify.
* varasm.c (const_desc_hash): Likewise.
cp:
* decl.c (typename_hash, typename_compare): Constify.
* mangle.c (hash_type, compare_type): Likewise.
* pt.c (eq_local_specializations, hash_local_specialization):
Likewise.
* tree.c (cplus_array_hash, cplus_array_compare, list_hash_eq,
list_hash): Likewise.
* typeck2.c (pat_compare): Likewise.
fortran:
* gfortran.h (generate_isocbinding_symbol): Constify.
* symbol.c (gen_special_c_interop_ptr, gen_cptr_param,
generate_isocbinding_symbol): Likewise.
java:
* class.c (java_treetreehash_hash, java_treetreehash_compare):
Constify.
* expr.c (type_assertion_eq): Likewise.
* jcf-io.c (compare_path): Likewise.
* jcf-parse.c (cmpstringp): Likewise.
* verify-impl.c (get_one_type, compute_argument_types,
compute_return_type): Likewise.
objc:
* objc-act.c (volatilized_hash, volatilized_eq, string_hash,
string_eq): Constify.
From-SVN: r126925
|
|
PR middle-end/32668
* builtin-attrs.def (ATTR_TYPEGENERIC,
ATTR_CONST_NOTHROW_TYPEGENERIC): New.
* builtins.def (BUILT_IN_ISINF, BUILT_IN_ISNAN,
BUILT_IN_ISGREATER, BUILT_IN_ISGREATEREQUAL, BUILT_IN_ISLESS,
BUILT_IN_ISLESSEQUAL, BUILT_IN_ISLESSGREATER,
BUILT_IN_ISUNORDERED): Use ATTR_CONST_NOTHROW_TYPEGENERIC.
* c-common.c (handle_type_generic_attribute): New.
(c_common_attribute_table): Add "type generic".
* c-typeck.c (convert_arguments): Handle "type generic" functions.
From-SVN: r126723
|
|
2007-07-09 Geoffrey Keating <geoffk@apple.com>
PR 32617
* c-common.c (c_alignof_expr): Look at DECL_ALIGN of
FUNCTION_DECLs.
(handle_aligned_attribute): Allow use on FUNCTION_DECLs.
* varasm.c (assemble_start_function): Honor DECL_ALIGN
for FUNCTION_DECLs. Don't use align_functions_log if
DECL_USER_ALIGN.
* print-tree.c (print_node): Print DECL_ALIGN and DECL_USER_ALIGN
even for FUNCTION_DECLs.
* c-decl.c (merge_decls): Propagate DECL_ALIGN even for
FUNCTION_DECLs.
* tree.h (DECL_ALIGN): Update for new location of 'align'.
(DECL_FUNCTION_CODE): Update for new location and name of
'function_code'.
(DECL_OFFSET_ALIGN): Update for new location of 'off_align'.
(struct tree_decl_common): Move 'align' and 'off_align' out
of union, ensure they're still on a 32-bit boundary. Remove
other fields in union 'u1'.
(struct tree_function_decl): Add field 'function_code' replacing
'u1.f' in tree_decl_common.
* tree.c (build_decl_stat): Set initial value of DECL_ALIGN.
* doc/extend.texi (Function Attributes): Add 'aligned' attribute.
(Variable Attributes): Cross-reference 'aligned' attribute
to Function Attributes.
* flags.h (force_align_functions_log): Delete.
* toplev.c (force_align_functions_log): Delete.
Index: gcc/testsuite/ChangeLog
2007-07-09 Geoffrey Keating <geoffk@apple.com>
PR 32617
* gcc.c-torture/execute/align-3.c: New.
Index: gcc/java/ChangeLog
2007-07-09 Geoffrey Keating <geoffk@apple.com>
PR 32617
* lang.c (java_init): Remove setting of force_align_functions_log.
* class.c (add_method_1): Set DECL_ALIGN of non-static method
to cope with ptrmemfunc_vbit_in_pfn.
Index: gcc/cp/ChangeLog
2007-07-09 Geoffrey Keating <geoffk@apple.com>
PR 32617
* decl.c (cxx_init_decl_processing): Don't set
force_align_functions_log.
(grokfndecl): Honour ptrmemfunc_vbit_in_pfn.
* typeck.c (cxx_alignof_expr): When alignof is used on a plain
FUNCTION_DECL, return its alignment.
From-SVN: r126529
|
|
2007-07-06 Andreas Krebbel <krebbel1@de.ibm.com>
* libgcc2.h (word_type): Type definition removed.
(cmp_return_type, shift_count_type): Type definitions added.
(__lshrdi3, __ashldi3, __ashrdi3): word_type of second parameter
replaced with shift_count_type.
(__cmpdi2, __ucmpdi2): word_type of return type replaced with
cmp_return_type.
* libgcc2.c (__udivmoddi4, __moddi3): Type of local variable c
changed from word_type to Wtype.
(__lshrdi3, __ashldi3, __ashrdi3): word_type of second parameter
replaced with shift_count_type.
(__cmpdi2, __ucmpdi2): word_type of return type replaced with
cmp_return_type.
* c-common.c (handle_mode_attribute): Handling for libgcc_cmp_return and
libgcc_shift_count attribute added.
* target-def.h (TARGET_LIBGCC_CMP_RETURN_MODE,
TARGET_LIBGCC_SHIFT_COUNT_MODE): New target hooks defined.
(TARGET_INITIALIZER): New target hooks added.
* targhooks.c (default_libgcc_cmp_return_mode,
default_libgcc_shift_count_mode): Default implementations for the new
target hooks added.
* targhooks.h (default_libgcc_cmp_return_mode,
default_libgcc_shift_count_mode): Function prototypes added.
* target.h (struct gcc_target): Fields for the new target hooks added.
* optabs.c (expand_binop): Use shift_count_mode when expanding shift
as library call.
(prepare_cmp_insn): Use cmp_return_mode when expanding comparison as
library call.
* doc/tm.texi (TARGET_LIBGCC_CMP_RETURN_MODE,
TARGET_LIBGCC_SHIFT_COUNT_MODE): Documentation added.
* config/s390/s390.c (s390_libgcc_cmp_return_mode,
s390_libgcc_shift_count_mode): Functions added.
(TARGET_LIBGCC_CMP_RETURN_MODE, TARGET_LIBGCC_SHIFT_COUNT_MODE): Target
hooks defined.
From-SVN: r126410
|
|
2007-07-06 Richard Guenther <rguenther@suse.de>
* c-common.c (boolean_increment): Use correctly typed
constant.
cp/
* init.c (build_new_1): Use the correct pointer type.
* typeck2.c (build_m_component_ref): Likewise.
From-SVN: r126405
|
|
* tree.h (alias_sets_might_conflict_p): Rename into
alias_sets_must_conflict_p.
* alias.c (alias_sets_might_conflict_p): Likewise.
(alias_sets_conflict_p): Use it.
(objects_must_conflict_p): Likewise.
* c-common.c (strict_aliasing_warning): Adjust.
From-SVN: r126233
|
|
* c-common.c (pointer_int_sum): Do the negation in sizetype.
From-SVN: r126108
|
|
2007-06-23 Mark Mitchell <mark@codesourcery.com>
* doc/extend.texi: Document that dllimport and dllexport imply
default visibility.
* tree.c (handle_dll_attribute): Set DECL_VISIBILITY on the
imported or exported declaration, including type declarations.
* c-common.c (handle_visibility_attribute): Check for conflicts
with dllimport/dllexport.
(c_determine_visibility): Handle dllimport/dllexport as an
explicit visibility atttribute.
2007-06-23 Mark Mitchell <mark@codesourcery.com>
* decl2.c (determine_visibility): Don't look for dllexport here.
(determine_visibility_from_class): Tidy.
2007-06-23 Mark Mitchell <mark@codesourcery.com>
* gcc.dg/visibility-12.c: New test.
* gcc.dg/visibility-13.c: Likewise.
* g++.dg/ext/visibility-9.C: Likewise.
* g++.dg/ext/visibility-10.C: Likewise.
From-SVN: r125975
|
|
2007-06-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
Zdenek Dvorak <dvorakz@suse.cz>
Richard Guenther <rguenther@suse.de>
Kaz Kojima <kkojima@gcc.gnu.org>
* tree-vrp.c (compare_values_warnv): Convert val2 to
the type of val1.
(extract_range_from_assert): Create
POINTER_PLUS_EXPR for pointer types.
(extract_range_from_binary_expr): Handle
only POINTER_PLUS_EXPR, MIN_EXPR, and MAX_EXPR
for pointer types.
* doc/c-tree.texi (POINTER_PLUS_EXPR): Document.
* tree-ssa-loop-niter.c (split_to_var_and_offset): Handle
POINTER_PLUS_EXPR as PLUS_EXPR.
(number_of_iterations_lt_to_ne):
For pointer types, use sizetype when
creating MINUS_EXPR/PLUS_EXPRs.
(assert_loop_rolls_lt): For pointer types, use sizetype when
creating MINUS_EXPR/PLUS_EXPRs.
(number_of_iterations_le): Likewise.
(expand_simple_operations): POINTER_PLUS_EXPR are simple also.
(derive_constant_upper_bound): Handle POINTER_PLUS_EXPR just
like PLUS_EXPR and MINUS_EXPR.
* tree-pretty-print.c (dump_generic_node): Handle
POINTER_PLUS_EXPR.
(op_prio): Likewise.
(op_symbol_1): Likewise.
* optabs.c (optab_for_tree_code): Likewise.
* tree-ssa-loop-manip.c (create_iv): Handle pointer base
specially.
* tree-tailcall.c (process_assignment): Mention
POINTER_PLUS_EXPR in a TODO comment.
* tree.c (build2_stat): Assert when trying to use PLUS_EXPR or
MINUS_EXPR with a pointer. Also assert for POINTER_PLUS_EXPR
not used with a pointer and an integer type.
* tree-scalar-evolution.c (add_to_evolution_1): Convert the
increment using chrec_convert_rhs instead of chrec_convert.
(follow_ssa_edge_in_rhs): Handle POINTER_PLUS_EXPR like
PLUS_EXPR except for the right hand side's type will be
sizetype.
(interpret_rhs_modify_stmt): Handle POINTER_PLUS_EXPR.
(fold_used_pointer_cast): Kill.
(pointer_offset_p): Kill.
(fold_used_pointer): Kill.
(pointer_used_p): Kill.
(analyze_scalar_evolution_1 <case GIMPLE_MODIFY_STMT>): Don't
call fold_used_pointer.
(instantiate_parameters_1): Convert the increment
using chrec_convert_rhs instead of chrec_convert.
Handle POINTER_PLUS_EXPR as PLUS_EXPR.
* builtins.c (get_pointer_alignment): Handle POINTER_PLUS_EXPR
instead of PLUS_EXPR.
(expand_builtin_strcat): Create a POINTER_PLUS_EXPR instead of
PLUS_EXPR for pointers.
(std_gimplify_va_arg_expr): Likewise.
(fold_builtin_memory_op): Likewise.
(fold_builtin_strstr): Likewise.
(fold_builtin_strchr): Likewise.
(fold_builtin_strrchr): Likewise.
(fold_builtin_strpbrk): Likewise.
(expand_builtin_memory_chk): Likewise.
(fold_builtin_memory_chk): Likewise.
(std_expand_builtin_va_start): Use
sizetype for the call to make_tree and then convert
to the pointer type.
(fold_builtin_memchr): Use POINTER_PLUS_EXPR
instead of PLUS_EXPR for adding to a pointer.
(std_gimplify_va_arg_expr): Use fold_build2 for
the creating of POINTER_PLUS_EXPR. For the BIT_AND_EXPR, cast
the operands to sizetype first and then cast the BIT_AND_EXPR
back to the pointer type.
* fold-const.c (build_range_check): Handle pointer types
specially.
(extract_array_ref): Look for POINTER_PLUS_EXPR instead
of PLUS_EXPR's. Make sure the offset is converted to
sizetype.
(try_move_mult_to_index): Strip the NOPs from the offset.
Remove code argument and replace all uses with PLUS_EXPR.
(fold_to_nonsharp_ineq_using_bound): Handle pointer types
specially. Don't use a pointer type for MINUS_EXPR.
(fold_unary): Handle for (T1)(X op Y),
only p+ as that is the only as that can be handled for
binary operators now.
(fold_binary <case POINTER_PLUS_EXPR>): Add folding of
POINTER_PLUS_EXPR.
<case PLUS_EXPR>: Add folding of PTR+INT into
PTR p+ INT.
Don't call try_move_mult_to_index.
<case MINUS_EXPR>: Fold (PTR0 p+ A) - (PTR1 p+ B)
into (PTR0 - PTR1) + (A - B). Fold (PTR0 p+ A) - PTR1 into
(PTR0 - PTR1) + A iff (PTR0 - PTR1) simplifies.
Don't call try_move_mult_to_index.
(tree_expr_nonnegative_warnv_p): Handle POINTER_PLUS_EXPR.
(tree_expr_nonzero_p): Likewise.
(fold_indirect_ref_1): Look at POINTER_PLUS_EXPR instead
of PLUS_EXPR for the complex expression folding.
* tree-chrec.c (chrec_fold_plus_poly_poly): If the
first chrec is a pointer type, then the second should
be sizetype and not the first's type.
For POINTER_PLUS_EXPR, use a different right hand side type.
Handle POINTER_PLUS_EXPR like PLUS_EXPR.
(chrec_fold_plus_1): For POINTER_PLUS_EXPR, use a
different right hand side type.
Handle POINTER_PLUS_EXPR like PLUS_EXPR.
(chrec_fold_plus): For pointer types, use POINTER_PLUS_EXPR
instead of PLUS_EXPR.
When either operand is zero, convert the other operand.
(chrec_apply): Use chrec_convert_rhs
on the argument x instead of chrec_convert.
(reset_evolution_in_loop): For pointer types, the new_evol
should be sizetype.
(convert_affine_scev): For POINTER_PLUS_EXPR, use a
different right hand side type.
Handle POINTER_PLUS_EXPR like PLUS_EXPR.
(chrec_convert_rhs): New function.
(chrec_convert_aggressive): For POINTER_PLUS_EXPR, use a
different right hand side type.
Handle POINTER_PLUS_EXPR like PLUS_EXPR.
* tree-chrec.h (chrec_convert_rhs): New prototype.
(build_polynomial_chrec): For pointer types, the right hand
* tree-ssa-ccp.c (maybe_fold_stmt_indirect): Look for
POINTER_PLUS_EXPR instead of PLUS_EXPR's.
Remove subtraction case as it is always addition now.
Make sure the offset is converted to sizetype.
(fold_stmt_r): Don't handle PLUS_EXPR/MINUS_EXPR specially.
Handle POINTER_PLUS_EXPR like PLUS_EXPR was handled before.
* tree-ssa-loop-ivopts.c (determine_base_object): Abort for
PLUS_EXPR in pointer type.
Handle POINTER_PLUS_EXPR.
(tree_to_aff_combination): Likewise.
(force_expr_to_var_cost): Likewise.
(force_expr_to_var_cost): Likewise. Create a POINTER_PLUS_EXPR
instead of PLUS_EXPR for pointers.
* c-format.c (check_format_arg): Handle POINTER_PLUS_EXPR
instead of PLUS_EXPR of pointer types.
* tree-stdarg.c (va_list_counter_bump): Handle POINTER_PLUS_EXPR
as PLUS_EXPR.
(check_va_list_escapes): Likewise.
(check_all_va_list_escapes): Likewise.
* dwarf2out.c (loc_descriptor_from_tree_1):
Handle POINT_PLUS_EXPR as a PLUS_EXPR.
* expr.c (expand_expr_real_1): Handle POINTER_PLUS_EXPR.
(string_constant): Likewise.
* tree-ssa-address.c (tree_mem_ref_addr): When adding
the offset to the base, use POINTER_PLUS_EXPR.
(add_to_parts): Convert the index to sizetype.
(create_mem_ref): Create A POINTER_PLUS_EXPR for the one case.
* matrix-reorg.c (collect_data_for_malloc_call): Stmt
will now only be either INDIRECT_REF and POINTER_PLUS_EXPR.
Offset only holds something for PLUS_EXPR.
(ssa_accessed_in_tree): Handle POINTER_PLUS_EXPR just as
a PLUS_EXPR.
(analyze_transpose): POINTER_PLUS_EXPR will only show up now
and not PLUS_EXPR.
(analyze_accesses_for_modify_stmt): Likewise.
Remove comment about the type being integral type as it is
wrong now.
(can_calculate_expr_before_stmt): Handle POINTER_PLUS_EXPR as
PLUS_EXPR.
(transform_access_sites): POINTER_PLUS_EXPR will only show up now
and not PLUS_EXPR.
Correct the type which the artimentic is done in (is now
sizetype).
Reindent one loop.
* tree-data-ref.c (split_constant_offset): Handle
POINTER_PLUS_EXPR
* tree-affine.c (tree_to_aff_combination): Likewise.
* c-typeck.c (build_unary_op): For pointers create the increment
as a sizetype. Create a POINTER_PLUS_EXPR instead of PLUS_EXPR
for pointers.
* gimplify.c (gimplify_self_mod_expr): Create a
POINTER_PLUS_EXPR instead of PLUS_EXPR for pointers.
(gimplify_omp_atomic_fetch_op): Handle POINTER_PLUS_EXPR.
* tree.def (POINTER_PLUS_EXPR): New tree code.
* tree-predcom.c (ref_at_iteration): If we have a pointer
type do the multiplication in sizetype.
* tree-mudflap.c (mf_xform_derefs_1): Create a
POINTER_PLUS_EXPR instead of PLUS_EXPR for pointers.
* tree-ssa-forwprop.c
(forward_propagate_addr_into_variable_array_index):
Don't expect there to be a cast for the index as that
does not exist anymore.
(forward_propagate_addr_expr_1): Check for POINTER_PLUS_EXPR
instead of PLUS_EXPR.
Don't check for the first operand of the POINTER_PLUS_EXPR
was the index as it cannot be.
Call forward_propagate_addr_into_variable_array_index with
the SSA_NAME instead of the statement.
* varasm.c (const_hash_1): Handle POINTER_PLUS_EXPR.
(compare_constant): Likewise.
(copy_constant): Likewise.
(compute_reloc_for_constant): Likewise.
(output_addressed_constants): Likewise.
(initializer_constant_valid_p): Likewise.
* tree-ssa.c (tree_ssa_useless_type_conversion_1):
Convert the MIN/MAX of the inner type to the outer
type before comparing them.
* tree-ssa-loop-prefetch.c (idx_analyze_ref): Handle
POINTER_PLUS_EXPR instead of PLUS_EXPR.
(issue_prefetch_ref): Create a POINTER_PLUS_EXPR instead
of PLUS_EXPR for pointers.
* tree-inline.c (estimate_num_insns_1): Handle
POINTER_PLUS_EXPR.
* tree-vect-transform.c (vect_create_addr_base_for_vector_ref):
Create a POINTER_PLUS_EXPR instead of PLUS_EXPR for pointers.
(bump_vector_ptr): Create a POINTER_PLUS_EXPR
instead of PLUS_EXPR for the pointer increment statement.
(vect_update_ivs_after_vectorizer): For pointer types, create
POINTER_PLUS_EXPR instead of PLUS_EXPR and also create
MULT_EXPR in sizetype.
(vect_gen_niters_for_prolog_loop): Add a cast when creating
byte_misalign.
* tree-object-size.c (plus_expr_object_size): Handle
POINTER_PLUS_EXPR instead of PLUS_EXPR. Removing all the extra
code which is trying to figure out which side is a pointer and
is the index.
(check_for_plus_in_loops_1): Likewise.
(check_for_plus_in_loops): Likewise.
* c-common.c (pointer_int_sum): Create a
POINTER_PLUS_EXPR instead of PLUS_EXPR for pointers.
* tree-ssa-structalias.c (handle_ptr_arith): Handle
only POINTER_PLUS_EXPR. Removing all the extra
code which is trying to figure out which side is a pointer and
is the index.
* tree-cfg.c (verify_expr): Add extra checking for pointers and
PLUS_EXPR and MINUS_EXPR.
Also add checking to make sure the operands of POINTER_PLUS_EXPR
are correct.
* config/frv/frv.c (frv_expand_builtin_va_start): Use sizetype
with make_tree, instead of a pointer type.
* config/s390/s390.c (s390_va_start): Use POINTER_PLUS_EXPR
for pointers instead of PLUS_EXPR.
(s390_gimplify_va_arg): Likewise.
* config/spu/spu.c (spu_va_start): Create POINTER_PLUS_EXPR
instead of PLUS_EXPR when doing addition on pointer
types. Use sizetype for the second operand.
(spu_gimplify_va_arg_expr): Likewise.
* config/sparc/sparc.c (sparc_gimplify_va_arg): Use
POINTER_PLUS_EXPR instead of PLUS_EXPR when the operand was
a pointer. Don't create a BIT_AND_EXPR for pointer types.
* config/i386/i386.c (ix86_va_start): Use POINTER_PLUS_EXPR
for the pointer addition and also use size_int/sizetype
for the offset.
(ix86_gimplify_va_arg): Likewise.
Perform BIT_AND_EXPR on sizetype arguments.
* config/sh/sh.c (sh_va_start): Call make_tree with sizetype
and convert its result to a pointer type. Use POINTER_PLUS_EXPR
for the pointer additions and also use size_int for the offsets.
(sh_gimplify_va_arg_expr): Use POINTER_PLUS_EXPR for the pointer
additions and also use size_int for the offsets. Perform
BIT_AND_EXPR on sizetype arguments.
* config/ia64/ia64.c (ia64_gimplify_va_arg): Use
POINTER_PLUS_EXPR for pointers and create the
BIT_AND_EXPR in sizetype.
* config/rs6000/rs6000.c (rs6000_va_start): Use POINTER_PLUS_EXPR
instead of PLUS_EXPR for pointer addition.
(rs6000_va_start): Likewise.
Also use sizetype for the offset.
* config/pa/pa.c (reloc_needed): Handle POINTER_PLUS_EXPR
as PLUS_EXPR/MINUS_EXPR.
(hppa_gimplify_va_arg_expr): Don't create MINUS_EXPR or
PLUS_EXPR for pointers, instead use POINTER_PLUS_EXPR.
Don't use BIT_AND_EXPR on a pointer type, convert the
expression to sizetype first.
* config/mips/mips.c (mips_va_start): Use POINTER_PLUS_EXPR
for pointers.
(mips_gimplify_va_arg_expr): Likewise.
Don't create BIT_AND_EXPR in a pointer type.
2007-06-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
* trans-intrinsic.c (gfc_conv_intrinsic_repeat): Use
POINTER_PLUS_EXPR instead of PLUS_EXPR for pointer addition.
* trans-expr.c (gfc_trans_string_copy): Create
POINTER_PLUS_EXPR instead of a PLUS_EXPR
for pointer types.
2007-06-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
* typeck.c (build_binary_op): For templates build the
expression in pieces to avoid the assert in build2_stat.
(get_member_function_from_ptrfunc):
Change over to using POINTER_PLUS_EXPR and convert
the second operand to sizetype.
* typeck2.c (build_m_component_ref): Likewise.
* init.c (expand_virtual_init): Create a POINTER_PLUS_EXPR
instead of PLUS_EXPR for pointers.
(build_new_1): Likewise.
(build_vec_delete_1): Likewise.
(build_vec_delete): Likewise.
* class.c (build_base_path): Likewise.
(build_base_path): Likewise.
(convert_to_base_statically): Likewise.
(fixed_type_or_null): Handle POINTER_PLUS_EXPR.
(get_vtbl_decl_for_binfo): Handle POINTER_PLUS_EXPR
instead of PLUS_EXPR.
(dfs_accumulate_vtbl_inits): Create a POINTER_PLUS_EXPR
instead of PLUS_EXPR for pointers.
* call.c (build_special_member_call): Likewise.
* rtti.c (build_headof): Likewise.
Use sizetype instead of ptrdiff_type_node.
(tinfo_base_init): Create a POINTER_PLUS_EXPR
instead of PLUS_EXPR for pointers.
* except.c (expand_start_catch_block): Do a
NEGATIVE and then a POINTER_PLUS_EXPR instead
of a MINUS_EXPR.
* cp-gimplify.c (cxx_omp_clause_apply_fn): Convert
PLUS_EXPR on pointer types over to use
POINTER_PLUS_EXPR and remove the conversion
to the pointer types.
* method.c (thunk_adjust): Use POINTER_PLUS_EXPR for
adding to a pointer type. Use size_int instead of
ssize_int. Convert the index to sizetype before
adding it to the pointer.
2007-06-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
* trans.c (Attribute_to_gnu): When subtracting an
offset from a pointer, use POINTER_PLUS_EXPR with
NEGATE_EXPR instead of MINUS_EXPR.
(gnat_to_gnu): Likewise.
* utils.c (convert): When converting between
thin pointers, use POINTER_PLUS_EXPR and sizetype
for the offset.
* utils2.c (known_alignment): POINTER_PLUS_EXPR
have the same semantics as PLUS_EXPR for alignment.
(build_binary_op): Add support for the semantics of
POINTER_PLUS_EXPR's operands.
When adding an offset to a pointer, use POINTER_PLUS_EXPR.
2007-06-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
* class.c (make_class_data): Build the index in sizetype.
Use POINTER_PLUS_EXPR instead of PLUS_EXPR when
adding to a pointer type.
(build_symbol_entry): Likewise.
* expr.c (build_java_arrayaccess): Likewise.
(build_field_ref): Likewise.
(build_known_method_ref): Likewise.
(build_invokevirtual): Likewise.
* except.c (build_exception_object_ref): Do a
NEGATIVE and then a POINTER_PLUS_EXPR instead
of a MINUS_EXPR.
2007-06-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
PR tree-opt/32225
* gcc.c-torture/compile/20070605-1.c: New test.
* gcc.c-torture/compile/20070603-1.c: New testcase.
* gcc.c-torture/compile/20070603-2.c: New testcase.
* gcc.c-torture/compile/20070531-1.c: New test.
PR tree-opt/32167
* gcc.c-torture/compile/20070531-2.c: New test.
PR tree-opt/32144
* gcc.c-torture/compile/20070529-1.c: New test.
PR tree-opt/32145
* gcc.c-torture/compile/20070529-2.c: New test.
PR tree-opt/32015
* gcc.c-torture/compile/20070520-1.c: New test.
* g++.dg/ext/java-1.C: New test.
* gcc.dg/vect/vect-106.c: We are now able to vectorize two
loops instead of one. Remove the "can't determine dependence"
check.
* gcc.dg/tree-ssa/20030815-1.c: Remove testcase which is no longer
needed as the cast is gone in the first place.
* gcc.dg/max-1.c: Change local variable a to be a global one.
* gcc.dg/tree-ssa/ssa-pre-8.c: Update testcase since we don't
have a cast which is PREd.
From-SVN: r125755
|
|
From-SVN: r125621
|
|
gcc/
2007-06-07 Simon Martin <simartin@users.sourceforge.net>
PR c++/30759
* c-common.h (flag_cpp0x): Replaced by...
(cxx_dialect): ... this new variable specifying the C++ dialect that
is used.
* c-common.c (flag_cpp0x): Removed.
(cxx_dialect): Defined.
* c-cppbuiltin.c (c_cpp_builtins): flag_cpp0x rewritten in terms of
cxx_dialect.
* c-opts.c (c_common_post_options): Likewise.
(set_std_cxx98): Set cxx_dialect to cxx98.
(set_std_cxx0x): Set cxx_dialect to cxx0x.
gcc/cp/
2007-06-07 Simon Martin <simartin@users.sourceforge.net>
PR c++/30759
* decl.c (check_initializer): Report an error when a brace enclosed
initializer is used for a non-aggregate type in C++98.
(redeclaration_error_message): Rewrote flag_cpp0x in terms of
cxx_dialect.
(grokdeclarator): Likewise.
(move_fn_p): Likewise.
* typeck.c (check_return_expr): Likewise.
* call.c (reference_binding): Likewise.
* error.c (cp_cpp_error): Likewise.
* pt.c (check_default_tmpl_args): Likewise.
(tsubst): Likewise.
* lex.c (init_reswords): Likewise.
* parser.c (p_parser_primary_expression): Likewise.
(TOKEN_PRECEDENCE): Likewise.
(cp_parser_init_declarator): Likewise.
(cp_parser_ptr_operator): Likewise.
(cp_parser_parameter_declaration): Likewise.
(cp_parser_enclosed_template_argument_list): Likewise.
(cp_parser_skip_to_end_of_template_parameter_list): Likewise.
(cp_parser_next_token_ends_template_argument_p): Likewise.
gcc/testsuite/
2007-06-07 Simon Martin <simartin@users.sourceforge.net>
PR c++/30759
* g++.dg/init/brace6.C: New test.
From-SVN: r125539
|
|
From-SVN: r125321
|
|
PR c/32191
* gcc/c-common.c (c_define_builtins): Call targetm.init_builtins ()
before build_common_builtin_nodes ().
testsuite/ChangeLog:
PR c/32191
* gcc.dg/pr32191.c: New test.
From-SVN: r125314
|
|
in gcc/
2007-05-31 Daniel Berlin <dberlin@dberlin.org>
* c-typeck.c (build_indirect_ref): Include type in error message.
(build_binary_op): Pass types to binary_op_error.
* c-common.c (binary_op_error): Take two type arguments, print out
types with error.
* c-common.h (binary_op_error): Update prototype.
In gcc/cp
2007-05-31 Daniel Berlin <dberlin@dberlin.org>
* typeck.c (build_binary_op): Include types in error.
From-SVN: r125239
|
|
2007-05-25 Dirk Mueller <dmueller@suse.de>
Marcus Meissner <meissner@suse.de>
* doc/extend.texi (alloc_size): New attribute.
* c-common.c (handle_alloc_size_attribute): New.
* tree-object-size.c (alloc_object_size): Use alloc_size
attribute, if available.
* testsuite/gcc.dg/attr-alloc_size.c: New.
Co-Authored-By: Marcus Meissner <meissner@suse.de>
From-SVN: r125073
|
|
INTEGRAL_TYPE_P and TYPE_UNSIGNED.
* c-common.c (c_common_signed_or_unsigned_type): Delay the check for
INTEGRAL_TYPE_P and TYPE_UNSIGNED.
* langhooks.c (get_signed_or_unsigned_type): Don't check for
INTEGRAL_TYPE_P or TYPE_UNSIGNED.
(lhd_signed_or_unsigned_type): Check for INTEGRAL_TYPE_P and
TYPE_UNSIGNED.
From-SVN: r125012
|
|
2007-05-20 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
PR middle-end/7651
PR c++/11856
PR c/12963
PR c/23587
PR other/29694
* c.opt (Wtype-limits): New.
* doc/invoke.texi (Wtype-limits): Document it.
(Wextra): Enabled by -Wextra.
* c-opts.c (c_common_post_options): Enabled by -Wextra.
* c-common.c (shorten_compare): Warn with Wtype-limits.
testsuite/
* gcc.dg/compare6.c: Replace Wall with Wtype-limits.
* gcc.dg/Wtype-limits.c: New.
* gcc.dg/Wtype-limits-Wextra.c: New.
* gcc.dg/Wtype-limits-no.c: New.
* g++.dg/warn/Wtype-limits.C: New.
* g++.dg/warn/Wtype-limits-Wextra.C: New.
* g++.dg/warn/Wtype-limits-no.C: New.
From-SVN: r124875
|
|
2007-05-19 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
* doc/invoke.texi (Warning Options): Add -Wconversion-sign.
(Wconversion): Update description.
(Wconversion-sign): New.
* c.opt (Wconversion-sign): New.
* c-opts.c (c_common_post_options): Uninitialized Wconversion-sign
means disabled for C++. Otherwise, take the status of Wconversion.
* c-common.c (conversion_warning): Warn with either Wconversion or
Wconversion-sign.
(warnings_for_convert_and_check): Conditions are already checked by
conversion_warning.
(convert_and_check): Don't check warnings if the conversion failed.
cp/
* cvt.c (cp_convert_and_check): Don't check warnings if the
conversion failed.
testsuite/
* gcc.dg/Wconversion-integer.c: Group testcases and add more.
* gcc.dg/Wconversion-sign.c: New.
* gcc.dg/Wconversion-integer-no-sign.c: New.
* g++.dg/warn/Wconversion-integer.C: Move some warnings to
Wconversion-sign.C
* g++.dg/warn/Wconversion-sign.C: New.
* g++.old-deja/g++.other/warn4.C: Update.
* g++.dg/warn/Wconversion1.C: Likewise.
From-SVN: r124856
|
|
c_common_unsigned_type behavior.
2007-05-16 Rafael Avila de Espindola <espindola@google.com>
* c-common.c (c_common_signed_or_unsigned_type): Emulate
c_common_unsigned_type behavior.
From-SVN: r124771
|
|
of c_common_unsigned_type.
gcc/
* c-common.c (warnings_for_convert_and_check): Use unsigned_type_for
instead of c_common_unsigned_type.
(c_common_unsigned_type): Remove.
(shorten_compare): Use c_common_signed_or_unsigned_type instead of
c_common_unsigned_type.
(c_common_nodes_and_builtins): Use unsigned_type_for instead of
c_common_unsigned_type.
* c-common.h (c_common_unsigned_type): Remove.
* c-decl.c (grokdeclarator): Use unsigned_type_for instead of
c_common_unsigned_type.
* c-format.c (check_format_types): Use unsigned_type_for instead of
c_common_unsigned_type.
* c-objc-common.h (LANG_HOOKS_UNSIGNED_TYPE): Remove.
* c-typeck.c (convert_for_assignment): Use unsigned_type_for instead of
c_common_unsigned_type.
* convert.c (convert_to_integer): Use unsigned_type_for instead of
lang_hooks.types.unsigned_type.
* expmed.c (make_tree): Use unsigned_type_for instead of
lang_hooks.types.unsigned_type.
* fold-const.c (fold_negate_expr): Use unsigned_type_for instead of
lang_hooks.types.unsigned_type.
(build_range_check): Likewise.
(fold_unary): Likewise.
(fold_binary): Likewise.
(fold_ternary): Likewise.
* langhooks-def.h (LANG_HOOKS_UNSIGNED_TYPE): Remove.
* langhooks.h (lang_hooks_for_types): Remove unsigned_type.
* tree.c (get_unsigned_type): New.
(unsigned_type_for): Use get_unsigned_type instead of
lang_hooks.types.unsigned_type
gcc/ada
* misc.c (LANG_HOOKS_UNSIGNED_TYPE): Remove.
gcc/cp
* cp-objcp-common.h (LANG_HOOKS_UNSIGNED_TYPE): Remove.
* decl.c (grokdeclarator): Use unsigned_type_for instead of
c_common_unsigned_type.
gcc/fortran
* f95-lang.c (LANG_HOOKS_UNSIGNED_TYPE): Remove.
* trans-intrinsic.c (gfc_conv_intrinsic_ishft): Use unsigned_type_for
instead of gfc_unsigned_type.
* trans-stmt.c (gfc_trans_do): Use unsigned_type_for instead of
gfc_unsigned_type.
* trans-types.c (gfc_unsigned_type): Remove.
* trans-types.h (gfc_unsigned_type): Remove.
gcc/java
* expr.c (build_java_binop): Use unsigned_type_for instead of
java_unsigned_type.
* java-tree.h (java_unsigned_type): Remove.
* lang.c (LANG_HOOKS_UNSIGNED_TYPE): Remove.
* typeck.c (java_unsigned_type): Remove.
gcc/treelang
* treetree.c (tree_lang_unsigned_type): Remove.
(LANG_HOOKS_UNSIGNED_TYPE): Remove.
From-SVN: r124715
|
|
gcc/
* Makefile.in (OBJS-common): Add tree-ssa-alias-warnings.o.
* c-common.c (strict_aliasing_warning): Modify -Wstrict-aliasing logic.
* c-common.h (strict_aliasing_warning): Change return type.
* c-opts.c (c_common_handle_option): Add call to set_Wstrict_aliasing.
* c-typeck.c (build_indirect_ref): Add call to strict_aliasing_warning.
(build_c_cast): Condition call to strict_aliasing_warning.
* doc/invoke.texi: Update description of -Wstrict-aliasing[=n].
* flags.h (set_Wstrict_aliasing): Declare.
* opts.c (set_Wstrict_alising): Define, add call to.
* tree-flow.h (strict_aliasing_warning_backend): Declare.
* tree-ssa-alias-warnings.c: New file.
* tree-ssa-alias.c (compute_may_aliases): Add call to
strict_aliasing_warning_backend.
gcc/cp
* cp/typeck.c (build_indirect_ref): Add call to
strict_aliasing_warning.
(build_reinterpret_cast_1): Condition call to
strict_aliasing_warning.
gcc/testsuite
* gcc.dg/Wstrict-aliasing-bogus-const-ptr-nonconst-ptr.c: New test.
* gcc.dg/Wstrict-aliasing-bogus-never-dereferenced.c: New test.
* gcc.dg/Wstrict-aliasing-bogus-struct-included.c: New test.
* gcc.dg/Wstrict-aliasing-converted-assigned.c: New test.
* gcc.dg/Wstrict-aliasing-float-ptr-int-obj.c: New test.
* gcc.dg/alias-1.c: Update option: -Wstrict-aliasing=2.
* gcc.dg/alias-9.c: Update option: -Wstrict-aliasing=2.
* g++.dg/warn/Wstrict-aliasing-7.C: Update option: -Wstrict-aliasing=2.
* g++.dg/warn/Wstrict-aliasing-bogus-base-derived.C: New test.
* g++.dg/warn/Wstrict-aliasing-bogus-char-1.C: New test.
* g++.dg/warn/Wstrict-aliasing-bogus-const.C: New test.
* g++.dg/warn/Wstrict-aliasing-bogus-nested-arrays.C: New test.
* g++.dg/warn/Wstrict-aliasing-bogus-signed-unsigned.C: New test.
* g++.dg/warn/Wstrict-aliasing-bogus-struct-included.C: New test.
* g++.dg/warn/Wstrict-aliasing-bogus-union.C: New test.
* g++.dg/warn/Wstrict-aliasing-float-ref-int-obj.C: New test.
From-SVN: r124622
|
|
* semantics.c (expand_or_defer_fn): Do not call c_record_cdtor_fn.
* decl2.c (start_objects): ctors and dtors are no longer public.
(cp_write_global_declarations): Do not call c_build_cdtor_fns.
* cgraphunit.c: Include gt-cgraphunit.h
(static_ctors, static_dtors): New static vars.
(record_cdtor_fn, build_cdtor, cgraph_build_cdtor_fns): New functions,
based on implementation in c-common.c
(cgraph_finalize_function): Call record_cdtor_fn.
(cgraph_optimize): Call cgraph_build_cdtor_fns.
* decl.c (finish_function): Do not call c_record_cdtor_fn.
(c_write_global_declarations): Do not call c_build_cdtor_fns.
* c-common.c (static_ctors, static_dtors, c_record_cdtor_fn,
build_cdtor, c_build_cdtor_fns): Remove.
* c-common.h (static_ctors, static_dtors, c_record_cdtor_fn,
c_build_cdtor_fns): Remove prototype.
From-SVN: r124618
|
|
namespace)
gcc/ChangeLog:
2007-05-02 Seongbae Park <seongbae.park@gmail.com>
PR c++/31663
* c-common.c (strip_pointer_or_array_types): New function.
* c-common.h (strip_pointer_or_array_types): New function declaration.
gcc/cp/ChangeLog:
2007-05-02 Seongbae Park <seongbae.park@gmail.com>
PR c++/31663
* decl2.c (constrain_class_visibility):
Use strip_pointer_or_array_types instead of strip_array_types.
gcc/testsuite/ChangeLog:
2007-05-02 Seongbae Park <seongbae.park@gmail.com>
PR C++/31663
* g++.dg/warn/anonymous-namespace-2.C: New.
* g++.dg/warn/anonymous-namespace-2.h: New.
From-SVN: r124363
|
|
OPT_Wattributes.
* c-common.c (handle_sentinel_attribute): Annotate warning
call with OPT_Wattributes.
From-SVN: r124163
|
|
redundant check on syntax errors.
* ada/misc.c (gnat_expand_body): Don't call target for destructors,
avoid redundant check on syntax errors.
* final.c (rest_of_handle_final): Call
targetm.asm_out.constructor/targetm.asm_out.destructor
* cgraphunit.c (cgraph_build_static_cdtor): Don't do it here; set
proper priority via decl_*_priority_insert.
* c-common.c (c_expand_body): Likewise.
From-SVN: r124044
|
|
const strings)
2007-04-12 Douglas Gregor <doug.gregor@gmail.com>
PR c++/31078
PR c++/31103
* c-common.c (c_build_qualified_type): Set canonical type
appropriately.
2007-04-12 Douglas Gregor <doug.gregor@gmail.com>
PR c++/31078
* g++.dg/other/pr31078.C: New.
From-SVN: r123740
|
|
Revert change removing staticp.
From-SVN: r123650
|
|
in /
2007-04-06 Daniel Berlin <dberlin@dberlin.org>
* tree.c (staticp): No longer use staticp langhook.
* langhooks.c (lhd_staticp): Removed.
* langhooks.h (struct lang_hooks): Remove staticp.
* c-common.c (c_staticp): Remove.
* c-common.h (c_staticp): Ditto.
* langhooks-defs.h (lhd_staticp): Ditto.
(LHD_HOOKS_STATICP): Ditto
* tree.h (gcc_assert_lowered): New macro.
in cp/
2007-04-06 Daniel Berlin <dberlin@dberlin.org>
* cp-objcp-common.c (cxx_staticp): Remove.
* cp-objcp-common.h (LANG_HOOKS_STATICP): Remove.
* cp-tree.h (cxx_staticp):
From-SVN: r123636
|
|
2007-03-16 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
* doc/invoke.texi (-Wconversion): Document warnings specific to C++.
* c-common.c (convert_and_check): Move warning logic to...
(warnings_for_convert_and_check): ...here. Define.
* c-common.h (warnings_for_convert_and_check): Declare.
cp/
* cvt.c (cp_convert_and_check) : Define.
* cp-tree.h (cp_convert_and_check): Declare.
* call.c (convert_conversion_warnings): Rename to
conversion_null_warnings. The warning for floating-point to
integer is handled by convert_and_check in convert_like_real.
(convert_like_real): convert_conversion_warnings was renamed as
conversion_null_warnings.
* typeck.c (build_binary_op): Use cp_convert_and_check to warn for
overflow and changes of value during conversion.
testsuite/
* g++.dg/warn/Wconversion-integer.C: New
* g++.dg/warn/Wconversion-real.C: New.
* g++.dg/warn/Wconversion-real-integer.C: New.
* g++.dg/warn/conv2.C: Updated.
From-SVN: r123005
|
|
2007-03-14 Dirk Mueller <dmueller@suse.de>
* c-common.h (empty_body_warning): Rename to empty_if_body_warning.
* c-common.c (empty_if_body_warning): Rephrase diagnostic message.
* c-parser.c (c_parser_if_body): Always add an empty statement in case
of empty body.
* c-parser.c (c_parser_do_statement): Warn about empty body in
do/while statement.
* c-typeck (c_finish_if_stmt): Call empty_if_body_warning.
* doc/invoke.texi (-Wempty-body): Update documentation.
* cp/semantics.c (c_finish_if_stmt): Call empty_if_body_warning.
(finish_do_body): Warn about empty body in do/while statement.
* g++.dg/warn/do-empty.C: New.
* gcc.dg/do-empty.c: New.
* gcc.dg/if-empty-1.c: Update.
* gcc.dg/20001116-1.c: Update.
* gcc.dg/pr23165.c: Update.
From-SVN: r122928
|
|
2007-03-14 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
PR c/21438
* c-common.h (warn_for_div_by_zero): Declare.
* c-common.c (warn_for_div_by_zero): Define.
* c-typeck.c (build_binary_op): Call warn_for_div_zero instead of
warning.
cp/
* typeck.c (build_binary_op): Call warn_for_div_zero instead of
warning.
From-SVN: r122925
|
|
2007-03-10 Dirk Mueller <dmueller@suse.de>
* c-common.c (warn_logical_operator): Fix condition.
From-SVN: r122800
|
|
intended)
2007-03-09 Dirk Mueller <dmueller@suse.de>
PR c++/17946
* doc/invoke.texi (-Wlogical-op): Document.
* common.opt (-Wlogical-op): New.
* c-common.h (warn_logical_operator): Declare.
* c-common.c (warn_logical_operator): Define.
* c-typeck.c (parser_build_binary_op): Call
warn_logical_operator.
* cp/call.c (build_new_op): Call warn_logical_operator.
* testsuite/gcc.dg/Wlogical-op-1.c: New.
* testsuite/g++.dg/warn/Wlogical-op-1.C: New.
From-SVN: r122751
|
|
PR c++/30852
* c-common.c (fold_offsetof_1): Handle COMPOUND_EXPR.
* semantics.c (finish_offsetof): Handle COMPOUND_EXPR.
* g++.dg/ext/offsetof1.C: Add cases with volatile.
From-SVN: r122686
|
|
* errors.h (warning, error, fatal, internal_error): Mark as cold.
* predict.c (maybe_hot_bb): Cold functions are never hot; hot functions
are hot.
(probably_cold_bb_p): Cold functions are cold.
(probably_never_executed_bb_p): Cold functions are cold.
(tree_bb_level_predictions): Predict calls to cold functions as not
taken.
(compute_function_frequency): Check hot/cold attributes.
* function.h (function_frequency): Update comments.
* predict.def (PRED_COLD_FUNCTION): Predict cold function.
* c-common.c (handle_hot_attribute, handle_cold_attribute): New.
(c_common_att): Add cold and hot.
* doc/extend.texi (hot,cold attributes): Document.
* ansidecl.h (ATTRIBUTE_COLD, ATTRIBUTE_HOT): New.
From-SVN: r122632
|
|
* c-common.c (targetcm): Add.
* c-opts.c (c_common_handle_option): Handle language specific
target options.
* opts.c (handle_option): Verify language for target options, if
any are given.
* opth-gen.awk: Add CL_LANG_ALL.
* target-def.h (TARGET_HANDLE_C_OPTION): Add.
(TARGETCM_INITIALIZER): Add.
* target.h (struct gcc_targetcm): Add.
(targetcm): Add.
* targhooks.c (default_handle_c_option): Add.
* targhooks.h (default_handle_c_option): Add.
* doc/tm.texi (TARGET_HANDLE_C_OPTION): Add.
* config/darwin.opt (iframework): Add.
* config/darwin.h (TARGET_HAS_TARGETCM): Add.
* config/darwin-c.c (handle_c_option): Add.
(TARGET_HANDLE_C_OPTION): Add.
(targetcm): Add.
* doc/invoke.texi (Darwin Options): Add -iframework.
From-SVN: r122590
|
|
2007-03-04 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
PR other/30465
* c-common.c (convert_and_check): Don't give warnings for
conversion if 'expr' already overflowed.
testsuite/
* gcc.dg/multiple-overflow-warn-3.c: New.
* g++.dg/warn/multiple-overflow-warn-3.C: New.
From-SVN: r122534
|
|
2007-02-28 Sandra Loosemore <sandra@codesourcery.com>
* gcc/builtins.c (fold_builtin_call_list, fold_builtin_call_valist):
Delete, and replace with...
(fold_builtin_call_array): This. Update callers to use it.
* gcc/fold-const.c (fold_build_call_list): Delete, and replace with...
(fold_build_call_array): This.
(fold_build_call_list_initializer): Delete, and replace with...
(fold_build_call_array_initializer): This.
* gcc/tree.h: Update declarations to reflect above changes.
* gcc/c-typeck.c (build_function_call): Store converted arguments
in a stack-allocated array instead of building a list.
(convert_arguments): Store arguments in the array passed in as an
argument, and return the actual number of arguments.
* gcc/c-format.c: (check_function_format): Pass arguments in an
array instead of a list.
* gcc/c-common.c (check_function_nonnull): Likewise.
(check_function_sentinel): Likewise.
(check_function_arguments): Likewise.
* gcc/c-common.h: Update declarations to reflect above changes.
* gcc/cp/typeck.c (build_function_call): Store converted arguments
in a stack-allocated array instead of building a list.
(convert_arguments): Store arguments in the array passed in as an
argument, and return the actual number of arguments.
* gcc/cp/call.c (build_call): Delete, and replace with...
(build_call_n, build_call_a): New.
(build_op_delete_call): Rewrite to avoid constructing argument lists.
(build_over_call): Store converted arguments in a stack-allocated
array instead of building a list.
(build_cxx_call): Pass arguments in an array instead of as a list.
(build_java_interface_fn_ref): Rewrite to avoid constructing
argument lists.
* gcc/cp/tree.h: Update declarations to reflect above changes.
* gcc/cp/method.c (use_thunk): Use a stack-allocated array to hold
the arguments instead of a list.
* gcc/cp/rtti.c (throw_bad_cast): Update call to cxx_call.
(throw_bad_typeid): Likewise.
(build_dynamic_cast_1): Likewise.
* gcc/cp/init.c (build_builtin_delete_call): Use build_call_n.
* gcc/cp/decl.c (expand_static_init): Likewise.
* gcc/cp/except.c (cp_protect_cleanup_actions): Likewise.
* gcc/cp/cp-gimplify.c (genericize_eh_spec_block): Likewise.
(gimplify_must_not_throw_expr): Likewise.
(cxx_omp_apply_fn): Use build_call_a.
From-SVN: r122411
|