Age | Commit message (Collapse) | Author | Files | Lines |
|
2012-08-20 Richard Guenther <rguenther@suse.de>
* name-lookup.c (store_binding_p): New predicate, split out from ...
(store_binding): ... here. Always store binding and require
target vector with enough space.
(store_bindings): Collect to store bindings and reserve space
for them, then store them.
(store_class_bindings): Likewise.
From-SVN: r190529
|
|
cp/
* Make-lang.in: Fix typo.
From-SVN: r190513
|
|
* doc/invoke.texi (-Wsizeof-pointer-memaccess): Document.
c/
* c-tree.h (c_last_sizeof_arg): Declare.
* c-parser.c (struct c_tree_loc_pair): New type.
(c_parser_expr_list): Add sizeof_arg argument. Fill it in if
non-NULL.
(c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
(c_parser_postfix_expression_after_primary): Likewise. Call
sizeof_pointer_memaccess_warning if needed.
(sizeof_ptr_memacc_comptypes): New function.
* c-typeck.c (c_last_sizeof_arg): New global variable.
(c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
cp/
* cp-tree.def (SIZEOF_EXPR): Move to c-common.def.
c-family/
* c-common.c (sizeof_pointer_memaccess_warning): New function.
* c.opt (-Wsizeof-pointer-memaccess): Add new option.
* c-opts.c (c_common_handle_option): Enable it for -Wall.
* c-common.h (sizeof_pointer_memaccess_warning): Add prototype.
* c-common.def (SIZEOF_EXPR): Moved here from cp-tree.def.
fortran/
* array.c (gfc_match_array_ref): Fix up memset arguments.
testsuite/
* gcc.dg/torture/Wsizeof-pointer-memaccess1.c: New test.
From-SVN: r190467
|
|
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
|
|
var.
2012-08-10 Richard Guenther <rguenther@suse.de>
* tree.h (SSA_NAME_VAR): Return NULL_TREE if an IDENTIFIER_NODE
is recorded as var.
(SSA_NAME_IDENTIFIER): Return the IDENTIFIER_NODE of the SSA_NAME
or its SSA_NAME_VAR.
(SET_SSA_NAME_VAR_OR_IDENTIFIER): New setter.
* tree-ssanames.c (make_ssa_name_fn): Handle creating anonymous
SSA names by passing a type instead of a variable decl.
(release_ssa_name): Use SET_SSA_NAME_VAR_OR_IDENTIFIER.
(copy_ssa_name_fn): Handle anonymous SSA names.
(replace_ssa_name_symbol): Use SET_SSA_NAME_VAR_OR_IDENTIFIER.
* tree-flow-inline.h (make_temp_ssa_name): New inline function.
* tree-pretty-print.c (dump_generic_node): Use SSA_NAME_IDENTIFIER,
dump SSA names without a name as <anon>.
* cfgexpand.c (expand_used_vars): Assing anonymous SSA names we are
going to expand a decl.
(gimple_expand_cfg): Assign all SSA names of a partition the
decl we created for its leader.
* tree-ssa.c (target_for_debug_bind): Handle SSA_NAMEs.
(verify_ssa_name): Handle anonymous SSA names.
(verify_def): Likewise.
* tree-predcom.c (eliminate_temp_copies): Likewise.
* tree-ssa-copyrename.c (copy_rename_partition_coalesce): Likewise.
* tree-ssa-live.c (var_map_base_init): Compute conflicts for
anonymous SSA names with the same type.
(mark_all_vars_used_1): Handle anonymous SSA names.
(verify_live_on_entry): Likewise.
* tree-ssa-coalesce.c (abnormal_corrupt): Remove.
(create_outofssa_var_map): Adjust with respect to conflicts we
compute for anonymous SSA names. Do not restrict abnormal
coalescing.
(coalesce_partitions): Do not restrict abnormal coalescing.
Assert we only ever coalesce variables we computed conflicts for.
* tree-ssa-ter.c (process_replaceable): Do not restrict TER
of anonymous names.
* expr.c (expand_expr_real_1): Handle anonymous SSA names
expanded from IVOPTs by creating a raw REG here.
* tree-cfg.c (replace_ssa_name): Handle anonymous SSA names.
(dump_function_to_file): Dump anonymous SSA names alongside
with their types in the variable list.
(verify_gimple_return): Guard use of SSA_NAME_VAR.
* tree-into-ssa.c (mark_for_renaming): Handle a NULL symbol.
(rewrite_into_ssa): Make SSA names anonymous.
* tree-ssa-structalias.c (alias_get_name): Rewrite.
* tree-ssa-uninit.c (ssa_undefined_value_p): Handle anonymous
SSA names.
(warn_uninitialized_phi): Likewise.
* tree-ssa-loop-ivopts.c (prepare_decl_rtl): Defer expanding
anonymous SSA names to the expander.
(determine_iv_cost): Anonymous SSA names are artificial.
* tree-ssa-loop-manip.c (tree_transform_and_unroll_loop):
Handle anonymous SSA names.
* lto-streamer-out.c (output_ssa_names): Stream SSA_NAME_VAR
or if NULL, the type of the SSA name.
* tree-inline.c (remap_ssa_name): Handle anonymous SSA names,
remap names as anonymous where appropriate.
(insert_init_stmt): Pass SSA names down to insert_init_debug_bind.
* tree-ssa-uncprop.c (uncprop_into_successor_phis): Adjust
according to what we create conflicts for in out-of-SSA
coalescing.
* tree-parloops.c (separate_decls_in_region_name): Handle
anonymous SSA names.
(add_field_for_name): Likewise.
* tree.c (get_name): Handle SSA names.
* tree-ssa-loop-im.c (gen_lsm_tmp_name): Defer to get_name for
SSA_NAMEs.
* tree-vect-loop-manip.c (adjust_debug_stmts): Use
virtual_operand_p.
* tree-sra.c (create_access_replacement): Give up generating
a DECL_DEBUG_EXPR for SSA names in the memory reference.
(replace_removed_params_ssa_names): Guard use of SSA_NAME_VAR.
* tree-complex.c (get_component_ssa_name): Handle anonymous
SSA names.
(set_component_ssa_name): Likewise.
* tree-ssa-sccvn.c (visit_reference_op_load): Likewise.
* tree-object-size.c (collect_object_sizes_for): Handle
uninitialized SSA names properly.
* ipa-inline-analysis.c (eliminated_by_inlining_prob): Guard use of
SSA_NAME_VAR.
* ipa-split.c (test_nonssa_use): Likewise.
(consider_split): Likewise.
(mark_nonssa_use): Likewise.
c-family/
* c-pretty-print.c (pp_c_expression): Handle anonymous SSA names.
cp/
* error.c (dump_expr): Likewise.
* g++.dg/plugin/selfassign.c: Adjust.
* gcc.dg/plugin/selfassign.c: Likewise.
* gcc.dg/strlenopt-11.c: Likewise.
* gcc.dg/strlenopt-13.c: Likewise.
* gcc.dg/no-strict-overflow-4.c: Likewise.
* gcc.dg/strict-overflow-4.c: Likewise.
* gcc.dg/tree-ssa/alias-11.c: Likewise.
* gcc.dg/tree-ssa/alias-6.c: Likewise.
* gcc.dg/tree-ssa/asm-3.c: Likewise.
* gcc.dg/tree-ssa/pr18908.c: Likewise.
* gcc.dg/tree-ssa/pr19431.c: Likewise.
* gcc.dg/tree-ssa/ssa-pre-21.c: Likewise.
* gcc.dg/tree-ssa/phi-opt-10.c: Likewise.
* gcc.dg/tree-ssa/phi-opt-7.c: Likewise.
* gcc.dg/tree-ssa/slsr-27.c: Likewise.
* gcc.dg/tree-ssa/slsr-28.c: Likewise.
* gcc.dg/tree-ssa/slsr-29.c: Likewise.
* gcc.dg/pr46309.c: Likewise.
* gcc.dg/tree-ssa/loop-5.c: Likewise.
From-SVN: r190284
|
|
gcc/
* cfg.c (debug_bb): Do not set TDF_BLOCKS.
* cfghooks.c (dump_bb): Honor ~TDF_BLOCKS.
* pretty-print.c (pp_base_flush): Do not add a newline, and do not
clear pp_needs_newline.
* pretty-print.h (pp_newline_and_flush): New macro with the behavior
of pp_base_flush before the above change.
* langhooks.c (lhd_print_error_function): Use pp_newline_and_flush
instead of pp_flush.
* diagnostic.c (diagnostic_finish): Likewise.
(diagnostic_report_diagnostic): Likewise.
(verbatim): Likewise.
(error_recursion): Likewise.
* tree-pretty-print.c (print_generic_stmt): Likewise.
(print_generic_stmt_indented): LIkewise.
* gimple-pretty-print.c (print_gimple_stmt): Likewise.
(print_gimple_seq): Likewise.
(gimple_dump_bb_buff): Likewise.
c-family/
* c-pretty-print.c (pp_c_function_definition): Use pp_newline_and_flush
instead of separate pp_newline and pp_flush.
(print_c_tree): Likewise.
cp/
* error.c (print_instantiation_context): Pretty-print a newline before
diagnostic_flush_buffer.
* cxx-pretty-print.c (pp_cxx_function_definition): Use
pp_newline_and_flush instead of separate pp_newline and pp_flush.
testsuite/
* gcc.dg/tree-prof/update-loopch.c: Ask for dump with blocks info.
* gcc.dg/tree-ssa/attr-hotcold-2.c: Likewise.
* gcc.dg/tree-ssa/pr18133-1.c: Likewise.
From-SVN: r190215
|
|
When working on something else, I noticed that failing to provide the
second argument to the static_assert operator would lead to an ICE.
Fixed thus, and tested against trunk on x86_64-unknown-linux-gnu.
gcc/cp/
* semantics.c (finish_static_assert): Don't crash on erroneous
message or condition.
gcc/testsuite/
* g++.dg/cpp0x/static_assert8.C: New test.
From-SVN: r190182
|
|
/cp
2012-08-06 Marc Glisse <marc.glisse@inria.fr>
Paolo Carlini <paolo.carlini@oracle.com>
PR c++/54165
* typeck.c (build_static_cast_1): Move the conversion to void case
before the perform_direct_initialization_if_possible call.
/testsuite
2012-08-06 Marc Glisse <marc.glisse@inria.fr>
Paolo Carlini <paolo.carlini@oracle.com>
PR c++/54165
* g++.dg/conversion/void2.C: New.
Co-Authored-By: Paolo Carlini <paolo.carlini@oracle.com>
From-SVN: r190175
|
|
gcc/cp/ChangeLog
2012-08-03 Marc Glisse <marc.glisse@inria.fr>
* pt.c (tsubst_copy_and_build): Handle VECTOR_TYPE like scalars.
* cp-tree.h (scalarish_type_p): Declare.
* tree.c (scalarish_type_p): Make non-static.
gcc/testsuite/ChangeLog
2012-08-03 Marc Glisse <marc.glisse@inria.fr>
* g++.dg/ext/vector17.C: New testcase.
From-SVN: r190123
|
|
/cp
2012-08-02 Jason Merrill <jason@redhat.com>
Paolo Carlini <paolo.carlini@oracle.com>
PR c++/51213 (again)
* pt.c (type_unification_real): Call push_deferring_access_checks /
pop_deferring_access_checks around the substitution of default
template args.
(instantiate_template_1): When the specialization returned by
retrieve_specialization has FNDECL_HAS_ACCESS_ERRORS set and we
are in a SFINAE context, simply return error_mark_node.
* cp-tree.h (FNDECL_RECHECK_ACCESS_P): Rename FNDECL_HAS_ACCESS_ERRORS.
/testsuite
2012-08-02 Jason Merrill <jason@redhat.com>
Paolo Carlini <paolo.carlini@oracle.com>
PR c++/51213 (again)
* g++.dg/cpp0x/sfinae37.C: Extend.
Co-Authored-By: Paolo Carlini <paolo.carlini@oracle.com>
From-SVN: r190093
|
|
to bool type, adjust.
2012-07-31 Paolo Carlini <paolo.carlini@oracle.com>
* pt.c (check_default_tmpl_args): Change is_primary and is_partial
parameters to bool type, adjust.
(push_template_decl_real): Tidy.
* parser.c (cp_parser_init_declarator): Adjust.
* decl.c (redeclaration_error_message): Likewise.
* cp-tree.h (check_default_tmpl_args): Update prototype.
From-SVN: r190013
|
|
default template arguments)
/cp
2012-07-31 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/53624
* pt.c (check_default_tmpl_args): Don't check local types.
/testsuite
2012-07-31 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/53624
* g++.dg/cpp0x/temp_default5.C: New.
From-SVN: r190001
|
|
2012-07-25 Sandra Loosemore <sandra@codesourcery.com>
Paul Brook <paul@codesourcery.com>
PR target/53633
gcc/
* target.def (warn_func_return): New hook.
* doc/tm.texi.in (TARGET_WARN_FUNC_RETURN): New hook.
* doc/tm.texi: Regenerate.
* doc/sourcebuild.texi (Effective-Target Keywords): Document
naked_functions.
* ipa-pure-const.c (warn_function_noreturn): Check
targetm.warn_func_return.
* tree-cfg.c (execute_warn_function_return): Likewise.
* config/spu/spu.c (spu_warn_func_return): New.
(TARGET_WARN_FUNC_RETURN): Define.
* config/rx/rx.c (rx_warn_func_return): New.
(TARGET_WARN_FUNC_RETURN): Define.
* config/avr/avr.c (avr_warn_func_return): New.
(TARGET_WARN_FUNC_RETURN): Define.
* config/arm/arm.c (arm_warn_func_return): New.
(TARGET_WARN_FUNC_RETURN): Define.
* config/mcore/mcore.c (mcore_warn_func_return): New.
(TARGET_WARN_FUNC_RETURN): Define.
(saved_warn_return_type, saved_warn_return_type_count): Remove.
(mcore_reorg, mcore_handle_naked_attribute): Remove warn_return hack.
gcc/cp/
* decl.c (finish_function): Check targetm.warn_func_return.
gcc/testsuite/
* lib/target-suports.exp (check_effective_target_naked_functions):
New.
* c-c++-common/pr53633.c: New test.
Co-Authored-By: Paul Brook <paul@codesourcery.com>
From-SVN: r189860
|
|
PR c++/54086
* decl.c (grokdeclarator): Allow const and constexpr together.
From-SVN: r189852
|
|
PR c++/54020
* semantics.c (potential_constant_expression_1) [COND_EXPR]: Call
maybe_constant_value.
From-SVN: r189851
|
|
* cp-tree.h (tsubst_flags): Remove tf_no_access_control.
* call.c (standard_conversion): Don't set it.
* class.c (resolve_address_of_overloaded_function): Don't check it.
* decl.c (check_default_argument): Call
perform_implicit_conversion_flags.
From-SVN: r189850
|
|
From-SVN: r189849
|
|
make_typename_type (complain & tf_error -> complain).
2012-07-24 Paolo Carlini <paolo.carlini@oracle.com>
* pt.c (convert_template_argument, tsubst): Simplify fourth argument
to make_typename_type (complain & tf_error -> complain).
From-SVN: r189825
|
|
gcc/
* sbitmap.h (SBITMAP_ELT_BITS): Use "1u" trick as for BITMAP_WORD_BITS.
Move test to check that there is a popcount function for the the number
of bits in SBITMAP_ELT_BITS to sbitmap.c.
* sbitmap.c: Test SBITMAP_ELT_BITS, not HOST_BITS_PER_WIDEST_FAST_INT.
MEM_STAT_INFO): Define in terms of their ALONE counterparts.
* configure.ac (GATHER_STATISTICS): Always define, non-zero if enabled.
* configure: Regenerate.
* statistics.h (GATHER_STATISTICS): Error out if it is not defined.
(GCC_MEM_STAT_ARGUMENTS): New define.
(ALONE_MEM_STAT_DECL): Define in terms of GCC_MEM_STAT_ARGUMENTS.
(ALONE_FINAL_MEM_STAT_DECL, ALONE_FINAL_PASS_MEM_STAT): New defines.
(MEM_STAT_DECL, FINAL_MEM_STAT_DECL, PASS_MEM_STAT, FINAL_PASS_MEM_STAT,
* ggc-internal.h (ggc_record_overhead): Use FINAL_MEM_STAT_DECL.
* ggc.h (ggc_record_overhead, ggc_free_overhead,
ggc_prune_overhead_list): Remove internal prototypes, they are defined
already in ggc-internal.h.
* ggc-common.c (struct loc_descriptor): Remove #ifdef GATHER_STATISTICS
wrappers.
(add_statistics): Likewise.
(dump_ggc_loc_statistics): Likewise. Return if GATHER_STATISTICS is 0.
* ggc-zone.c (struct page_entry): Remove #ifdef GATHER_STATISTICS
wrappers around "survived" and "stats" members.
(alloc_large_page): Always initialize survived.
(ggc_internal_alloc_zone_stat): Likewise.
Remove #ifdef GATHER_STATISTICS wrappers. Record overhead if
GATHER_STATISTICS is non-0.
(ggc_free): Convert #ifdef GATHER_STATISTICS to if-code.
(sweep_pages): Always increase survived.
(ggc_collect_1): Convert #ifdef GATHER_STATISTICS to if-code.
(calculate_average_page_survival): Always define.
(ggc_collect): Convert #ifdef GATHER_STATISTICS to if-code.
(ggc_print_statistics): Likewise.
(ggc_pch_read): Likewise.
* ggc-page.c (struct globals): Always define "stats" member.
(ggc_internal_alloc_stat): Convert #ifdef GATHER_STATISTICS to if-code.
(ggc_free): Likewise.
(ggc_collec): Likewise.
(ggc_print_statistics): Likewise.
* bitmap.h (struct bitmap_head_def): Always define "desc" member.
(bitmap_initialize_stat): Convert #ifdef GATHER_STATISTICS to if-code.
* gimple.h (enum gimple_alloc_kind): Always define.
(gimple_alloc_kind): Likewise.
* tree-flow.h (phinodes_print_statistics): Always define.
(ssanames_print_statistics): Likewise.
* vec.h (vec_heap_free): Always define.
(VEC_stack_alloc): Define if GATHER_STATISTICS is non-0.
* alloc-pool.c (alloc_pool_descriptor): Always define.
(create_alloc_pool): Convert #ifdef GATHER_STATISTICS to if-code.
(empty_alloc_pool): Likewise.
(pool_alloc): Likewise.
(pool_free): Likewise.
(dump_alloc_pool_statistics): Likewise.
(print_statistics): Always define.
* bitmap.c (struct bitmap_descriptor): Always define.
(bitmap_register): Pass ALONE_FINAL_PASS_MEM_STAT.
(register_overhead): Always define.
(bitmap_element_free): Convert #ifdef GATHER_STATISTICS to if-code.
(bitmap_element_allocate): Likewise.
(bitmap_elt_clear_from): Likewise.
(bitmap_obstack_alloc_stat): Likewise.
(bitmap_gc_alloc_stat): Likewise.
(bitmap_obstack_free): Likewise.
(bitmap_find_bit): Likewise.
(bitmap_ior_and_into): Likewise.
(bitmap_print): Likewise.
(dump_bitmap_statistics): Likewise. Return if GATHER_STATISTICS is 0.
* gimple.c (gimple_alloc_counts, gimple_alloc_sizes): Always define.
(gimple_alloc_kind_names): Likewise.
(gimple_alloc_stat): Convert #ifdef GATHER_STATISTICS to if-code.
(dump_gimple_statistics): Likewise. Return if GATHER_STATISTICS is 0.
* rtl.c (rtx_alloc_counts, rtx_alloc_sizes, rtvec_alloc_counts,
rtvec_alloc_sizes): Always define.
(rvec_alloc): Convert #ifdef GATHER_STATISTICS to if-code.
(rtx_alloc_stat): Likewise.
(dump_rtx_statistics): Likewise. Return if GATHER_STATISTICS is 0.
* tree.c (_obstack_allocated_p, tree_code_counts, tree_node_counts,
tree_node_sizes, tree_node_kind_names): Always define.
(record_node_allocation_statistics): Convert #ifdef GATHER_STATISTICS
to if-code.
(type_hash_canon): Likewise.
(dump_tree_statistics): Likewise.
* tree-ssanames.c (ssa_name_nodes_reused, ssa_name_nodes_created):
Always define.
(ssanames_print_statistics): Likewise.
(make_ssa_name_fn): Convert #ifdef GATHER_STATISTICS to if-code.
* tree-phinodes.c (phi_nodes_reused, phi_nodes_created): Always define.
(phinodes_print_statistics): Likewise.
(allocate_phi_node): Convert #ifdef GATHER_STATISTICS to if-code.
* vec.c (struct vec_descriptor): Always define.
(hash_descriptor, eq_descriptor, ptr_hash_entry, hash_ptr, eq_ptr,
vec_descriptor, rester_overhead, free_overhead): Likewise.
(cmp_statistic): Likewise.
(vec_heap_free): Convert #ifdef GATHER_STATISTICS to if-code.
(vec_heap_o_reserve_1): Likewise.
(dump_vec_loc_statistics): Likewise.
cp/
* cp/class.c (n_vtables, n_vtable_entries, n_vtable_searches,
n_vtable_elems, n_convert_harshness, n_compute_conversion_costs,
n_inner_fields_searched): Always define.
(build_primary_vtable): Convert #ifdef GATHER_STATISTICS to if-code.
(print_class_statistics): Convert #ifdef GATHER_STATISTICS to if-code.
* cp/tree.c (depth_reached): Always define global.
(cxx_print_statistics): Convert #ifdef GATHER_STATISTICS to if-code.
* cp/pt.c (depth_reached): Always define.
(push_tinst_level): Convert #ifdef GATHER_STATISTICS to if-code.
* cp/search.c (n_fields_searched, n_calls_lookup_field,
n_calls_lookup_field_1, n_calls_lookup_fnfields,
n_calls_lookup_fnfields_1, n_calls_get_base_type,
n_outer_fields_searched, n_contexts_saved): Always define.
(lookup_field_1): Convert #ifdef GATHER_STATISTICS to if-code.
(lookup_member): Likewise.
(lookup_fnfields_idx_nolazy): Likewise.
(print_search_statistics): Likewise.
(reinit_search_statistics): Unconditionally re-set counters.
* cp/lex.c (retrofit_lang_decl): Convert #ifdef GATHER_STATISTICS
to if-code.
(cxx_dup_lang_specific_decl): Likewise.
(copy_lang_type): Likewise.
(cxx_make_type): Likewise.
From-SVN: r189803
|
|
TYPE_NEXT_VARIANT (variant) == variant)
PR c++/54038
* tree.c (build_cplus_array_type): Use build_cplus_array_type to build
canonical array type rather than mess with its TYPE_*_VARIANT.
From-SVN: r189719
|
|
emitted to .rodata)
PR c++/54026
* typeck.c (cp_apply_type_quals_to_decl): Check COMPLETE_TYPE_P.
From-SVN: r189701
|
|
PR c++/54021
* call.c (build_cxx_call): Set optimize when folding
__builtin_constant_p in a constexpr function.
From-SVN: r189677
|
|
From-SVN: r189640
|
|
DR 1170
PR c++/51213
* semantics.c (perform_access_checks): Add complain parm, return bool.
(perform_deferred_access_checks): Likewise.
(perform_or_defer_access_check): Likewise.
(speculative_access_check): Remove.
* call.c (enforce_access): Add complain parm, return bool.
* decl.c, friend.c, class.c, init.c, parser.c: Adjust callers.
* search.c: Adjust callers.
* cp-tree.h (TINFO_RECHECK_ACCESS_P): New macro.
(FNDECL_RECHECK_ACCESS_P): New macro.
* method.c (synthesized_method_walk): Stop deferring access checks.
* pt.c (recheck_decl_substitution): New.
(instantiate_template_1): Set and check FNDECL_RECHECK_ACCESS_P.
Co-Authored-By: Jason Merrill <jason@redhat.com>
From-SVN: r189639
|
|
trying to store through it.
* method.c (process_subob_fn): Make sure no_implicit_p is non-null
before trying to store through it.
From-SVN: r189638
|
|
<anonymous enum>)
PR c++/53995
* decl.c (finish_enum_value_list): Only call
insert_late_enum_def_into_classtype_sorted_fields in class scope.
From-SVN: r189598
|
|
PR c++/53989
* tree.c (build_cplus_array_type): Also add TYPE_CANONICAL
to the list of variants.
From-SVN: r189587
|
|
* decl.c (xref_basetypes): Complain about incomplete template base.
* class.c (finish_struct): Adjust variants in templates, too.
From-SVN: r189583
|
|
PR c++/53549
* parser.c (cp_parser_class_head): Call xref_basetypes here.
(cp_parser_class_specifier_1): Not here.
* pt.c (tsubst_decl) [USING_DECL]: Check uses_template_parms
as well as DECL_DEPENDENT_P.
From-SVN: r189582
|
|
* cp-tree.h (struct deferred_access_check): Add location.
* semantics.c (perform_access_checks): Use it.
(perform_or_defer_access_check): Store it.
From-SVN: r189552
|
|
gcc/
* system.h (dump_file): Do not define.
* tree-pass.h: Include dumpfile.h, which is a new file containing...
(enum tree_dump_index, TDF_*, get_dump_file_name, dump_enabled_p,
dump_initialized_p, dump_begin, dump_end, dump_node, dump_switch_p,
dump_flag_name, dump_file, dump_flags, dump_file_name,
get_dump_file_info, struct dump_file_info): all of this, moved to...
* dumpfile.h: Here, new file.
* tree-dump.h: Include dumpfile.h, but not tree-pass.h.
(dump_stmt): Remove prototype for C++ specific function.
(dump_enumerated_decls): Move prototype from here...
* tree-flow.h (dump_enumerated_decls): ... to here.
(get_ref_base_and_extent) Move prototype from here ...
* tree.h (get_ref_base_and_extent) ... to here.
* tree-ssa-live.c: Do not inclde tree-pretty-print.h, because
gimple-pretty-print.h is enough. Do not include tree-dump.h,
include timevar.h and dumpfile.h instead.
(struct numbered_tree_d, compare_decls_by_uid,
dump_enumerated_decls_push, dump_enumerated_decls): Move from here ...
* tree-dfa.c:(struct numbered_tree_d, compare_decls_by_uid,
dump_enumerated_decls_push, dump_enumerated_decls):... to here.
Do not include timevar.h.
* tree.c: Do not include timevar.h.
* tree-cfg.c: Do not include langhooks.h, tree-pretty-print.h, and
timevar.h.
(dump_cfg_stats): Use current_function_name.
(gimple_cfg2vcg): Likewise.
(dump_function_to_file): Likewise.
* df-scan.c: Do not include tree-pass.h and timevar.h.
Include dumpfile.h.
(df_entry_block_bitmap_verify, df_exit_block_bitmap_verify): Do not
use print_current_pass.
* df-problems.c: Include dumpfile.h.
Always define REG_DEAD_DEBUGGING, avoid #ifdef code, because it
leads to errors in the code not selected.
(df_note_compute): Do not print_rtl_with_bb here. Fix compilation
bug if REG_DEAD_DEBUGGING is not 0, get_insns is not available here.
* lcm.c: Include dumpfile.h.
Remove obsolete include of insn-attr.h.
* dojump.c (do_compare_rtx_and_jump): Remove failure printing for
missing probability notes.
* stmt.c: Include dumpfile.h.
(emit_case_decision_tree): Re-enable printing expand details only
if TDF_DETAILS.
* alias.c, auto-inc-dec.c, bb-reorder.c, caller-save.c, cfg.c,
cfgcleanup.c, cfgexpand.c, cfgloop.c, cfgloopmanip.c, cgraph.c,
cgraphclones.c, cgraphunit.c, combine.c, combine-stack-adj.c,
coverage.c, cprop.c, cse.c, cselib.c, dbgcnt.c, dce.c, df-core.c,
dse.c, dwarf2out.c, emit-rtl.c, except.c, expr.c, final.c,
function.c, fwprop.c, gcse.c, gimple-fold.c,
gimple-pretty-print.c, gimple-ssa-strength-reduction.c,
gimplify.c, graphite-blocking.c, graphite-clast-to-gimple.c,
graphite-dependences.c, graphite-interchange.c,
graphite-optimize-isl.c, graphite-poly.c,
graphite-sese-to-poly.c, haifa-sched.c, hw-doloop.c, ifcvt.c,
ipa.c, ipa-cp.c, ipa-inline-analysis.c, ipa-inline.c,
ipa-inline-transform.c, ipa-prop.c, ipa-pure-const.c,
ipa-reference.c, ipa-split.c, ipa-utils.c, ira.c, ira-emit.c,
jump.c, loop-doloop.c, loop-init.c, loop-invariant.c, loop-iv.c,
loop-unroll.c, loop-unswitch.c, lower-subreg.c,
lto-section-out.c, lto-streamer-in.c, matrix-reorg.c, mcf.c,
mode-switching.c, modulo-sched.c, omega.c, omp-low.c, passes.c,
plugin.c, postreload.c, postreload-gcse.c, predict.c, print-rtl.c,
print-tree.c, profile.c, recog.c, ree.c, regcprop.c, reginfo.c,
regmove.c, regrename.c, reg-stack.c, reload1.c, reorg.c,
sched-rgn.c, sched-vis.c, sel-sched.c, sel-sched-ir.c,
store-motion.c, tracer.c, trans-mem.c, tree-affine.c,
tree-call-cdce.c, tree-cfgcleanup.c, tree-chrec.c,
tree-data-ref.c, tree-diagnostic.c, tree-dump.c,
tree-eh.c, tree-flow-inline.h, tree-if-conv.c, tree-into-ssa.c,
tree-mudflap.c, tree-nrv.c, tree-object-size.c,
tree-optimize.c, tree-outof-ssa.c, tree-predcom.c,
tree-pretty-print.c, tree-profile.c, tree-scalar-evolution.c,
tree-sra.c, tree-ssa-address.c, tree-ssa-alias.c, tree-ssa.c,
tree-ssa-ccp.c, tree-ssa-coalesce.c, tree-ssa-copy.c,
tree-ssa-copyrename.c,, tree-ssa-dce.c, tree-ssa-dom.c,
tree-ssa-dse.c, tree-ssa-forwprop.c, tree-ssa-ifcombine.c,
tree-ssa-loop.c, tree-ssa-loop-ch.c, tree-ssa-loop-im.c,
tree-ssa-loop-ivcanon.c, tree-ssa-loop-ivopts.c,
tree-ssa-loop-manip.c, tree-ssa-loop-niter.c,
tree-ssa-loop-prefetch.c, tree-ssa-loop-unswitch.c,
tree-ssa-math-opts.c, tree-ssa-operands.c, tree-ssa-phiopt.c,
tree-ssa-phiprop.c, tree-ssa-pre.c, tree-ssa-propagate.c,
tree-ssa-reassoc.c, tree-ssa-sccvn.c, tree-ssa-sink.c,
tree-ssa-structalias.c, tree-ssa-tail-merge.c, tree-ssa-ter.c,
tree-ssa-threadedge.c, tree-ssa-threadupdate.c,
tree-ssa-uncprop.c, tree-ssa-uninit.c,
tree-switch-conversion.c, tree-tailcall.c,
tree-vect-data-refs.c, tree-vect-loop.c,
tree-vect-loop-manip.c, tree-vectorizer.c,
tree-vect-patterns.c, tree-vect-slp.c, tree-vect-stmts.c,
tree-vrp.c, value-prof.c, var-tracking.c, web.c: Include tree-pass.h
only if needed. If tree-pass.h is included, do not include timevar.h
and dumpfile.h. If tree-pass.h is not included but dump_file, or
dump_flags, or the TDF_* flags are used, include dumpfile.h.
If gimple-pretty-print.h is included, don't include tree-pretty-print.h.
Remove assorted unnecessary includes.
* config/mn10300/mn10300.c, config/c6x/c6x.c, config/ia64/ia64.c,
config/arm/arm.c, config/bfin/bfin.c, config/frv/frv.c,
config/spu/spu.c, config/mep/mep.c, config/i386/i386.c:
Include dumpfile.h.
* config/rl78/rl78.c: Include dumpfile.h instead of tree-pass.h.
* arm/t-arm, avr/t-avr, i386/t-i386, ia64/t-ia64, mep/t-mep,
spu/t-spu-elf: Fix dependencies.
c-family/
* c-gimplify.c: Include dumpfile.h instead of tree-dump.h.
* c-ada-spec.c: Likewise.
* c-dump.c (dump_stmt): Move to cp/dump.c, the only user.
c/
* c-decl.c: Include dumpfile.h instead of tree-dump.h.
* Make-lang.in: Fix dependencies.
cp/
* dump.c (dump_stmt): Moved here from c-dump.c.
* optimize.c: Include dumpfile.h instead of tree-dump.h.
* class.c: Likewise.
* decl2.c: Likewise.
* Make-lang.in: Fix dependencies.
fortran/
* f95-lang.c: Include dumpfile.h instead of tree-dump.h.
* Make-lang.in: Fix dependencies.
java/
* java-gimplify.c Include dumpfile.h instead of tree-dump.h
* Make-lang.in: Fix dependencies.
lto/
* lto.c: Do not include timevar.h.
* Make-lang.in: Fix dependencies.
ada/
* gcc-interface/utils.c: Include timevar.h.
* Make-lang.in: Fix dependencies.
From-SVN: r189519
|
|
errors not matching))
PR c++/53953
* method.c (synthesized_method_walk): Initialize no_implicit_p sooner.
From-SVN: r189465
|
|
* pt.c (instantiate_decl): Check typedefs access here.
(instantiate_template_1): Not here.
From-SVN: r189444
|
|
* pt.c (deduction_tsubst_fntype): Just suppress access checking.
(instantiate_template_1): Set DECL_TI_TEMPLATE before access checking.
(push_deduction_access_scope, pop_deduction_access_scope): Remove.
From-SVN: r189443
|
|
DR 1402
* method.c (synthesized_method_walk): Replace uses of msg with diag.
Correct handling of virtual bases with move operations.
(process_subob_fn, walk_field_subobs): Replace uses of msg with diag.
From-SVN: r189426
|
|
gcc/
* expr.h (can_move_by_pieces): Move prototype from here ...
* tree.h (can_move_by_pieces): ... to here.
* optabs.h (set_widening_optab_handler): Use XCNEW.
* gimplify.c: Do not include expr.h.
* toplev.c: Do not include dwarf2out.h.
* config/ia64/ia64.c: Likewise.
* config/sparc/sparc.c: Likewise.
* config/sparc/t-sparc (sparc.o): Fix dependencies.
* Makefile.in (toplev.o): Fix dependencies
(c-family/c-gimplify.o): Likewise.
(c-family/c-common.o): Likewise.
c-family/
* c-gimplify.c: Do not include basic-block.h.
* c-common.c: Do not include linfuncs.h.
cp/
* method.c: Do not include tree-pass.h.
fortran/
* trans.c: Do not include defaults.h.
* trans-intrinsic.c: Likewise.
java/
* decl.c: Do not include libfuncs.h.
* class.c: Do not include defaults.h.
* jvgenmain.c: Likewise.
* magnle.c: Likewise.
* Make-lang.in (decl.o): Fix dependencies.
From-SVN: r189425
|
|
DR 1402
PR c++/53733
* cp-tree.h (FNDECL_SUPPRESS_IMPLICIT_DECL): New.
(struct lang_decl_fn): Add suppress_implicit_decl field.
* method.c (implicitly_declare_fn): Check it.
(process_subob_fn): Add no_implicit_p parm.
(walk_field_subobs, synthesized_method_walk): Likewise.
(maybe_explain_implicit_delete): Adjust.
(explain_implicit_non_constexpr): Adjust.
From-SVN: r189396
|
|
in other places, too.
* method.c (synthesized_method_walk): Avoid changing
EH spec based on cleanups in other places, too.
From-SVN: r189395
|
|
gcc/cp/ChangeLog
2012-07-09 Sterling Augustine <saugustine@google.com>
* error.c (lang_decl_name): Use TFF_UNQUALIFIED_NAME flag.
gcc/testsuite/ChangeLog
2012-07-09 Sterling Augustine <saugustine@google.com>
* g++.dg/debug/dwarf2/pubnames-2.C: New.
From-SVN: r189392
|
|
gcc/
* basic-block.h: Re-group most prototypes per file.
(struct edge_list): Remove num_blocks field.
(dump_bb_info): Adjust prototypes.
(dump_reg_info): Move prototype to regs.h.
* function.h: Do not include tree.h.
Include vec.h, vecir.h, input.h and machmode.h to compensate.
(function_name): New prototype.
* gimple.h: Include tree.h to compensate for basic-block.h change.
* langhooks.h: Note that tree.h is only necessary for enum tree_code.
* regs.h (dump_reg_info): Prototype here.
* regset.h: Adjust file reference in comment.
(debug_regset): Remove prototype.
* rtl.h: Include flags.h for flag_var_tracking_assignments.
(MAY_HAVE_DEBUG_INSNS): Define as flag_var_tracking_assignments
instead of no-longer-available tree.h's MAY_HAVE_DEBUG_STMTS.
(dump_reg_info, dump_flow_info): Remove prototypes.
* bb-reorder.c (set_edge_can_fallthru_flag): Move from cfganal.c
to here, the only user. Make static.
(reorder_basic_blocks): Call dump_reg_info before dump_flow_info.
* cfg.c: Do not include tm.h, tree.h, rtl.h, hard-reg-set.h, regs.h,
flags.h, function.h, except.h, diagnostic-core.h, tm_p.h, timevar.h,
tree-pass.h, cfgloop.h, and tree-flow.h.
Include basic-block.h, the first header I'd expect to be included.
(reg_obstack): Move to df-core.c.
(free_edge): Remove bogus ATTRIBUTE_UNUSED.
(remove_edge_raw): Do not call tree-ssa's redirect_edge_var_map_clear.
(redirect_edge_succ_nodup): Move to cfghooks.c.
(dump_regset, debug_regset): Move to df-core.c.
(dump_bb_info): Move to cfgrtl.c.
(dump_reg_info): Move to regstat.c.
(dump_flow_info): Move to cfgrtl.c.
(debug_flow_info): Likewise.
(dump_edge_info): Do not look at cfun, a CFG without cfun is nonsense.
* cfganal.c: Do not include tm.h, rtl.h, obstack.h, hard-reg-set.h,
insn-config.h, recog.h, diagnostic-core.h, tm_p.h, and cfgloop.h.
(flow_active_insn_p, forwarder_block_p, can_fallthru,
could_fall_through): Move to cfgrtl.c.
(set_edge_can_fallthru_flag): Moved to bb-reorder.c.
(create_edge_list): Do not set edge_list's removed num_blocks.
(print_edge_list): Look at n_basic_blocks instead of num_blocks.
(flow_nodes_print): Remove.
(flow_edge_list_print): Remove.
(inverted_post_order_compute): Use FOR_ALL_BB.
*cfgrtl.c (dump_flow_info): Moved from cfg.c.
Do not call dump_reg_info.
(debug_flow_info): Moved from cfg.c
(dump_bb_info): Moved from cfg.c. Take 'verbose' argument
to avoid looking at TDF_* flags from tree-pass.h.
(flow_active_insn_p, forwarder_block_p, can_fallthru,
could_fall_through): Moved from cfganal.c.
(print_rtl_with_bb): Adjust dump_bb_info calls.
* cfghooks.c (redirect_edge_succ_nodup): Moved from cfg.c.
(remove_edge): Call redirect_edge_var_map_clear if IR_GIMPLE.
(cfgcleanup.c): Look at MAY_HAVE_DEBUG_INSNS, not MAY_HAVE_DEBUG_STMTS.
* cselib.c: Include tree.h with a FIXME.
* df-core.c (reg_obstack): Moved from cfg.c.
(dump_regset): Likewise.
(debug_regset): Likewise. Make a DEBUG_FUNCTION.
* final.c (compute_alignments): Call dump_reg_info before
dump_flow_info.
* function.c (function_name): New function.
(current_function_name): Use it.
* ifcvt.c (rest_of_handle_if_conversion): Call dump_reg_info before
dump_flow_info.
* ira-conflicts.c: Include tree.h with a note.
* regstat.c (dump_reg_info): Moved here from cfg.c.
* loop-init.c: Include regs.h instead of hard-reg-set.h.
(rtl_loop_init): Call dump_reg_info before dump_flow_info.
(rtl_loop_done): Likewise.
* mcf.c: Include tree.h before langhooks.h.
* predict.c (maybe_hot_count_p): Assert we have cfun.
(probably_never_executed_bb_p): Likewise.
* profile.c (compute_branch_probabilities): Use gimple_dump_cfg
instead of dump_flow_info.
* sched-deps.c: Include tree.h with a FIXME.
(call_may_noreturn_p): Add FIXME note why this function has to
look at function decls instead of function decl flags.
* sched-vis.c: Include tree.h with a FIXME.
(print_rtl_slim): Adjust dump_bb_info uses.
* statistics.c (statistics_fini_pass_2): Use current_function_name
to avoid including tree.h.
(statistics_counter_event): Use function_name for the same reason.
(statistics_histogram_event): Likewise.
* tracer.c (tracer): Remove bogus gcc_assert. Use brief_dump_cfg
instead of dump_flow_info.
* var-tracking.c (variable_tracking_main_1): Call dump_reg_info
before dump_flow_info.
* doc/cfg.texi: Update CFG documentation.
* Makefile.in (RTL_H): Depend on FLAGS_H.
(GIMPLE_H): Depend on TREE_H.
(FUNCTION_H): Depend on VEC_H, vecir.h, INPUT_H and MACHMODE_H,
but no longer on TREE_H.
(C_COMMON_H): Depend on TREE_H.
(cselib.o, cse.o, cfganal.o, loop-init.o, ira-conflicts.o,
sched-deps.o, sched-vis.o): Fixup dependencies.
c-family/
* c-common.h: Include tree.h.
cp/
* decl.c (cp_finish_decl): Add FIXME at add_local_decl call site.
From-SVN: r189359
|
|
in template)
PR c++/53862
* pt.c (tsubst_arg_types): Add "end" parameter.
(check_undeduced_parms): Use it.
From-SVN: r189334
|
|
From-SVN: r189332
|
|
default expression)
PR c++/53858
* name-lookup.c (ambiguous_decl): Use DECL_TYPE_TEMPLATE_P.
From-SVN: r189331
|
|
template-pack expansion)
PR c++/53039
* pt.c (arg_from_parm_pack_p): Go back to using same_type_p or
cp_tree_equal.
From-SVN: r189305
|
|
* cp-tree.h (TEMPLATE_PARM_NUM_SIBLINGS): Remove.
(struct template_parm_index_s): Remove num_siblings.
* pt.c (fixup_template_parms, fixup_template_parm_index): Remove.
(fixup_template_type_parm_type): Remove.
(build_template_parm_index): Remove num_siblings parm.
(process_template_parm): Likewise.
* parser.c (cp_parser_template_parameter_list): Adjust.
* tree.c (cp_tree_equal): Don't compare num_siblings.
* typeck.c (comp_template_parms_position): Likewise.
From-SVN: r189299
|
|
PR c++/50852
PR c++/53039
* tree.c (strip_typedefs_expr): New.
* cp-tree.h: Declare it.
* pt.c (convert_template_argument, unify): Use it.
* parser.c (cp_parser_template_declaration_after_export): Don't call
fixup_template_parms.
From-SVN: r189298
|
|
PR c++/53848
* decl.c (build_enumerator): Don't use build_lang_decl_loc.
From-SVN: r189267
|
|
PR c++/53812
* semantics.c (finish_goto_stmt): Surround computed goto argument
with CLEANUP_POINT_EXPR if needed.
* g++.dg/ext/label14.C: New test.
From-SVN: r189225
|
|
multiple inheritance)
PR c++/53619
* pt.c (in_template_function): New.
* cp-tree.h: Declare it.
* class.c (build_base_path, resolves_to_fixed_type_p): Use it.
From-SVN: r189191
|
|
PR c++/53783
* pt.c (tsubst_copy_and_build) [LAMBDA_EXPR]: Use tsubst
for LAMBDA_EXPR_EXTRA_SCOPE.
From-SVN: r189190
|