2006-06-20 Paul Thomas <pault@gcc.gnu.org>
PR fortran/25049
PR fortran/25050
* check.c (non_init_transformational): New function.
(find_substring_ref): New function to signal use of disallowed
transformational intrinsic in an initialization expression.
(gfc_check_all_any): Call previous if initialization expr.
(gfc_check_count): The same.
(gfc_check_cshift): The same.
(gfc_check_dot_product): The same.
(gfc_check_eoshift): The same.
(gfc_check_minloc_maxloc): The same.
(gfc_check_minval_maxval): The same.
(gfc_check_gfc_check_product_sum): The same.
(gfc_check_pack): The same.
(gfc_check_spread): The same.
(gfc_check_transpose): The same.
(gfc_check_unpack): The same.
PR fortran/18769
*intrinsic.c (add_functions): Add gfc_simplify_transfer.
*intrinsic.h : Add prototype for gfc_simplify_transfer.
*simplify.c (gfc_simplify_transfer) : New function to act as
placeholder for eventual implementation. Emit error for now.
PR fortran/16206
* expr.c (find_array_element): Eliminate condition on length of
offset. Add bounds checking. Rearrange exit. Return try and
put gfc_constructor result as an argument.
(find_array_section): New function.
(find_substring_ref): New function.
(simplify_const_ref): Add calls to previous.
(simplify_parameter_variable): Return on NULL expr.
(gfc_simplify_expr): Only call gfc_expand_constructor for full
arrays.
PR fortran/20876
* match.c (gfc_match_forall): Add missing locus to gfc_code.
2006-06-20 Paul Thomas <pault@gcc.gnu.org>
PR libfortran/28005
* m4/matmul.m4: aystride = 1 does not uniquely detect the
presence of a temporary transpose; an array element in the
first dimension produces the same signature. Detect this
using the rank of a and add specific code.
* generated/matmul_r4.c: Regenerate.
* generated/matmul_r8.c: Regenerate.
* generated/matmul_r10.c: Regenerate.
* generated/matmul_r16.c: Regenerate.
* generated/matmul_c4.c: Regenerate.
* generated/matmul_c8.c: Regenerate.
* generated/matmul_c10.c: Regenerate.
* generated/matmul_c16.c: Regenerate.
* generated/matmul_i4.c: Regenerate.
* generated/matmul_i8.c: Regenerate.
* generated/matmul_i16.c: Regenerate.
2006-06-20 Paul Thomas <pault@gcc.gnu.org>
PR fortran/16206
* gfortran.dg/array_initializer_1.f90: New test.
PR fortran/28005
* gfortran.dg/matmul_3.f90: New test.
From-SVN: r114802
2006-06-19 Andrew Pinski <pinskia@gmail.com>
PR middle-end/28075
* tree-inline.c (setup_one_parameter): Strip useless
type conversion before adding it to the IR.
(declare_return_variable): Likewise.
2006-06-19 Andrew Pinski <pinskia@gmail.com>
PR middle-end/28075
* gcc.dg/tree-ssa/inline-1.c: New test.
From-SVN: r114801
2006-06-19 Anatoly Sokolov <aesok@post.ru>
* gcc.dg/pr18241-1.c: Use __SIZE_TYPE__ instead of unsigned long
in malloc prototype; remove XFAIL.
* gcc.dg/pr18241-2.c: Ditto.
* gcc.dg/20050321-1.c: Use __SIZE_TYPE__ instead of unsigned long
in memset prototype; remove XFAIL.
* gcc.dg/tree-ssa/pr23382.c: Ditto.
From-SVN: r114790
2006-06-19 Anatoly Sokolov <aesok@post.ru>
* gcc.dg/pr18241-1.c: Use __SIZE_TYPE__ instead of unsigned long
in malloc prototype; remove XFAIL.
* gcc.dg/pr18241-2.c: Ditto.
* gcc.dg/20050321-1.c: Use __SIZE_TYPE__ instead of unsigned long
in memset prototype; remove XFAIL.
* gcc.dg/tree-ssa/pr23382.c: Ditto.
From-SVN: r114789
2006-06-19 Richard Guenther <rguenther@suse.de>
* tree-ssa-pre.c (try_combine_conversion): Strip useless
type conversions after folding.
From-SVN: r114784
2006-06-19 Richard Guenther <rguenther@suse.de>
* ggc-page.c (extra_order_size_tab): Add entries with
size of struct function and basic_block.
(size_lookup): Extend to cover sizes up to 511.
(ggc_alloc_stat): Adjust user.
(ggc_pch_count_object): Likewise.
(ggc_pch_alloc_object): Likewise.
(ggc_pch_write_object): Likewise.
From-SVN: r114783
PR target/27861
* expmed.c (expand_shift): On SHIFT_COUNT_TRUNCATED targets, we may
have stripped a SUBREG from the shift count, so we may need to
convert_to_mode back to the type's mode before calling make_tree.
Use new_amount instead of amount to avoid expanding a tree twice.
* gcc.dg/pr27861-1.c: New test case.
From-SVN: r114773
2006-06-19 Richard Guenther <rguenther@suse.de>
PR middle-end/28045
* fold-const.c (operand_equal_p): Check if the argument types
have the same precision before stripping NOPs.
* gcc.dg/torture/pr28045.c: New testcase.
From-SVN: r114772
2006-06-19 Daniel Berlin <dberlin@dberlin.org>
Fix PR tree-optimization/27341
* tree-cfg.c (gimplify_val): Call mark_new_vars_to_rename on the
statement we get.
* tree-complex.c (pass_lower_complex): Update SMT usage.
From-SVN: r114771
2006-06-19 Andreas Krebbel <krebbel1@de.ibm.com>
* config/s390/s390.md ("doloop_si64", "doloop_si31", "doloop_di"):
Add a new alternative to the constraint strings. Add move of
operand 1 to 3 to the splitter definition.
("doloop_si_long"): Second contraint alternative removed.
From-SVN: r114767
PR fortran/26801
* trans-intrinsic.c (gfc_conv_associated): Use pre and post blocks
of the scalarization expression.
* gfortran.dg/associated_4.f90: New test.
From-SVN: r114757
2006-06-18 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR fortran/19310
* arith.c (gfc_range_check): Return ARITH_OK if -fno-range-check. Add
return of ARITH_NAN, ARITH_UNDERFLOW, and ARITH_OVERFLOW.
(gfc_arith_divide): If -fno-range-check allow mpfr to divide by zero.
* gfortran.h (gfc_option_t): Add new flag.
* invoke.texi: Document new flag.
* lang.opt: Add option -frange-check.
* options.c (gfc_init_options): Initialize new flag.
(gfc_handle_options): Set flag if invoked.
* simplify.c (range_check): Add error messages for
overflow, underflow, and other errors.
* trans-const.c (gfc_conv_mpfr_to_tree): Build NaN and Inf from mpfr
result.
From-SVN: r114752
* doc/cpp.texi, doc/cppinternals.texi, doc/gcc.texi,
doc/gccint.texi, doc/install.texi (@dircategory): Use
"Software development" instead of "Programming", following
the Free Software Directory.
From-SVN: r114746
2006-06-17 Ami Tavory <atavory@gmail.com>
Paolo Carlini <pcarlini@suse.de>
* testsuite/util/rng/twister_rand_gen.cc: Adapt to simply use
tr1::mt19937.
* testsuite/util/rng/twister_rand_gen.hpp: Likewise.
Co-Authored-By: Paolo Carlini <pcarlini@suse.de>
From-SVN: r114740
PR c++/28016
* decl.c (cp_finsh_decl): Do not emit uninstantiated static data
members.
PR c++/28016
* g++.dg/template/static26.C: New test.
From-SVN: r114739
PR c++/27884
* decl.c (have_extern_spec): Remove.
(start_decl): Do not check have_extern_spec.
(start_function): Likewise.
* cp-tree.h (have_extern_spec): Remove.
* parser.c (cp_parser_linkage_specification): Don't set
have_extern_spec.
(cp_parser_init_declarator): Likewise.
(cp_parser_parameter_declaration): Do not treat parameters as
within the scope of an unbraced linkage specification.
PR c++/27884
* g++.dg/parse/linkage2.C: New test
From-SVN: r114727
PR fortran/27965
* trans-array.c (gfc_conv_ss_startstride): Correct the runtime
conditions for bounds-checking. Check for nonzero stride.
Don't check the last dimension of assumed-size arrays. Fix the
dimension displayed in the error message.
From-SVN: r114724
2006-06-16 Richard Guenther <rguenther@suse.de>
PR middle-end/27116
* fold-const.c (negate_expr_p): Do not introduce undefined
overflow in negating INTEGER_CSTs.
(fold_negate_expr): Rename from negate_expr. Revert last
change for folding BIT_NOT_EXPR. Change semantics to
return NULL_TREE for non-simplified negations. Do not
strip type conversions and unify type handling.
(negate_expr): New function, wrap around fold_negate_expr
but ensure building a tree always. Strip type conversions
here, fold to result type.
(fold_unary): Use fold_negate_expr for folding NEGATE_EXPR.
* gcc.dg/pr15785-1.c: Revert last change.
* gcc.dg/torture/pr27116-2.c: New testcase.
From-SVN: r114723