Commit Graph

65598 Commits

Author SHA1 Message Date
David Edelsohn fbac336391 re PR libfortran/19052 (unit 0 not preconnected to standard error)
PR libgfortran/19052
        * libgfortran.h (options_t): Add stderr_unit.
        * io/io.h (error_stream): Declare.
        * io/open.c (new_unit): Do not terminate abnormally if opening
        file preconnected to stdin, stdout, or stderr.
        * io/unit.c (init_units): Initialize stderr_unit.
        * io/unix.c (error_stream): New function.
        * runtime/environ.c (GFORTRAN_STDERR_UNIT): New environment variable.

From-SVN: r94090
2005-01-22 19:14:31 -05:00
Richard Henderson a059cdb863 re PR target/19506 (PovRay produces wrong pictures with -mfpmath=sse -ffast-math.)
PR target/19506
        * config/i386/i386.md (movsfcc_1_sse_max): Use nonimmediate_operand
        in both compare operands.
        (movdfcc_1_sse_max): Likewise.
        (movsfcc_1_sse): Likewise.  Add earlyclobber for scratch.
        (movdfcc_1_sse): Likewise.
        * config/i386/i386.c (ix86_split_sse_movcc): Emit copies into the
        scratch register as needed.

From-SVN: r94087
2005-01-22 15:07:53 -08:00
Richard Henderson b8f0658696 * config/i386/i386.md (smaxsf3): Fix mnemonic typo.
From-SVN: r94086
2005-01-22 14:59:33 -08:00
Richard Henderson eabd294f38 * config/i386/i386.c (ix86_prepare_fp_compare_args): Fix is_sse test.
From-SVN: r94085
2005-01-22 14:56:11 -08:00
Richard Henderson 5ccbd3098f genopinit.c (optabs): Use smin/smax for floating point too.
* genopinit.c (optabs): Use smin/smax for floating point too.
        * doc/md.texi: Update to match.  Clarify that floating point
        results are undefined for +0/-0 and NaN.
        * doc/rtl.texi: Likewise.
        * rtl.def (SMIN, SMAX): Likewise
        * tree.def (MIN_EXPR, MAX_EXPR): Likewise.

        * config/alpha/alpha.md (smaxdf3, smindf3, smaxsf3, sminsf3): Add
        leading 's' to the name.
        * config/ia64/ia64.md (smaxsf3, sminsf3, smaxdf3, smindf3,
        smaxxf3, sminxf3): Likewise.
        * config/rs6000/rs6000.md (smaxdf3, smindf3, smaxsf3, sminsf3):
        Likewise.

From-SVN: r94084
2005-01-22 14:54:07 -08:00
Richard Henderson 7ae4d8d421 genopinit.c (optabs): Use smin/smax for floating point too.
* genopinit.c (optabs): Use smin/smax for floating point too.
        * doc/md.texi: Update to match.  Clarify that floating point
        results are undefined for +0/-0 and NaN.
        * doc/rtl.texi: Likewise.
        * rtl.def (SMIN, SMAX): Likewise
        * tree.def (MIN_EXPR, MAX_EXPR): Likewise.

        * config/alpha/alpha.md (smaxdf3, smindf3, smaxsf3, sminsf3): Add
        leading 's' to the name.
        * config/ia64/ia64.md (smaxsf3, sminsf3, smaxdf3, smindf3,
        smaxxf3, sminxf3): Likewise.
        * config/rs6000/rs6000.md (smaxdf3, smindf3, smaxsf3, sminsf3):
        Likewise.

From-SVN: r94083
2005-01-22 14:49:06 -08:00
Steven G. Kargl 190607885a intrinsic.c (make_alias): Add standard argument.
2005-01-22  Steven G. Kargl  <kargls@comcast.net>

	* intrinsic.c (make_alias):  Add standard argument.
	(add_functions): Update make_alias calls.

From-SVN: r94082
2005-01-22 22:32:06 +00:00
Paul Brook b4b2332cf9 arm.md: Use "Uy" constraint for wcgr load/stores.
2005-01-22  Paul Brook  <paul@codesourcery.com>

	* config/arm/arm.md: Use "Uy" constraint for wcgr load/stores.

[[Split portion of a mixed commit.]]

From-SVN: r94080.2
2005-01-22 22:23:39 +00:00
Mark Dettinger 6fa5b3907c s390.c (struct processor_costs): New fields dlgr, dlr, dr, dsgfr, dsgr.
2005-01-21  Mark Dettinger  <dettinge@de.ibm.com>

	* config/s390/s390.c (struct processor_costs): New fields
	dlgr, dlr, dr, dsgfr, dsgr.
	(z900_cost, z990_cost): Values for new fields.
	(s390_rtx_costs): New cases MEM und COMPARE in switch
	statement. Modified handling of SIGN_EXTEND, ZERO_EXTEND,
	DIV, MOD, UDIV, UMOD.

From-SVN: r94079
2005-01-22 21:57:56 +00:00
Ulrich Weigand eb862a88ba s390.md ("doloop_si64"): Reload input value directly into the register being decremented.
* config/s390/s390.md ("doloop_si64"): Reload input value directly
	into the register being decremented.
	("doloop_si31", "doloop_di"): Likewise.
	("*doloop_si_long"): Adapt pattern.

From-SVN: r94078
2005-01-22 21:50:56 +00:00
Ulrich Weigand 3776ada0a9 s390.h (HARD_REGNO_NREGS): Fix computation for access registers.
* config/s390/s390.h (HARD_REGNO_NREGS): Fix computation for
	access registers.
	(CLASS_MAX_NREGS): Likewise.

From-SVN: r94077
2005-01-22 21:48:01 +00:00
Thomas Koenig d02b2c6474 re PR libfortran/18982 (open(status="new") does not generate an error if the file exists)
2005-01-22  Thomas Koenig  <Thomas.Koenig@online.de>

	PR libfortran/18982
	* io/unix.c (regular_file):  No need to change flags->action
	if an error occurs.  Document this.
	No need to call stat() for STATUS_OLD, open() will
	fail anyway.
	For ACTION_UNSPECIFIED, try open for read-write, then for
	read-only if open fails with EACCES, then for write-only
	if that fails with EACCES again.
	* io/unix.c (open_external): Document changed behavior of
	regular_file.
testsuite/
	* gfortran.dg/open_new.f90: New file.

From-SVN: r94076
2005-01-22 19:49:18 +00:00
Daniel Berlin d7c71ee3e6 tree-ssa.texi (Statement Operands): Add example for new must-def macro.
2005-01-21  Daniel Berlin  <dberlin@dberlin.org>

	* doc/tree-ssa.texi (Statement Operands): Add example for new
	must-def macro. Note deprecation of old operands interface.

From-SVN: r94075
2005-01-22 19:23:57 +00:00
Paul Brook 1438a8c909 * trans-expr.c (gfc_conv_function_call): Remove bogus TODO.
From-SVN: r94074
2005-01-22 19:20:01 +00:00
Paul Brook af30f793c9 gfortran.h (gfc_check_access): Add prototype.
2005-01-22  Paul Brook  <paul@codesourcery.com>

	* gfortran.h (gfc_check_access): Add prototype.
	* match.c (gfc_match_namelist): Remove TODO.
	* module.c (check_access): Rename ...
	(gfc_check_access): ... to this.  Boolify.  Update callers.
	* resolve.c (resolve_symbol): Check for private objects in public
	namelists.
testsuite/
	* namelist_1.f90: New test.

From-SVN: r94073
2005-01-22 18:23:43 +00:00
Richard Sandiford d7f3fc1990 re PR tree-optimization/19484 (function pointer propagation fails for noreturn functions)
PR tree-optimization/19484
	* tree-cfg.c (remove_fallthru_edge): New function.
	(cleanup_control_flow): Remove fallthru edges from calls that are
	now known not to return.

From-SVN: r94070
2005-01-22 17:52:44 +00:00
Daniel Berlin 111e0c9f4b re PR tree-optimization/19038 (tree-ssa causing loops to have more than one BB)
2005-01-20  Daniel Berlin  <dberlin@dberlin.org>

	Fix PR tree-optimization/19038
	* tree-ssa-dom.c (cprop_operand): Don't replace loop invaeriant
	copies with loop variant ones.

From-SVN: r94069
2005-01-22 16:48:23 +00:00
Kazu Hirata 6aa9e91ac1 * java-except.h, java-tree.h: Remove unused prototypes.
From-SVN: r94068
2005-01-22 16:45:08 +00:00
Kazu Hirata 28773f15a8 tree-cfg.c (remove_forwarder_block_with_phi): Look at the first label to see if it is a nonlocal label.
* tree-cfg.c (remove_forwarder_block_with_phi): Look at the
	first label to see if it is a nonlocal label.

From-SVN: r94067
2005-01-22 16:13:40 +00:00
Paul Brook 0dd973dd97 primary.c (gfc_match_rvalue): Only apply implicit type if variable does not have an explicit type.
2005-01-22  Paul Brook  <paul@codesourcery.com>

	* primary.c (gfc_match_rvalue): Only apply implicit type if variable
	does not have an explicit type.
	(gfc_match_variable): Resolve implicit derived types in all cases.
	Resolve contained function types from their own namespace, not the
	parent.
	* resolve.c (resolve_contained_fntype): Remove duplicate sym->result
	checking.  Resolve from the contained namespace, not the parent.
testsuite/
	* gfortran.dg/implicit_2.f90: New test.

From-SVN: r94066
2005-01-22 15:24:09 +00:00
Tobias Schlüter b8d5e92646 re PR fortran/19194 (Missing RECL parameter in OPEN statement)
gcc/fortran/
PR fortran/19194
* trans-io.c (ADD_STRING): Use gfc_charlen_type_node for string
length parameters.
(gfc_build_io_library_fndecls): 'rec' and 'recl_in' are not
pointer fields.

libgfortran/
PR fortran/19194
* io/io.h (st_parameter): Use 'GFC_INTEGER_4' instead of 'int',
use CHARACTER macro for definition of string valued paramters.

Also fix years in recent ChangeLog entries.

From-SVN: r94065
2005-01-22 15:37:39 +01:00
Kazu Hirata 1e052c19d5 cfganal.c, [...]: Update copyright.
* cfganal.c, real.h, reorg.c, timevar.def, tree-ssa-ccp.c,
	config/alpha/alpha-protos.h, config/alpha/alpha.h,
	config/alpha/alpha.md, config/alpha/predicates.md,
	config/sparc/freebsd.h, config/sparc/netbsd-elf.h,
	config/sparc/sol2.h: Update copyright.

From-SVN: r94064
2005-01-22 12:53:25 +00:00
Bud Davis b1a807057e re PR libfortran/19314 (inquire(position=) segfaults at runtime)
2004-01-22  Bud Davis  <bdavis9659@comcast.net>

        PR fortran/19314
        * io/inquire.c(inquire_via_unit): implement POSITION=.
        * io/transfer.c(next_record): update position for
        INQUIRE.
        * io/rewind.c(st_rewind): update position for
        INQUIRE.

        * gfortran.dg/inquire_5.f90: New test.

From-SVN: r94060
2005-01-22 03:51:12 +00:00
David Edelsohn 987732e0c8 re PR target/19491 (va_start incorrect, Number of floating point and integer registers counted incorrectly)
2005-01-20  David Edelsohn  <edelsohn@gnu.org>
            Andrew Pinski  <pinskia@physics.uc.edu>

        PR target/19491
        * config/rs6000/rs6000.c (rs6000_va_start): Saturate n_gpr at
        maximum number of GPRs.  Saturate n_fpr at maximum number of FPRs.

Co-Authored-By: Andrew Pinski <pinskia@physics.uc.edu>

From-SVN: r94059
2005-01-21 22:09:23 -05:00
Ralf Corsepius 80d15bce46 rtems.h: Update copyright.
2005-01-22  Ralf Corsepius  <ralf.corsepius@rtems.org>

	* config/rs6000/rtems.h: Update copyright.

From-SVN: r94057
2005-01-22 03:57:47 +01:00
Ralf Corsepius b9d13999f3 re PR target/19548 (RTEMS CPP specs not merged from 3.2/3.2 branches)
2005-01-22  Ralf Corsepius  <ralf.corsepius@rtems.org>

	PR target/19548
	* config/rs6000/rtems.h: Resurrect cpp_os_rtems_spec from gcc < 3.4.
	(CPP_OS_RTEMS_SPEC): New (From gcc-3.3's config/rs6000/sys4.h).
	(SUBSUBTARGET_EXTRA_SPECS): Use CPP_OS_RTEMS_SPEC.

From-SVN: r94056
2005-01-22 03:26:12 +01:00
Tobias Schlüter 6ba692b44c re PR middle-end/19543 ([4.1 only] fortran LOGICAL*8 not consistently distinguished from 32 bit integers)
PR fortran/19543
* trans-const.c (gfc_conv_constant_to_tree): Give logical
constants the correct type.

From-SVN: r94054
2005-01-22 01:29:33 +01:00
GCC Administrator 41bd881c9a Daily bump.
From-SVN: r94052
2005-01-22 00:17:34 +00:00
Volker Reichelt 209136895d re PR c/18809 (ICE after a couple of errors with a simple invalid C code)
PR c/18809
	* c-typeck.c (convert_arguments): Check for error_mark_node.

	* gcc.dg/pr18809-1.c: New test.

From-SVN: r94049
2005-01-22 00:12:27 +00:00
Ian Lance Taylor 15c8b2d40a * gcc.dg/20050121-1.c: New test.
From-SVN: r94029
2005-01-21 19:23:06 +00:00
Ian Lance Taylor 046e5d036f re PR tree-optimization/13000 ([unit-at-a-time] Using -O2 cannot detect missing return statement in a function)
PR tree-optimization/13000
	* gcc.dg/20040206-1.c: Change warning to point where function is
	being inlined.

From-SVN: r94025
2005-01-21 19:05:52 +00:00
Ian Lance Taylor 089efaa4a1 re PR tree-optimization/13000 ([unit-at-a-time] Using -O2 cannot detect missing return statement in a function)
PR tree-optimization/13000
	* tree-inline.c: Include "tree-flow.h".
	(expand_call_inline): If warn_return_type, warn if non-void inline
	function falls through.
	* tree-cfg.c (execute_warn_function_return): Don't warn about
	control reaching end if TREE_NO_WARNING is set.  Set
	TREE_NO_WARNING.
	* gimple-low.c (block_may_fallthru): Don't assume that SWITCH_EXPR
	has been lowered.
	* gimplify.c (shortcut_cond_expr): Don't emit a jump over the else
	branch if we don't need one.
	* c-typeck.c: Include "tree-flow.h"
	(c_finish_bc_stmt): Don't add a goto if the current statement
	list doesn't fall through to the current point.

From-SVN: r94024
2005-01-21 19:05:23 +00:00
Roger Sayle d284eb28eb re PR rtl-optimization/576 (gcc performs invalid optimization with float operations when different rounding mode.)
PR rtl-optimization/576
	* real.c (real_arithmetic): Change return type from void to bool
	to return an indication that the result may be inexact.
	* real.h (real_arithmeric): Update prototype.
	* fold-const.c (const_binop):  Don't constant fold floating
	point expressions when the user specifies -frounding-math and
	the result may depend upon the run-time rounding mode.
	(fold_convert_const_real_from_real): Clean-up.
	(fold_initializer): Ignore flag_rounding_math for initializers.
	* simplify-rtx.c (simplify_binary_operation): Likewise, don't
	constant fold FP operations with flag_rounding_math if the
	result may depend upon the run-time rounding mode.

From-SVN: r94020
2005-01-21 17:54:26 +00:00
Tom Tromey a101957b98 * c-cppbuiltin.c (define__GNUC__): Correct assertion.
From-SVN: r94019
2005-01-21 16:57:02 +00:00
Kazu Hirata a85ba5a883 * tree-cfg.c: Fix comment typos.
From-SVN: r94016
2005-01-21 13:05:02 +00:00
J"orn Rennecke 5b5e3a31b9 passes.c (rest_of_handle_flow2): Close / open the flow2 dump file around the call to...
* passes.c (rest_of_handle_flow2): Close / open the flow2 dump file
	around the call to rest_of_handle_branch_target_load_optimize.

From-SVN: r94015
2005-01-21 12:41:44 +00:00
Eric Botcazou ac11d73b45 Fix a typo.
From-SVN: r94012
2005-01-21 10:25:28 +00:00
Eric Botcazou 0b85af22e2 config.gcc (sparc-*-netbsdelf*): Include dbxelf.h
* config.gcc (sparc-*-netbsdelf*): Include dbxelf.h
	(sparc64-*-openbsd*): Likewise.
	(sparclite-*-elf*): Include tm-dwarf2.h.
	(sparc86x-*-elf*): Likewise.
	(sparc64-*-elf*): Likewise.
	* config/sparc/linux64.h (DWARF2_DEBUGGING_INFO): Delete.
	(DBX_DEBUGGING_INFO): Likewise.
	* config/sparc/liteelf.h (DWARF2_DEBUGGING_INFO): Likewise.
	(PREFERRED_DEBUGGING_TYPE): Likewise.
	* config/sparc/netbsd-elf.h (PREFERRED_DEBUGGING_TYPE): Likewise.
	* config/sparc/sp64-elf.h (DBX_DEBUGGING_INFO): Likewise.
	(PREFERRED_DEBUGGING_TYPE): Likewise.
	* config/sparc/sp86x-elf.h (DWARF2_DEBUGGING_INFO 1): Likewise.
	(PREFERRED_DEBUGGING_TYPE): Likewise.
	* config/sparc/sparc.h (DBX_DEBUGGING_INFO): Likewise.

From-SVN: r94011
2005-01-21 10:15:56 +00:00
Andrew Pinski 155d49d7d7 re PR java/18091 (Valgrind errors building libjava)
2005-01-20  Andrew Pinski  <pinskia@gcc.gnu.org>

	PR java/18091:
	* jcf-write.c (perform_relocations): Don't call memcpy if source
	and destination are the same.

From-SVN: r94007
2005-01-21 02:38:23 +00:00
Giovanni Bajo 4ef69b8352 re PR c++/19208 (Spurious error about variably modified type)
PR c++/19208
	* pt.c (fold_decl_constant_value): Always call fold_non_dependent_expr
	at least once.
	(tsubst): Use fold_decl_constant_value in place of a bare call to
	integral_constant_value.

	PR c++/19208
	* g++.dg/template/array11.C: New test.

From-SVN: r94006
2005-01-21 02:27:16 +00:00
Hans-Peter Nilsson 3eacd71fc1 re PR target/18701 (mmix-knuth-mmixware gcc.c-torture/execute failures: 20010224-1.c, 20020216-1.c, 20040218-1.c, 20040709-2.c)
PR target/18701
	* combine.c (combine_simplify_rtx): Revert change of 2004-12-31.

From-SVN: r94005
2005-01-21 02:14:25 +00:00
Paul Brook eacf8912b7 * doc/rtl.texi: Document value extension requirements for CONST_INT.
From-SVN: r94004
2005-01-21 01:54:44 +00:00
Loren J. Rittle 7e4d34fd7c 9507.cc: Allow lseek on fifo to succeed.
* testsuite/27_io/basic_filebuf/open/char/9507.cc: Allow
	lseek on fifo to succeed.  Thus, check for consistent report.

From-SVN: r94003
2005-01-21 01:37:10 +00:00
Volker Reichelt a7a4444157 re PR libstdc++/19510 ([3.3 only] Uninitialized pointers in iterators)
PR libstdc++/19510
	* include/bits/stl_list.h (_List_iterator): Initialize _M_node
	in constructor.
	(_List_const_iterator): Likewise.
	* include/bits/stl_tree.h (_Rb_tree_iterator): Likewise.
	(_Rb_tree_const_iterator): Likewise.

	* testsuite/23_containers/map/operators/1_neg.cc: Adjust line numbers.
	* testsuite/23_containers/set/operators/1_neg.cc: Likewise.

From-SVN: r94002
2005-01-21 01:23:28 +00:00
GCC Administrator 75c97b449c Daily bump.
From-SVN: r94000
2005-01-21 00:19:27 +00:00
Kazu Hirata cde682360d * tree-cfg.c (tree_verify_flow_info): Fix a typo.
From-SVN: r93995
2005-01-20 23:42:38 +00:00
Tobias Schlüter 9d953276e1 data_char_1.f90: Fix typo, add dg-do directive.
* gfortran.dg/data_char_1.f90: Fix typo, add dg-do directive.
* gfortran.dg/direct_io_1.f90: Add dg-do directive.
* gfortran.dg/entry_1.f90: Fix typo, add dg-do directive.
* gfortran.dg/getenv_1.f90: Add dg-do directive.
* gfortran.dg/pr16597.f90, gfortran.dg/pr17143.f90,
gfortran.dg/pr17164.f90: Add missing dg-do directives.

From-SVN: r93994
2005-01-20 23:48:56 +01:00
Kazu Hirata 548414c6fb tree-cfg.c (tree_verify_flow_info): Check that a nonlocal label is first in a sequence of labels.
* tree-cfg.c (tree_verify_flow_info): Check that a nonlocal
	label is first in a sequence of labels.

From-SVN: r93993
2005-01-20 22:39:41 +00:00
Janis Johnson 35fdf04e91 sourcebuild.texi (Test Directives): New.
2005-01-20  Janis Johnson  <janis187@us.ibm.com>
	    Giovanni Bajo  <giovannibajo@gcc.gnu.org>

	* doc/sourcebuild.texi (Test Directives): New.

Co-Authored-By: Giovanni Bajo <giovannibajo@gcc.gnu.org>

From-SVN: r93989
2005-01-20 22:15:25 +00:00
Roger Sayle 8ffeac67a7 real.c (real_floor): Don't leave the result uninitialized when mode is VOIDMode...
* real.c (real_floor): Don't leave the result uninitialized when
	mode is VOIDMode, but return the unrounded intermediate value.
	(real_ceil): Likewise.

From-SVN: r93988
2005-01-20 21:53:31 +00:00