2006-08-15 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR fortran/25828
* gfortran.dg/streamio_1.f90: New test.
* gfortran.dg/streamio_2.f90: New test.
* gfortran.dg/streamio_3.f90: New test.
* gfortran.dg/streamio_4.f90: New test.
* gfortran.dg/streamio_5.f90: New test.
* gfortran.dg/streamio_6.f90: New test.
* gfortran.dg/streamio_7.f90: New test.
* gfortran.dg/streamio_8.f90: New test.
From-SVN: r116173
2006-08-15 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libgfortran/25828
* libgfortran.h: Rename GFC_LARGE_IO_INT to GFC_IO_INT.
* io/file_pos.c (st_backspace): Ignore if access=STREAM.
(st_rewind): Handle case of access=STREAM.
* io/open.c (access_opt): Add STREAM_ACCESS.
(edit_modes): Set current_record to zero only if not STREAM.
(new_unit): Initialize maxrec, recl, and last_record for STREAM.
* io/read.c (read_x): Advance file position for STREAM.
* io/io.h (enum unit_access): Align IOPARM flags with frontend.
Add ACCESS_STREAM. Add prototype for is_stream_io () function.
Use GFC_IO_INT.
* io/inquire.c (inquire_via_unit): Add text for access = "STREAM".
* io/unit.c (is_stream_io): New function to return true if access =
STREAM.
* io/transfer.c (file_mode): Add modes for unformatted stream and
formatted stream. (current_mode): Return appropriate file mode based
on access flags.
(read_block): Handle formatted stream reads.
(read_block_direct): Handle unformatted stream reads.
(write_block): Handle formatted stream writes.
(write_buf): Handle unformatted stream writes.
(unformatted_read): Fix up, use temporary for size.
(pre_position): Position file for STREAM access.
(data_transfer_init): Initialize for stream access, skip irrelevent
error checks.
(next_record_r),(next_record_w), and (next_record): Do nothing for
stream I/O.
(finalize_transfer): Flush when all done if stream I/O.
From-SVN: r116172
2006-08-15 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR fortran/25828
* gfortran.h: Add new pointer for stream position to st_inquire.
Rename gfc_large_io_int_kind to gfc_intio_kind.
* trans-types.c (gfc_init_kinds): use gfc_intio_kind.
* io.c: Add new IO tag for file position going in and another for out.
(match_dt_element): Match new tag_spos.
(gfc_resolve_dt): Resolve new tag_spos.
(gfc_free_inquire): Free inquire->strm_pos.
(match_inquire_element): Match new tag_strm_out.
(gfc_resolve_inquire): Resolve new tag_strm_out.
* trans-io.c: Rename IOPARM_type_large_io_int to IOPARM_type_intio.
(gfc_build_st_parameter): Same.
(gfc_build_io_library_fndecls) Same. and add build pointer type pintio.
(gfc_trans_inquire): Translate strm_pos for inquire.
* ioparm.def: Reorder flags to accomodate addition of new inquire
flag for strm_pos_out and add it in.
From-SVN: r116171
gcc
PR c/28287
* c-common.c (handle_weak_attribute): Ignore and warn if
not a FUNCTION_ or VAR_DECL
testsuite
* gcc.dg/attr-invalid.c: Add tests for invalid weak attribute.
From-SVN: r116170
2006-08-15 Kyle Galloway <kgallowa@redhat.com>
* include/java-interp.h (_Jv_InterpMethod::run_debug): New method.
* interpret.cc: Added placeholder for debug variable type info to STORE*
macros.
(_Jv_InterpMethod::run_debug): New method.
(_Jv_InterpMethod::run_sync_object_debug): New method.
(_Jv_InterpMethod::run_sync_class_debug): New method.
(_Jv_InterpMethod::run_normal_debug): New method.
(_Jv_InterpMethod::run_class_debug): New method.
(_Jv_InterpMethod::ncode ()): Changed to select either debug or normal
versions of these functions.
* interpret-run.cc: New file, holds contents of old
_Jv_InterpMethod::run method.
* stacktrace.cc (_Jv_StackTrace::UnwindTraceFn): Changed to select
appropriate function for debug or normal mode.
From-SVN: r116167
* config.gcc (x86-mingw32): Add a gthr-win32.h including makefile
fragment to tmake_file only if threads are enabled.
* config/i386/t-mingw32 (LIB2FUNCS_EXTRA): Move to...
* config/i386/t-gthr-win32: New file. ... here.
From-SVN: r116159
2006-08-15 Paolo Carlini <pcarlini@suse.de>
* include/tr1/random (poisson_distribution<>::_M_initialize): Add.
(poisson_distribution<>::poisson_distribution(const _RealType&):
Use it.
(operator>>(std::basic_istream<>&, poisson_distribution<>&)):
Likewise.
(poisson_distribution<>::_M_large): Remove.
* include/tr1/random.tcc (poisson_distribution<>::_M_initialize):
Define.
(operator<<(std::basic_ostream<>&, const poisson_distribution<>&)):
Do not output the constants.
* include/tr1/random (operator>>(std::basic_istream<>&,
gamma_distribution&)): Minor tweak.
* include/tr1/random.tcc (poisson_distribution<>::operator()):
Minor tweak.
* include/tr1/random: Consistently, all data members private.
From-SVN: r116155
PR middle-end/28713
* omp-low.c (lower_omp_parallel): Convert t to
receiver_decl's type.
(expand_omp_parallel): STRIP_NOPS from the MODIFY_EXPR
source before comparison.
From-SVN: r116154
2006-07-14 Andrew Pinski <pinksia@physics.uc.edu>
PR c/27490
PR c/27489
* c-typeck.c (build_compound_expr): If the second expression
is an error mark, then just return an error mark instead of
creating a COMPOUND_EXPR.
2006-08-14 Andrew Pinski <pinskia@physics.uc.edu>
PR c/27490
* gcc.dg/sizeof-2.c: New testcase.
PR c/27489
* gcc.dg/switch-A.c: New testcase.
From-SVN: r116148
2006-08-14 Richard Guenther <rguenther@suse.de>
PR testsuite/28703
* gcc.c-torture/execute/pr28651.c: Do not use argc
to avoid optimization, instead forbid inlining.
From-SVN: r116129
gcc/
PR rtl-optimization/28634
* reorg.c (fill_slots_from_thread): Do not assume A + X - X == A
for floating-point modes unless flag_unsafe_math_optimizations.
gcc/testsuite/
PR rtl-optimization/28634
* gcc.c-torture/execute/ieee/pr28634.c: New test.
From-SVN: r116124
2006-08-13 Alexandre Oliva <aoliva@redhat.com>
Andrew Pinski <pinskia@physics.uc.edu>
PR c/27184
* tree.c (build_array_type): Unify array types with
unspecified index_type.
* c-decl.c (grokdeclarator): Make sure we do not modify a
unified incomplete array type.
* c-typeck.c (store_init_value): Create distinct type before
filling in the index type in an initializer from a compound
literal.
* c-decl.c (grokdeclarator): Remove code where we copy the
array type over.
2006-08-13 Alexandre Oliva <aoliva@redhat.com>
PR c/27184
* gcc.dg/torture/pr27184.c: New test
Co-Authored-By: Andrew Pinski <pinskia@physics.uc.edu>
From-SVN: r116116
2006-08-13 Andrew Pinski <pinskia@physics.uc.edu>
* tree-pass.h (TODO_update_ssa): Fix which bit is used to take
into account for TODO_dump_cgraph.
(TODO_update_ssa_no_phi): Likewise.
(TODO_update_ssa_full_phi): Likewise.
(TODO_update_ssa_only_virtuals): Likewise.
(TODO_remove_unused_locals): Likewise.
(TODO_set_props): Likewise.
(TODO_update_stmt_usage): Likewise.
From-SVN: r116111
* gfortran.dg/stat_1.f90: Make test pass when run under sudo.
* gfortran.dg/stat_2.f90: Likewise.
* gfortran.dg/chmod_1.f90: Likewise.
* gfortran.dg/chmod_2.f90: Likewise.
* gfortran.dg/chmod_3.f90: Likewise.
From-SVN: r116097
2006-08-11 Richard Guenther <rguenther@suse.de>
PR middle-end/28651
* simplify-rtx.c (simplify_const_relational_operation):
Simplify A CMP B to A - B CMP 0 only for EQ and NE comparison
codes.
* gcc.c-torture/execute/pr28651.c: New testcase.
From-SVN: r116079
2006-08-10 Simon Martin <simartin@users.sourceforge.net>
PR java/8923
* parse.y (build_incdec): Emit an error instead of an ICE if '++'
or '--' is used with a constant operand.
(java_complete_lhs): When processing a '++' or '--' expression,
don't call java_complete_tree but java_complete_lhs, so that a
static final variable operand is never replaced by its value. This
avoids an ICE later on.
(patch_unaryop): Fixed typo in comment.
From-SVN: r116069
2006-08-10 Paolo Carlini <pcarlini@suse.de>
* include/tr1/random.tcc (gamma_distribution<>::operator()): Fixes
from the Errata of Devroye's book.
From-SVN: r116061