2007-11-16 Richard Guenther <rguenther@suse.de>
PR tree-optimization/34113
* tree-ssa-forwprop.c (tree_ssa_forward_propagate_single_use_vars):
Use correct conversion direction for checking type compatibility.
* gcc.c-torture/compile/pr34113.c: New testcase.
From-SVN: r130223
2007-11-16 Richard Guenther <rguenther@suse.de>
PR tree-optimization/34099
* tree-ssa-ccp.c (likely_value): Use a whitelist for operators
that produce UNDEFINED result if at least one of its operands
is UNDEFINED. By default the result is only UNDEFINED if all
operands are UNDEFINED.
* g++.dg/torture/pr3499.C: New testcase.
* gcc.c-torture/execute/pr34099.c: Likewise.
From-SVN: r130222
2007-11-16 Olivier Hainque <hainque@adacore.com>
ada/
* utils2.c (build_call_alloc_dealloc) <if gnu_obj>: Move the code
retrieving an allocator return value from a super-aligned address from
here to ...
* trans.c (gnat_to_gnu) <case N_Free_Statement>: ... here, and don't
expect a super-aligned address for a fat or thin pointer.
testsuite/
* gnat.dg/release_unc_maxalign.adb: New test.
From-SVN: r130221
PR c++/34100
* pt.c (apply_late_template_attributes): Do nothing if decl's type is
error_mark_node.
* g++.dg/template/crash73.C: New test.
From-SVN: r130220
2007-11-15 Paolo Carlini <pcarlini@suse.de>
PR libstdc++/34105
* include/bits/stl_algobase.h: Do not include <bits/algorithmfwd.h>.
(lexicographical_compare(const unsigned char*, const unsigned char*,
const unsigned char*, const unsigned char*),
lexicographical_compare(const char*, const char*, const char*,
const char*)): Move to namespace (std, _GLIBCXX_STD_P).
* include/parallel/algobase.h: Do not include <bits/algorithmfwd.h>.
(equal): Move after mismatch.
* include/bits/stl_heap.h (is_heap, is_heap_until): Reorder.
* include/bits/char_traits.h: Include <bits/stl_algobase.h> instead
of <bits/algorithmfwd.h>.
* include/bits/stl_algo.h: Include first <bits/algorithmfwd.h>.
* include/bits/algorithmfwd.h (lexicographical_compare): Do not
declare overloads.
* include/parallel/partition.h: Include <parallel/random_number.h>.
* testsuite/util/testsuite_abi.cc: Include <algorithm>.
From-SVN: r130207
PR middle-end/23848
* tree-ssa-ccp.c (optimize_stack_restore): New function.
(execute_fold_all_builtins): Call optimize_stack_restore for
BUILT_IN_STACK_RESTORE.
* gcc.dg/tree-ssa/pr23848-1.c: New test.
* gcc.dg/tree-ssa/pr23848-2.c: New test.
* gcc.dg/tree-ssa/pr23848-3.c: New test.
* gcc.dg/tree-ssa/pr23848-4.c: New test.
From-SVN: r130206
2007-11-15 Paolo Bonzini <bonzini@gnu.org>
* fwprop.c (try_fwprop_subst): Skip profitability check for forward
propagation into an address; that's done in should_replace_address.
From-SVN: r130201
2007-11-15 Richard Guenther <rguenther@suse.de>
* tree-ssa-alias.c (create_overlap_variables_for): Make sure
to only create SFTs if we also create variable infos for PTA.
* tree-ssa-structalias.c (set_uids_in_ptset): Add all overlapping
SFTs.
From-SVN: r130197
2007-11-15 Richard Guenther <rguenther@suse.de>
* tree-ssa-structalias.c (set_uids_in_ptset): Use the pointed-to
type for TBAA pruning.
(find_what_p_points_to): Call set_uids_in_ptset with the original
pointer, not the decl of the solution we collapsed to.
From-SVN: r130195
PR middle-end/34088
* tree-ssa.c (delete_tree_ssa): Don't call fini_ssa_operands if
init_ssa_operands has not been called for cfun.
* gcc.dg/pr34088.c: New test.
From-SVN: r130187
PR tree-optimization/34046
* cfg.c (update_bb_profile_for_threading): Avoid the division for the
scaling if the old probability is greater than the new base.
From-SVN: r130185
* trans.c (call_to_gnu): Always set the source location on the call
expression. If the function returns-by-target, also set it on the
address expression.
From-SVN: r130184
2007-11-14 Johannes Singler <singler@ira.uka.de>
* include/parallel/multiway_merge.h: More robust finding of an
arbitrary existing element inside the input sequences.
* include/bits/stl_algo.h: Fix typo to actually call appropriate
sequential version.
From-SVN: r130183
2007-11-14 Sebastian Pop <sebastian.pop@amd.com>
* tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Remove
unused edges after loop duplication.
From-SVN: r130182
2007-11-13 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR fortran/31608
*gfortran.dg/char_cast_1.f90: Modify regex in scan-tree-dump-times
to match known variations in symbol format. Document in comments.
From-SVN: r130173
2007-11-13 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR fortran/33162
*gfortran.dg/proc_decl_1.f90: Update.
*gfortran.dg/proc_decl_7.f90: New test.
*gfortran.dg/proc_decl_8.f90: New test.
*gfortran.dg/proc_decl_9.f90: New test.
*gfortran.dg/proc_decl_10.f90: New test.
From-SVN: r130169
2007-11-11 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR fortran/33162
* decl.c (match_procedure_decl): Remove TODO and allow intrinsics in
PROCEDURE declarations. Set attr.untyped to allow the interface to be
resolved later where the symbol type will be set.
* interface.c (compare_intr_interfaces): Remove static from pointer
declarations. Add type and kind checks for dummy function arguments.
(compare_actual_formal_intr): New function to compare an actual
argument with an intrinsic function. (gfc_procedures_use): Add check for
interface that points to an intrinsic function, use the new function.
* resolve.c (resolve_specific_f0): Resolve the intrinsic interface.
(resolve_specific_s0): Ditto.
From-SVN: r130168
2007-11-13 Sebastian Pop <sebastian.pop@amd.com>
* tree-chrec.h (build_polynomial_chrec): RHS of a chrec
should not be of pointer type.
From-SVN: r130167
2007-11-13 Paul Thomas <pault@gcc.gnu.org>
PR fortran/34080
* iresolve.c (gfc_resolve_transfer): Do not try to convert
to a constant MOLD expression, if it is an assumed size
dummy.
2007-11-13 Paul Thomas <pault@gcc.gnu.org>
PR fortran/34080
* gfortran.dg/transfer_assumed_size_1.f90: New test.
From-SVN: r130158
gcc/ada/
* sem_prag.adb (Process_Convention): Move the test for the
entity on which the Convention pragma applies down to also
forbid pragma Convention on enumeration literals reached
through renamings.
From-SVN: r130155
PR c++/34054
PR c++/34056
PR c++/34057
PR c++/34058
PR c++/34060
* pt.c (find_parameter_packs_r): If ppd->set_packs_to_error,
set to error_mark_node the outermost POINTER_TYPE to the pack if
it is seen in a POINTER_TYPE.
(push_template_decl_real): If check_for_bare_parameter_packs
fails for function return type, set the return type to
integer_type_node. If check_for_bare_parameter_packs failed
for non-function, return error_mark_node.
* g++.dg/parse/crash36.C: Add another dg-error.
* g++.dg/cpp0x/pr34054.C: New test.
* g++.dg/cpp0x/pr34056.C: New test.
* g++.dg/cpp0x/pr34057.C: New test.
* g++.dg/cpp0x/pr34058.C: New test.
* g++.dg/cpp0x/pr34060.C: New test.
From-SVN: r130152
PR tree-optimization/34063
* tree-chrec.c (chrec_evaluate): Put CHREC_LEFT based argument
as first chrec_fold_plus operand rather than second.
* g++.dg/tree-ssa/pr34063.C: New test.
From-SVN: r130151
pr 33870
* tree.h (strcut tree_memory_tag): add field unpartitionable.
remove field in_nested_struct.
(struct tree_struct_field_tag): add field nesting_level.
(sft_in_nested_struct): remove.
(sft_nesting_level): define.
(sft_unpartitionable_p): define.
* tree-ssa-alias.c (mem_sym_score): if mp->var is not
partitionable, return long_max.
(compute_memory_partitions): do not partition sfts marked
unpartitionable.
(create_sft): add argument nesting_level. set
sft_nesting_level with it. update all users.
(create_overlap_variables_for): show nesting level.
* tree-dfa.c (dump_subvars_for): likewise.
(dump_variable): likewise.
show whether the sft is partitionable or not.
* tree-flow.h (struct fieldoff): remove field
in_nested_struct.
add field nesting_level.
* tree-ssa-structalias.c (struct variable_info): remove
field in_nested_struct.
(push_fields_onto_fieldstack): add argument
nesting_level. update all users.
update documentation.
update pair->nesting_level with nesting_level.
make recursive calls with nesting_level + 1.
(set_uids_in_ptset): if an sft is added to the points-to
set, mark it as unpartitionable.
* tree-ssa-operands.c (ref_nesting_level): new.
(add_vars_for_offset): call it.
add argument full_ref. update
callers.
if var is inside a nested structure and the nesting level
of full_ref is lower than the nesting level of var,
adjust offset by the offset of var.
testsuite/ChangeLog
PR 33870
* gcc.c-torture/execute/pr33870-1.c: New test.
* gcc.dg/tree-ssa/alias-16.c: New test.
From-SVN: r130141