PR tree-optimization/33757
* gcc.dg/tree-ssa/ssa-fre-4.c: Run on selected TARGET_PROMOTE_PROTOTYPES
true architectures instead of having a big dg-skip-if.
From-SVN: r129737
PR c++/33841
* class.c (check_bitfield_decl): Don't set field's type to error_mark_node
for non-integral type bitfields. Return true if bitfield is correct, false
error has been diagnosed.
(check_field_decls): If check_bitfield_decl returned false, call also
check_field_decl.
* g++.dg/other/bitfield3.C: New test.
From-SVN: r129736
2007-10-29 Richard Guenther <rguenther@suse.de>
* tree-flow-inline.h (get_subvar_at): Use binary search.
(get_first_overlapping_subvar): New function to binary search
for the first overlapping subvar.
* tree-ssa-operands.c (add_vars_for_offset): Strip down to
just handle adding subvars for a pointed-to subvar. Optimize
and use get_first_overlapping_subvar.
(add_vars_for_bitmap): Fold into single caller.
(add_virtual_operand): Streamline, inherit add_vars_for_bitmap
and non pointed-to bits of add_vars_for_offset.
From-SVN: r129727
2007-10-29 Paul Thomas <pault@gcc.gnu.org>
PR fortran/31217
PR fortran/33811
PR fortran/33686
* trans-array.c (gfc_conv_loop_setup): Send a complete type to
gfc_trans_create_temp_array if the temporary is character.
* trans-stmt.c (gfc_trans_assign_need_temp): Do likewise for
allocate_temp_for_forall_nest.
(forall_replace): New function.
(forall_replace_symtree): New function.
(forall_restore): New function.
(forall_restore_symtree): New function.
(forall_make_variable_temp): New function.
(check_forall_dependencies): New function.
(cleanup_forall_symtrees): New function.
gfc_trans_forall_1): Add and initialize pre and post blocks.
Call check_forall_dependencies to check for all dependencies
and either trigger second forall block to copy temporary or
copy lval, outside the forall construct and replace all
dependent references. After assignment clean-up and coalesce
the blocks at the end of the function.
* gfortran.h : Add prototypes for gfc_traverse_expr and
find_forall_index.
expr.c (gfc_traverse_expr): New function to traverse expression
and visit all subexpressions, under control of a logical flag,
a symbol and an integer pointer. The slave function is caller
defined and is only called on EXPR_VARIABLE.
(expr_set_symbols_referenced): Called by above to set symbols
referenced.
(gfc_expr_set_symbols_referenced): Rework of this function to
use two new functions above.
* resolve.c (find_forall_index): Rework with gfc_traverse_expr,
using forall_index.
(forall_index): New function used by previous.
* dependency.c (gfc_check_dependency): Use gfc_dep_resolver for
all references, not just REF_ARRAY.
(gfc_dep_resolver): Correct the logic for substrings so that
overlapping arrays are handled correctly.
2007-10-29 Paul Thomas <pault@gcc.gnu.org>
PR fortran/31217
PR fortran/33811
* gfortran.dg/forall_12.f90: New test.
PR fortran/33686
* gfortran.dg/forall_13.f90: New test.
From-SVN: r129720
Automatic parallelization reduction tests.
* testsuite/gcc.dg/tree-ssa/reduc-1.c: New test.
* testsuite/gcc.dg/tree-ssa/reduc-1char.c: New test.
* testsuite/gcc.dg/tree-ssa/reduc-1short.c: New test.
* testsuite/gcc.dg/tree-ssa/reduc-2.c: New test.
* testsuite/gcc.dg/tree-ssa/reduc-2char.c: New test.
* testsuite/gcc.dg/tree-ssa/reduc-2short.c: New test.
* testsuite/gcc.dg/tree-ssa/reduc-3.c: New test.
* testsuite/gcc.dg/tree-ssa/reduc-6.c: New test.
* testsuite/gcc.dg/tree-ssa/reduc-7.c: New test.
* testsuite/gcc.dg/tree-ssa/reduc-8.c: New test.
* testsuite/gcc.dg/tree-ssa/reduc-9.c: New test.
From-SVN: r129718
Zdenek Dvorak
OMP_ATOMIC Changes,
Reduction support for automatic parallelization.
* expr.c (expand_expr_real_1): Add cases for OMP_ATOMIC_LOAD,
OMP_ATOMIC_STORE.
* Makefile.in: Add dependencies to expr.o, tree-parloops.o, omp-low.o
* tree-pretty-print.c (dump_generic_node): Add OMP_ATOMIC_LOAD
and OMP_ATOMIC_STORE.
* tree.h (OMP_DIRECTIVE_P): Add OMP_ATOMIC_LOAD,
OMP_ATOMIC_STORE.
* gimple-low.c (lower_stmt): Same.
* gimplify.c (gimplify_expr): Same.
(gimplify_omp_atomic_fetch_op, gimplify_omp_atomic_pipeline,
gimplify_omp_atomic_mutex): Remove.
(gimplify_omp_atomic): Change it to simply gimplify the
statement instead of expanding it.
* omp-low.c: Add includes to optabs.h, cfgloop.h.
(expand_omp_atomic, expand_omp_atomic_pipeline,
goa_stabilize_expr, expand_omp_atomic_mutex,
expand_omp_atomic_fetch_op): New functions to implement
expansion of OMP_ATOMIC.
(expand_omp, build_omp_regions_1): Add support for
OMP_ATOMIC_LOAD/OMP_ATOMIC_STORE.
* tree-cfg.c (make_edges): add case for OMP_ATOMIC_LOAD,
OMP_ATOMIC_STORE.
* tree-gimple.c (is_gimple_stmt): Add OMP_ATOMIC_LOAD,
OMP_ATOMIC_STORE.
* tree-parloops.c: add include to tree-vectorizer.h.
(reduction_info): New structure for reduction.
(reduction_list): New list to represent list of reductions
per loop.
(struct data_arg): New helper structure for reduction.
(reduction_info_hash, reduction_info_eq, reduction_phi,
initialize_reductions,
create_call_for_reduction, create_phi_for_local_result,
create_call_for_reduction_1, create_loads_for_reductions,
create_final_loads_for_reduction): New functions.
(loop_parallel_p): Identify reductions, add reduction_list parameter.
(separate_decls_in_loop_name): Support reduction variables.
(separate_decls_in_loop): Add reduction_list and ld_st_data arguments,
call create_loads_for_reduction for each reduction.
(canonicalize_loop_ivs): Identify reductions, add reduction_list
parameter.
(transform_to_exit_first_loop): Add reduction support, add
reduction_list parameter.
(gen_parallel_loop): Add reduction_list parameter. Add call
separate_decls_in_loop with
the new argument. Traverse reductions and call
initialize_reductions, create_call_for_reduction.
(parallelize_loops): Create and delete the reduction list.
(add_field_for_name): Change use of data parameter. Add fields for
reductions.
* tree-vectorizer.h (vect_analyze_loop_form): Add declaration.
* tree-vect-analyze.c (vect_analyze_loop_form): export it.
* tree.def: Add definitions for OMP_ATOMIC_LOAD,
OMP_ATOMIC_STORE.
* tree-inline.c (estimate_num_insns_1): add cases for
OMP_ATOMIC_LOAD, OMP_ATOMIC_STORE.
* tree-cfg.c (make_edges): Add OMP_ATOMIC_LOAD,
OMP_ATOMIC_STORE.
* tree-ssa-operands.c (get_addr_dereference_operands):
New function. Subroutine of get_indirect_ref_operands.
(get_indirect_ref_operands): Call get_addr_dereference_operands.
(get_expr_operands): Support OMP_ATOMIC_LOAD, OMP_ATOMIC_STORE.
From-SVN: r129716
* config/cris/cris.c: Include df.h.
(cris_address_cost): Add gcc_assert for canonicalization
assumptions. For PLUS with MULT or register, correct
test for register in other arm. Tweak comments.
From-SVN: r129713
cp/
2007-10-28 Paolo Carlini <pcarlini@suse.de>
Mark Mitchell <mark@codesourcery.com>
PR c++/30659
* pt.c (do_decl_instantiation): If the VAR_DECL is not a
class member error out and return.
testsuite/
2007-10-28 Paolo Carlini <pcarlini@suse.de>
Mark Mitchell <mark@codesourcery.com>
PR c++/30659
* g++.dg/template/crash71.C: New.
Co-Authored-By: Mark Mitchell <mark@codesourcery.com>
From-SVN: r129710
2007-10-28 Richard Guenther <rguenther@suse.de>
* tree-ssa-operands.c (add_vars_for_offset): Add parameter
telling if the var is to be treated as points-to location.
(add_vars_for_bitmap): Pass true to add_vars_for_offset.
(add_virtual_operand): Only recurse into MPTs if aliases
is from a NMT.
From-SVN: r129704
2007-10-28 Richard Guenther <rguenther@suse.de>
* tree-ssa-operands.c (add_vars_for_offset): Clean and speed up.
(add_vars_for_bitmap): Do not recurse further. Only add vars
for pointed-to SFTs.
(add_virtual_operand): Re-instantiate loop to add operands for
aliases. Recurse into MPTs.
(get_indirect_ref_operands): If we fall back to use a pointers
SMT, make sure to not prune based on the access offset and size.
From-SVN: r129702
2007-10-28 Andrew Pinski <pinskia@gmail.com>
PR tree-opt/33589
* tree-outof-ssa.c (rewrite_trees): If the statement changed, cleanup
the eh information on the statement.
2007-10-28 Andrew Pinski <pinskia@gmail.com>
PR tree-opt/33589
* g++.dg/torture/pr33589-1.C: New testcase.
* g++.dg/torture/pr33589-2.C: New testcase.
From-SVN: r129700
PR tree-optimization/33920
* tree-if-conv.c (tree_if_conversion): Force predicate of single
successor bb to true when predecessor bb has NULL predicate.
(find_phi_replacement_condition): Assert that tmp_cond is non-null.
testsuite/ChangeLog:
PR tree-optimization/33920
* gcc.dg/tree-ssa/pr33290.c: New test.
From-SVN: r129696
2007-10-28 Andreas Krebbel <krebbel1@de.ibm.com>
* dce.c (delete_unmarked_insns): Just delete the RETVAL and
LIBCALL notes if they are about to be moved to the same insn.
From-SVN: r129693
2007-10-27 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR fortran/31306
* decl.c (char_len_param_value): Add check for conflicting attributes of
function argument.
From-SVN: r129685
* g++.dg/other/i386-2.C: Include bmmintrin.h. Add -msse5 to dg-options.
* gcc.target/i386/sse-13.c: Also include mm3dnow.h. Add
"-march=k8 -m3dnow" to check 3dnow and 3dnowA intrinsics.
* gcc.target/i386/sse-14.c: Ditto.
From-SVN: r129684
2007-10-27 Tobias Burnus <burnus@net-b.de>
PR fortran/33862
* lang-specs.h: Support .ftn and .FTN extension, use CPP for .FOR.
* options.c (form_from_filename): Support .ftn extension.
* gfortran.texi: Document support of .for and .ftn file extension.
From-SVN: r129680
2007-10-27 Richard Guenther <rguenther@suse.de>
PR tree-optimization/33870
* tree-ssa-operands.c (add_vars_for_offset): Reduce code
duplication. Remove redundant call to access_can_touch_variable.
(add_vars_for_bitmap): New helper for recursing over MPT contents.
(add_virtual_operand): Use it.
* gcc.dg/tree-ssa/alias-15.c: New testcase.
* gcc.c-torture/execute/pr33870.c: Likewise.
From-SVN: r129675
* doc/invoke.texi (Option Summary, optimizations): Remove
-fbounds-check. Add -fassociative-math, -freciprocal-math,
-ftree-vrp and -funit-at-a-time. Change -fno-split-wide-types to
-fsplit-wide-types to match later entry. Break up a long line.
(Option Summary, code gen options) Add -fno-stack-limit. Add
missing @gol to the end of a line.
(Optimization Options): Remove -fbounds-check, which is also
documented under Code Generation Options. Remove =n from
index entry for -ftree-parallelize-loops. Change -fno-cprop-registers
to -fcprop-registers to match other options, and say when it is
enabled rather than disabled. Remove extra index entry for
-fno-cx-limited-range. Add index entries for -fstack-protector
and -fstack-protector-all.
(Code Gen Options): Add index entry for -ftls-model.
From-SVN: r129664