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
PR middle-end/27802
* reg-stack.c (subst_stack_regs): Handle noreturn function calls
that (would) return their results in stack registers.
* gcc.dg/pr27802-1.c: New test case.
From-SVN: r114721
2006-06-16 Andrew Haley <aph@redhat.com>
* class.c (make_class_data): When using flag_indirect_classes,
don't initialize the vtable of Class instances.
2006-06-16 Andrew Haley <aph@redhat.com>
* java/lang/natClassLoader.cc (_Jv_NewClassFromInitializer): Don't
copy the whole Class instance from the initializer: instead, copy
everything but the first word (the vtable pointer).
Change prototype to (const char* class_initializer).
(_Jv_RegisterNewClasses): Change prototype to (const char**).
* java/lang/Class.h (_Jv_RegisterNewClasses): Change prototype to
(const char**).
From-SVN: r114714
2006-06-16 Michael Matz <matz@suse.de>
Richard Guenther <rguenther@suse.de>
* fold-const.c (fold_truthop): Only return new tree node if
we canonicalized something.
Co-Authored-By: Richard Guenther <rguenther@suse.de>
From-SVN: r114713
2006-06-16 Richard Guenther <rguenther@suse.de>
* function.h (enum function_frequency): Move declaration
out of struct function.
(struct function): Move bool fields and the enum to the bitfield
section. Reorder elements to avoid padding. Remove unused
fields left over from the RTL inliner removal.
* function.c (free_after_compilation): Do not zero removed fields.
* Makefile.in (ipa-reference.o): Add $(FUNCTION_H) dependency.
(ipa-type-escape.o): Likewise.
From-SVN: r114712
2006-06-15 Benjamin Kosnik <bkoz@redhat.com>
* include/ext/pb_ds/detail/type_utils.hpp (numeric_traits): Add,
const expression interface to std::numeric_limits::min and max
functions.
* include/ext/pb_ds/trie_policy.hpp (string_trie_e_access_traits):
Use it.
* include/ext/pb_ds/detail/resize_policy/
hash_load_check_resize_trigger_imp.hpp: Format.
* include/ext/pb_ds/detail/pat_trie_/internal_node.hpp: Same.
From-SVN: r114706
PR c++/27640
* pt.c (instantiate_template): Set processing_template_decl to
zero while performing substitutions.
PR c++/27640
* g++.dg/template/ctor7.C: New test.
From-SVN: r114701
2006-06-15 Paolo Carlini <pcarlini@suse.de>
* include/tr1/random.tcc (mersenne_twister<>::operator()()):
Reload the last position of the _M_x vector too.
From-SVN: r114695
2006-06-15 Richard Guenther <rguenther@suse.de>
* fold-const.c (fold_truth_not_expr): Rename from
invert_truthvalue. Give it fold_* semantics to avoid
generating garbage.
(invert_truthvalue): New function. Wrapper around
fold_truth_not_expr.
(optimize_minmax_comparison): Avoid creating garbage.
(fold_unary): Use fold_truth_not_expr for folding
TRUTH_NOT_EXPR.
(fold_ternary): Replace uses of invert_truthvalue with
fold_truth_not_expr where applicable.
* tree.h (fold_truth_not_expr): Prototype.
From-SVN: r114683
2006-06-15 Thomas Fitzsimmons <fitzsim@redhat.com>
* classpath/Makefile.am: Do not recurse into tools directory.
* classpath/Makefile.in: Regenerate.
From-SVN: r114682
2006-06-16 Richard Guenther <rguenther@suse.de>
PR tree-optimization/27781
* Makefile.in (ipa-pure-const.o): Add $(TARGET_H) dependency.
* ipa-pure-const.c (target.h): Include.
(analyze_function): Do not analyze functions that do not
bind locally.
* gcc.dg/tree-ssa/pr27781.c: New testcase.
From-SVN: r114681
* gcc.dg/cpp/_Pragma6.c: Fix comment.
Test is not supported on sh*-unknown-elf nor sh*-superh-elf.
* g++.dg/cpp/_Pragma1.C: Likewise.
From-SVN: r114680
2006-06-15 Thomas Koenig <Thomas.Koenig@online.de>
* trans-array.h (gfc_trans_create_temp_array): Add bool
argument.
* trans-arrray.c (gfc_trans_create_temp_array): Add extra
argument "function" to show if we are translating a function.
If we are translating a function, perform checks whether
the size along any argument is negative. In that case,
allocate size 0.
(gfc_trans_allocate_storage): Add function argument (as
false) to gfc_trans_create_temp_array call.
* trans-expr.c (gfc_conv_function_call): Add function
argument (as true) to gfc_trans_create_temp_array call.
* trans-stmt.c (gfc_conv_elemental_dependencies): Add
function argument (as false) to gfc_trans_create_temp_array
call.
* trans-intrinsic.c: Likewise.
2006-06-15 Thomas Koenig <Thomas.Koenig@online.de>
* gfortran.dg/allocate_zerosize_2.f90: New test case.
From-SVN: r114677
2006-06-15 Richard Guenther <rguenther@suse.de>
* tree-ssa-structalias.c (alias_get_name): Avoid creating
extra unused identifiers if not dumping.
(create_variable_info_for): Likewise.
From-SVN: r114675
* tree-ssa-loop-niter.c (implies_nonnegative_p): New function.
(derive_constant_upper_bound): Derive more precise upper bound in
common cases. Return type changed to double_int.
(record_estimate): Reflect the changed return type of
derive_constant_upper_bound.
* double-int.c (double_int_zext, double_int_sext): Fix.
* gcc.dg/tree-ssa/loop-18.c: New test.
From-SVN: r114674
2006-06-15 Paolo Bonzini <bonzini@gnu.org>
* Makefile.tpl (POSTSTAGE1_HOST_EXPORTS): Export CFLAGS and LDFLAGS
too.
* Makefile.in: Regenerate.
gcc:
2006-06-15 Paolo Bonzini <bonzini@gnu.org>
* configure.ac (CFLAGS): Get them from the toplevel or from the
configure invocation.
* configure: Regenerate.
* Makefile.in (CFLAGS): Substitute value provided by configure.
From-SVN: r114673
PR c++/26559
* pt.c (tsubst_expr): Use finish_omp_atomic.
(value_dependent_expression_p): All CALL_EXPRs are dependent.
* semantics.c (finish_omp_atomic): Rework to use standard
paradigms for handling non-dependent expressions.
From-SVN: r114671
PR c++/27665
* parser.c (cp_parser_unqualified_id): Use constructor_name_p to
identify destructors.
(cp_parser_nested_name_specifier_opt): Remove invalid
optimization.
(cp_parser_template_id): Refine heuristic for determining whether
we are entering a scope.
PR c++/27665
* g++.dg/template/crash52.C: New test.
From-SVN: r114669