gcc/
* tree.h (tree_base): Add packed_flag and user_align fields.
Decrease size of spare field.
(TYPE_USER_ALIGN): Use user_align from tree_base.
(DECL_USER_ALIGN): Likewise.
(TYPE_PACKED): Use packed_flag from tree_base.
(DECL_PACKED): Likewise.
(tree_type): Delete packed_flag and user_align fields. Widen
precision field. Widen mode field and shuffle fields to align
mode on an 8-bit boundary.
(tree_decl_common): Delete decl_flag_1 and user_align fields.
Renumber decl_flag_* fields. Fix comments. Widen
decl_common_unused field.
(DECL_HAS_VALUE_EXPR_P): Adjust for renumbering of decl_flag_*
fields.
(DECL_EXTERNAL): Likewise.
(DECL_BIT_FIELD): Likewise.
(DECL_NONADDRESSABLE_P): Likewise.
(TYPE_DECL_SUPRESS_DEBUG): Likewise.
* config/arm/arm-modes.def (XImode): Make it an INT_MODE.
gcc/testsuite/
* gcc.target/arm/neon-modes-1.c: New test.
From-SVN: r148348
* vec.h (DEF_VEC_ALLOC_I): Use DEF_VEC_NONALLOC_FUNCS_I.
(DEF_VEC_ALLOC_P): Use DEF_VEC_NONALLOC_FUNCS_P.
(DEF_VEC_ALLOC_O): Use DEF_VEC_NONALLOC_FUNCS_O.
(DEF_VEC_ALLOC_FUNC_P): Only define VEC_OP (T,A,alloc).
(DEF_VEC_NONALLOC_FUNCS_P): New macro, broken out of old
DEF_VEC_ALLOC_FUNC_P.
(DEF_VEC_ALLOC_FUNC_O): Only define VEC_OP (T,A,alloc).
(DEF_VEC_NONALLOC_FUNCS_O): New macro, broken out of old
DEF_VEC_ALLOC_FUNC_O.
(DEF_VEC_ALLOC_FUNC_I): Only define VEC_OP (T,A,alloc).
(DEF_VEC_NONALLOC_FUNCS_I): New macro, broken out of old
DEF_VEC_ALLOC_FUNC_I.
(vec_stack_p_reserve, vec_stack_p_reserve_exact): Declare.
(vec_stack_p_reserve_exact_1): Declare.
(vec_stack_o_reserve, vec_stack_o_reserve_exact): Declare.
(vec_stack_free): Declare.
(VEC_stack_alloc): Define.
(DEF_VEC_ALLOC_P_STACK, DEF_VEC_ALLOC_FUNC_P_STACK): Define.
(DEF_VEC_ALLOC_O_STACK, DEF_VEC_ALLOC_FUNC_O_STACK): Define.
(DEF_VEC_ALLOC_I_STACK, DEF_VEC_ALLOC_FUNC_I_STACK): Define.
* vec.c (void_p): New type. Call DEF_VEC_P and DEF_VEC_ALLOC_P
for void_p.
(stack_vecs): New static variable.
(vec_stack_p_reserve_exact_1): New function.
(vec_stack_o_reserve_1): New static function.
(vec_stack_p_reserve, vec_stack_p_reserve_exact): New functions.
(vec_stack_o_reserve, vec_stack_o_reserve_exact): New functions.
(vec_stack_free): New function.
* df-scan.c (df_ref): Use DEF_VEC_P and DEF_VEC_ALLOC_P_STACK.
(VEC_df_ref_stack_alloc): Define.
(df_mw_hardreg_ptr): New type. Use DEF_VEC_P and
DEF_VEC_ALLOC_P_STACK.
(VEC_df_mw_hardreg_ptr_stack_alloc): Define.
(struct df_collection_rec): Change _vec fields to VEC. Remove
_use fields.
(df_free_collection_rec): Adjust for new fields.
(df_insn_rescan): Use new df_collection_rec fields.
(df_notes_rescan, df_canonize_collection_rec): Likewise.
(df_ref_create_structure, df_ref_record): Likewise.
(df_get_conditional_uses, df_get_call_refs): Likewise.
(df_insn_refs_collect, df_bb_refs_collect): Likewise.
(df_bb_refs_record, df_record_entry_block_defs): Likewise.
(df_record_exit_block_uses, df_bb_verify): Likewise.
(df_swap_refs): Change ref_vec parameter to VEC. Change all
callers.
(df_sort_and_compress_refs): Change ref_vec parameter to VEC.
Remove count parameter. Change return type to void. Change all
callers.
(df_sort_and_compress_mws): Change mw_vec parameter to VEC.
Remove count parameter. Change return type to void. Change all
callers.
(df_install_refs): Change old_vec parameter to VEC. Remove count
parameter. Change all callers.
(df_install_mws): Change old_vec parameter to VEC. Remove count
parameter. Change all callers.
(df_refs_verify): Change new_rec parameter to VEC. Change call
callers.
(df_mws_verify): Likewise.
From-SVN: r148347
* gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Subtype>: Use
a reference to the original type for the type of the field of the
XVS type.
(maybe_pad_type): Likewise.
* gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>: Factor
common predicate and remove redundant setting of TYPE_BY_REFERENCE_P.
Pass correctly typed arguments to create_field_decl.
<E_Record_Subtype>: Set BLKmode for tagged and limited types in the
case of contrained discriminants as well. Use the padded base type
in the other case as well. Rename temporary variable. Tweak test.
Factor common access pattern. Set GNU_SIZE only once.
From-SVN: r148345
* system.h (HAVE_DESIGNATED_INITIALIZERS): Don't define if
compiling with C++.
* optabs.c (optab_table): Only use designated initializers if
HAVE_DESIGNATED_INITIALIZERS is defined.
(convert_optab_table): Likewise.
(init_optabs): Always call init_insn_codes if
HAVE_DESIGNATED_INITIALIZERS is not defined.
From-SVN: r148336
2009-06-09 Martin Jambor <mjambor@suse.cz>
PR tree-optimization/40351
* tree-sra.c (propagate_subacesses_accross_link): Check that a refrence
to a potential artifical subaccess can be constructed.
* testsuite/gcc.c-torture/compile/pr40351.c: New file.
From-SVN: r148315
ada/
* gcc-interface/utils2.c (build_call_alloc_dealloc_proc): New
helper for build_call_alloc_dealloc with arguments to be interpreted
identically. Process the case where a GNAT_PROC to call is provided.
(maybe_wrap_malloc): New helper for build_call_alloc_dealloc, to build
and return an allocator for DATA_SIZE bytes aimed at containing a
DATA_TYPE object, using the default __gnat_malloc allocator. Honor
DATA_TYPE alignments greater than what the latter offers.
(maybe_wrap_free): New helper for build_call_alloc_dealloc, to
release a DATA_TYPE object designated by DATA_PTR using the
__gnat_free entry point.
(build_call_alloc_dealloc): Expect object data type instead of naked
alignment constraint. Use the new helpers.
(build_allocator): Remove special processing for the super-aligned
case, now handled by build_call_alloc_dealloc. Pass data type instead
of the former alignment argument, as expected by the new interface.
* gcc-interface/gigi.h (build_call_alloc_dealloc): Adjust prototype
and comment.
* gcc-interface/trans.c (gnat_to_gnu) <case N_Free_Statement>:
Remove special processing for the super-aligned case, now handled
by build_call_alloc_dealloc. Pass data type instead of the former
alignment argument, as expected by the new interface.
testsuite/
* gnat.dg/align_max.adb: New test.
From-SVN: r148314
* dwarf2out.c (emit_cfa_remember): New variable.
(add_fde_cfi): If emit_cfa_remember, recurse to add
DW_CFA_remember_state first.
(dwarf2out_begin_epilogue): Don't add_fde_cfi DW_CFA_remember_state,
instead just set emit_cfa_remember.
From-SVN: r148298
PR debug/39834
* gcc.dg/torture/pr39834.c
PR middle-end/39834
* cgraphunit.c (save_inline_function_body): Do not copy transform hooks
for saved inline bodies.
* ipa-passes.c (do_per_function): Do not add the hoks multiple times
for given function.
From-SVN: r148292
2009-06-08 Paul Thomas <pault@gcc.gnu.org>
* trans-array.h : Replace prototypes for
gfc_conv_descriptor_offset, gfc_conv_descriptor_stride,
gfc_conv_descriptor_lbound, gfc_conv_descriptor_ubound with new
prototypes of the same names with _get or _set appended.
* trans-array.c : Make the originals of the above static and
new functions for the _get and _set functions. Update all the
references to these descriptor access functions.
* trans-expr.c : Update references to the above descriptor
access functions.
* trans-intrinsic.c : The same.
* trans-openmp.c : The same.
* trans-stmt.c : The same.
From-SVN: r148290
PR middle-end/40102
* cgraph.c (cgraph_create_edge_including_clones): Also asume that the
original node might've been modified.
* tree-inline.c (copy_bb): Do not assume that all clones are the same.
PR middle-end/40102
* g++.dg/torture/pr40102.C: New testcase.
From-SVN: r148287
PR c++/40373
* call.c (check_dtor_name): Return false even if
get_type_value (name) is error_mark_node.
* g++.dg/template/dtor7.C: New test.
From-SVN: r148282
* tree-object-size.c (addr_object_size): Add OSI argument.
Handle also INDIRECT_REF with SSA_NAME inside of it as base address.
(compute_builtin_object_size, expr_object_size): Adjust callers.
(plus_stmt_object_size): Call addr_object_size instead of
compute_builtin_object_size.
* gcc.dg/builtin-object-size-2.c (test1): Adjust expected results.
* gcc.dg/builtin-object-size-4.c (test1): Adjust expected results.
* gcc.dg/builtin-object-size-6.c: New test.
From-SVN: r148279
PR c++/40370
PR c++/40372
* parser.c (cp_parser_direct_declarator): Don't set TREE_SIDE_EFFECTS
on error_mark_node. Check for VLAs outside of function context
before check whether to wrap bounds into a NOP_EXPR with
TREE_SIDE_EFFECTS.
* g++.dg/template/error41.C: New test.
* g++.dg/template/error42.C: New test.
From-SVN: r148278
Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
* tree-ssa-loop-prefetch.c
(gather_memory_references): Introduced a counter for the number of
memory references.
(anything_to_prefetch_p): Introduced a counter for the number of
prefetches.
(is_loop_prefetching_profitable): New function with a cost model
for prefetching.
(loop_prefetch_arrays): Use the new cost model to determine if
prefetching is profitable.
* params.def (MIN_INSN_TO_PREFETCH_RATIO,
PREFETCH_MIN_INSN_TO_MEM_RATIO): New parameters.
* params.h (MIN_INSN_TO_PREFETCH_RATIO,
PREFETCH_MIN_INSN_TO_MEM_RATIO): New parameters.
* doc/invoke.texi (MIN_INSN_TO_PREFETCH_RATIO,
PREFETCH_MIN_INSN_TO_MEM_RATIO): New parameters.
Co-Authored-By: Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
From-SVN: r148277