* check.c (gfc_check_ttynam_sub, gfc_check_isatty): Add check
functions for new intrinsics TTYNAM and ISATTY.
* intrinsic.c (add_functions, add_subroutines): Add new
intrinsics.
* intrinsic.h: Add prototypes for new check and resolve
functions.
* iresolve.c (gfc_resolve_isatty, gfc_resolve_ttynam_sub): New
resolve functions for intrinsics TTYNAM and ISATTY.
* gfortran.h (gfc_generic_isym_id): Add symbol for ISATTY.
* trans-intrinsic.c: Add case for GFC_ISYM_ISATTY.
* Makefile.am: Add file intrinsics/tty.c to Makefile process.
* Makefile.in: Regenerate.
* io/io.h: Prototypes for new functions stream_isatty and
stream_ttyname.
* io/unix (stream_isatty, stream_ttyname): New functions to call
isatty() and ttyname() on a given unit.
* intrinsics/tty.c: New file to implement g77 intrinsics TTYNAM
and ISATTY.
From-SVN: r102915
2005-08-09 Richard Guenther <rguenther@suse.de>
* c-common.c (builtin_function_2): Remove.
(def_builtin_1): New function.
(c_common_nodes_and_builtins): Use def_builtin_1 to
build builtin functions.
From-SVN: r102911
* src/powerpc/ppc_closure.S (ffi_closure_SYSV): Use
DW_CFA_offset_extended_sf rather than
DW_CFA_GNU_negative_offset_extended.
* src/powerpc/sysv.S (ffi_call_SYSV): Likewise.
From-SVN: r102900
2005-08-09 James A. Morrison <phython@gcc.gnu.org>
* tree-ssa-loop-niter.c (tree_simplify_using_condition_1): Use
fold_binary instead of fold_build2 since we don't care about the
resulting tree.
(loop_niter_by_eval): Likewise.
(compare_trees): Likewise.
(proved_non_wrapping_p): Likewise.
From-SVN: r102897
2005-08-09 James A. Morrison <phython@gcc.gnu.org>
PR c/23161
PR c/23165
* c-typeck.c (c_finish_if_stmt): Look into STATEMENT_LISTs to see
if the if is really empty.
From-SVN: r102896
gcc/
PR tree-optimization/23234
* tree-ssa-math-opts.c (place_reciprocal): New enum.
(execute_cse_reciprocals_1): Replace the 'phi' argument with an
argument of the new enum.
(execute_cse_reciprocals): Add reciprocals for function arguments
on the unique successor edge of the entry block. Update other calls
to execute_cse_reciprocals_1.
testsuite/
PR tree-optimization/23234
* gcc.dg/tree-ssa/pr23234.c: New test.
From-SVN: r102895
* class.c (build_class_ref): Wrap the primary class type in a
NOP_EXPR.
* parse.y (java_complete_lhs) <COMPONENT_REF case>: Extract the
primary class type from the NOP_EXPR in which it was placed.
From-SVN: r102859
2005-08-07 James A. Morrison <phython@gcc.gnu.org>
* tree-vrp.c (simplify_div_or_mod_using_range): Use build2.
(test_for_singularity): Use fold_build2.
From-SVN: r102844
PR 21894
* tree-nested.c (convert_local_reference): Save and restore val_only
around component_ref and friends. Clear walk_subtrees by default.
From-SVN: r102832
* io/io.h: Change DEFAULT_TEMPDIR to /tmp instead of /var/tmp.
* io/unix.c (tempfile): Look at the TEMP environment variable
to find the temporary files directory. Whitespace correction.
From-SVN: r102822
PR c++/19498
* pt.c (tsubst_decl) <case TEMPLATE_DECL>: Return ERROR_MARK_NODE
if substitution of template args did not succeed.
* g++.dg/template/instantiate7.C: New test.
From-SVN: r102818
(ASM_OUTPUT_LABELREF): Delete - it is no longer needed.
config/stormy16/stormy16.c (xstormy16_below100_symbol): Check symbol flags
instead of symbol name mangling.
(xstormy16_asm_output_aligned_common): Likewise. Also simplify code since
the bss100_section cass is the only case where the below100 code will be
triggered.
(xstormy16_encode_section_info): Encode below100 attribute using the
SYMBOL_FLAG_XSTORMY16_BELOW100 instead of mangling the name.
(xstormy16_strip_name_encoding): Delete - this function is no longer needed.
(TARGET_STRIP_NAME_ENCODING): Undefine.
config/stormy16/stormy16-protos.h: Delete prototype for
xstormy16_strip_name_encoding.
From-SVN: r102810
PR c/23113
* stmt.c (warn_if_unused_value): Check TREE_NO_WARNING at start.
Don't handle NOP_EXPR, CONVERT_EXPR and NON_LVALUE_EXPR
specially. Check for side effects only for COND_EXPR.
* c-typeck.c (c_finish_stmt_expr): Mark statement expression
return with TREE_NO_WARNING.
testsuite:
* gcc.dg/Wunused-value-1.c: New test.
From-SVN: r102805
PR rtl-optimization/23233
* loop.c (combine_movables): Require the modes to be the same.
(move_movables): Remove handling of cases where the replacement
had a different mode to the original.
From-SVN: r102804
PR fortran/18833
PR fortran/20850
* primary.c (match_varspec): If equiv_flag, don't look at sym's
attributes, call gfc_match_array_ref up to twice and don't do any
substring or component processing.
* resolve.c (resolve_equivalence): Transform REF_ARRAY into
REF_SUBSTRING or nothing if needed. Check that substrings
don't have zero length.
* gfortran.dg/equiv_1.f90: New test.
* gfortran.dg/equiv_2.f90: New test.
* gfortran.fortran-torture/execute/equiv_2.f90: New test.
* gfortran.fortran-torture/execute/equiv_3.f90: New test.
* gfortran.fortran-torture/execute/equiv_4.f90: New test.
From-SVN: r102801