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
PR debug/40012
* cfgexpand.c (set_rtl): Store place also in DECL_RTL, if all
partitions use the same.
(expand_one_var): Deal with DECL_RTL sometimes begin set also
for basevars of SSA_NAMEs.
(expand_used_vars): Reset TREE_USED for basevars of SSA_NAMEs,
to not expand them twice.
(gimple_expand_cfg): Clear DECL_RTL for those decls that have
multiple places.
From-SVN: r148273
2009-06-07 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
* tree-cfg.c (gimple_merge_blocks): Commentary typo fix.
(verify_stmts): Print statement who's gimple_bb is set to a wrong BB
From-SVN: r148258
2009-06-07 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
* basic-block.h (ENTRY_BLOCK, EXIT_BLOCK): Document that neither of
them is supposed to hold actual statements.
From-SVN: r148256
2009-06-07 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libfortran/40008
* libgfortran.h: Define IOPARM_OPEN_HAS_NEWUNIT.
* io/open.c (st_open): Don't error on negative unit number if NEWUNIT
was specified. If NEWUNIT is specified, call new function to get the
unique unit number and assign it.
* io/io.h (st_parameter_open): Add pointer to newunit. Add prototype for
next_available_newunit. Add prototype for new function,
get_unique_unit_number.
* io/unit.c: Declare next_available_newunit. Define the first newunit
number. (init_units): Initialize next_available_unit.
(get_unique_unit_number): New function. Fix whitespace and comments.
* io/transfer.c (data_transfer_init): Update error message to not be
specific to OPEN statements.
From-SVN: r148253
2009-05-31 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR fortran/40008
* gfortran.h (gfc_open): Add newunit expression to structure.
* io.c (io_tag): Add new unit tag and fix whitespace.
(match_open_element): Add matching for newunit.
(gfc_free_open): Free the newunit expression.
(gfc_resolve_open): Add newunit to resolution and check constraints.
(gfc_resolve_close): Add check for non-negative unit.
(gfc_resolve_filepos): Likewise.
(gfc_resolve_dt): Likewise.
* trans-io.c (set_parameter_value): Build runtime checks for unit
numbers within range of kind=4 integer. (gfc_trans_open) Set the
newunit parameter.
* ioparm.def (IOPARM): Define the newunit parameter as a pointer
to GFC_INTEGER_4, pint4.
From-SVN: r148252
2009-06-07 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libfortran/40334
* io/list_read.c (list_formatted_read_scalar): Set the end file
conditions after a return from EOF error.
From-SVN: r148251