2006-06-09 Paolo Carlini <pcarlini@suse.de>
* acinclude.m4 ([GLIBCXX_CHECK_RANDOM_TR1]): New, check for
the availability of "/dev/random" and "/dev/urandom".
* configure.ac: Use it.
* include/tr1/random (random_device): Implement, a fall-back for
systems not providing "/dev/random" and "/dev/urandom" included.
* testsuite/tr1/5_numerical_facilities/random/random_device/
cons/default.cc: New.
* testsuite/tr1/5_numerical_facilities/random/random_device/
cons/token.cc: Likewise.
* testsuite/tr1/5_numerical_facilities/random/random_device/
requirements/typedefs.cc: Likewise.
* config.h.in: Regenerate.
* configure: Likewise.
* testsuite/tr1/5_numerical_facilities/random/mersenne_twister/
cons/gen1.cc: Minor tweak, add bool test.
From-SVN: r114529
2006-06-10 Paul Thomas <pault@gcc.gnu.org>
PR fortran/24558
PR fortran/20877
PR fortran/25047
* decl.c (get_proc_name): Add new argument to flag that a
module function entry is being treated. If true, correct
error condition, add symtree to module namespace and add
a module procedure.
(gfc_match_function_decl, gfc_match_entry,
gfc_match_subroutine): Use the new argument in calls to
get_proc_name.
* resolve.c (resolve_entries): ENTRY symbol reference to
to master entry namespace if a module function.
* trans-decl.c (gfc_create_module_variable): Return if
the symbol is an entry.
* trans-exp.c (gfc_conv_variable): Check that parent_decl
is not NULL.
2006-06-10 Paul Thomas <pault@gcc.gnu.org>
PR fortran/24558
* gfortran.dg/entry_6.f90: New test.
PR fortran/20877
PR fortran/25047
* gfortran.dg/entry_7.f90: New test.
From-SVN: r114526
PR libgcj/27730:
* java/lang/Thread.java (threadId): New field.
(nextThreadId): New static field.
(Thread): Initialize new field.
(getId): New method.
From-SVN: r114524
PR preprocessor/27746
* directives.c (do_pragma): Handle pragma with valid namespace
and invalid name coming from macro expansion.
* directives.c (destringize_and_run): Initialize next field in
context.
PR c/27747
PR c++/27748
* directives.c (destringize_and_run): Set NO_EXPAND on the
tokens.
* macro.c (_cpp_backup_tokens): Fix comment typo.
testsuite/
PR c/27747
* gcc.dg/cpp/_Pragma6.c: New test.
PR c++/27748
* g++.dg/cpp/_Pragma1.C: New test.
PR preprocessor/27746
* gcc.dg/gomp/macro-3.c: New test.
* gcc.dg/gomp/macro-4.c: New test.
* g++.dg/gomp/macro-3.C: New test.
* g++.dg/gomp/macro-4.C: New test.
From-SVN: r114519
PR classpath/23863:
* native/fdlibm/dtoa.c (_dtoa): Free contents of _Jv_reent when
finished.
* native/fdlibm/mprec.c: New version from newlib. Commented out
some includes. Added <assert.h>.
(_reent, _Bigint): New defines.
(_REENT_CHECK_MP, _REENT_MP_FREELIST, _REENT_MP_P5S): Likewise.
(__ULong, __Long): New types.
(_calloc_r): New function.
(Balloc): Dynamically add new _freelist entries as needed.
* native/fdlibm/mprec.h (struct _Jv_Bigint): Don't use
MAX_BIGNUMS to size _x[].
(struct _Jv_reent): _freelist now a _Jv_Bigint**. Removed
_allocation_map, num. Added _max_k.
From-SVN: r114511
2006-06-09 Richard Guenther <rguenther@suse.de>
PR tree-optimization/26998
* tree-vrp.c (extract_range_from_unary_expr): For NEGATE_EXPR
of signed types, only TYPE_MIN_VALUE is special, but for both,
minimum and maximum value. Likewise VR_ANTI_RANGE is special
in this case, as is -fwrapv.
* gcc.dg/torture/pr26998.c: New testcase.
* gcc.dg/tree-ssa/vrp29.c: New testcase.
From-SVN: r114507
PR target/26427
* config/darwin.c (darwin_asm_output_anchor): Disable
-fsection-anchors on darwin for now.
* config/darwin.h (TARGET_ASM_OUTPUT_ANCHOR): Likewise.
* rs6000/rs6000.c (optimization_options): Likewise.
testsuite:
* gcc.dg/pr26427.c: Test to ensure that -fsection-anchors doesn't
produce bad code on darwin.
From-SVN: r114498
PR fortran/27958
* trans-expr.c (gfc_conv_substring): If the substring start is
greater than its end, the length of the substring is zero, and
not negative.
(gfc_trans_string_copy): Don't generate a call to
_gfortran_copy_string when destination length is zero.
* gcc/testsuite/gfortran.dg/substr_2.f: New test.
From-SVN: r114496
2006-06-08 Steven G. Kargl <kargls@comcat.net>
* intrinsic.c (add_subroutine): Make make_noreturn() conditional on
the appropriate symbol name.
From-SVN: r114490
2006-06-08 Paolo Bonzini <bonzini@gnu.org>
PR middle-end/27733
* expmed.c (struct alg_hash_entry): Fix type of field T
to match synth_mult argument.
(NUM_ALG_HASH_ENTRIES): Make it bigger for 64-bit HOST_WIDE_INT.
From-SVN: r114488
2006-06-08 Andrew Haley <aph@redhat.com>
* expr.c (build_field_ref): Pass NULL_TREE as SPECIAL arg to
get_symbol_table_index().
(maybe_rewrite_invocation): Set SPECIAL if we need to access a
private method.
(build_known_method_ref): New arg: special. Pass it to
get_symbol_table_index.
(get_symbol_table_index): Put SPECIAL in the TREE_PURPOSE field of
the method list.
(build_invokevirtual): New arg: special. Pass it to
get_symbol_table_index.
(expand_invoke): New variable: special.
Pass it to maybe_rewrite_invocation().
Pass it to build_known_method_ref().
* class.c (build_symbol_entry): Add new arg: special. Use it to
build the symbol table conbstructor.
(emit_symbol_table): Extract SPECIAL from the method list and pass
it to build_symbol_entry().
* parse.y (patch_invoke): Call maybe_rewrite_invocation() and set
special accordingly.
From-SVN: r114487
2006-06-07 Andrew Haley <aph@redhat.com>
* include/jvm.h (_Jv_Linker::maybe_adjust_signature): New.
(_Jv_Linker::uaddr): New.
* link.cc (resolve_pool_entry): Call search_method_in_superclasses
instead of an open-coded loop around search_method_in_class.
(search_method_in_class): Add a new arg, check_perms.
(search_method_in_superclasses): New.
(link_symbol_table): Call maybe_adjust_signature() to extract the
least significnt bit of the signature pointer. Do this three
times, for instace method calls, static methods, and interfaces.
Call search_method_in_superclasses() instead of
_Jv_LookupDeclaredMethod.
(typedef uaddr): Delete.
From-SVN: r114486
2006-06-08 Richard Guenther <rguenther@suse.de>
PR middle-end/27116
* fold-const.c (negate_expr_p): We can negate BIT_NOT_EXPR
only, if overflow is defined and not trapping.
(negate_expr): Likewise.
* gcc.dg/torture/pr27116.c: New testcase.
* gcc.dg/pr15785-1.c: Remove test for invalid transformation.
From-SVN: r114483
PR tree-optimization/27872
* tree-ssa-loop-manip.c (tree_unroll_loop): Set EDGE_IRREDUCIBLE_LOOP
flag on the new exit edge of the unrolled loop.
From-SVN: r114482
2006-06-07 Andrew MacLeod <amacleod@redhat.com>
PR middle-end/27793
* tree-dfa.c (referenced_vars_dup_list): New. List of duplicate
referenced_variables with matching DECL_UID's.
(find_referenced_vars): Make sure duplicate list is empty to start.
(referenced_var_p): Remove.
(referenced_var_check_and_insert): Renamed from referenced_var_insert.
Check if var is in the list, and add if needed. Update the duplicate
list if a different var is in the list with the same DECL_UID.
(add_referenced_var): Call routine to check and insert.
* tree-ssa.c (delete_tree_ssa): Clear var_ann's on duplicates.
* tree-flow.h (referenced_vars_dup_list): External declaration.
From-SVN: r114480
2006-06-07 Paolo Bonzini <bonzini@gnu.org>
PR target/27390
* reg-stack.c (subst_stack_regs_pat): Reorder resetting of
the imaginary and real parts of a clobbered register.
Emit insn to set the imaginary part.
From-SVN: r114462
2006-06-07 Paul Thomas <pault@gcc.gnu.org>
PR fortran/23091
* resolve.c (resolve_fl_variable): Error if an automatic
object has the SAVE attribute.
PR fortran/24168
* expr.c (simplify_intrinsic_op): Transfer the rank and
the locus to the simplified expression.
PR fortran/25090
PR fortran/25058
* gfortran.h : Add int entry_id to gfc_symbol.
* resolve.c : Add static variables current_entry_id and
specification_expr.
(resolve_variable): During code resolution, check if a
reference to a dummy variable in an executable expression
is preceded by its appearance as a parameter in an entry.
Likewise check its specification expressions.
(resolve_code): Update current_entry_id on EXEC_ENTRY.
(resolve_charlen, resolve_fl_variable): Set and reset
specifiaction_expr.
(is_non_constant_shape_array): Do not return on detection
of a variable but continue to resolve all the expressions.
(resolve_codes): set current_entry_id to an out of range
value.
2006-06-07 Paul Thomas <pault@gcc.gnu.org>
PR fortran/23091
* gfortran.dg/saved_automatic_1.f90: New test.
PR fortran/24168
* gfortran.dg/array_simplify_1.f90: New test.
PR fortran/25090
* gfortran.dg/entry_dummy_ref_1.f90: New test.
PR fortran/25058
* gfortran.dg/entry_dummy_ref_2.f90: New test.
From-SVN: r114461
PR c++/27177
* call.c (standard_conversion): Require that the derived type be
complete when performing a derived-to-base conversion.
PR c++/27177
* g++.dg/expr/cast7.C: New test.
From-SVN: r114448
2006-06-06 Carlos O'Donell <carlos@codesourcery.com>
Sync from src:
* configure.in: Sync.
* configure: Regenerated.
2006-05-31 Daniel Jacobowitz <dan@codesourcery.com>
* Makefile.def: Added dependencies from sim and gdb on intl, and
added configure dependencies to everything with an all dependency
on intl.
* Makefile.in: Regenerated.
From-SVN: r114444
2006-06-06 Peter Lemieszewski <lemie@us.ibm.com>
* config/s390/t-tpf (LIB2ADDEH): Include unwind-dw2-fde-glibc.c
in lieu of unwind-dw2-fde.c.
From-SVN: r114443