Roger Sayle [Mon, 24 Jan 2005 14:34:19 +0000 (14:34 +0000)]
re PR java/19295 (Incorrect bytecode produced for bitwise AND)
PR java/19295
* jcf-write.c (generate_bytecode_insns): Conversions between
integer types of the same precision shouldn't generate widening
or narrowing conversion bytecodes.
* testsuite/libjava.compile/PR19295.java: New test case.
Jakub Jelinek [Mon, 24 Jan 2005 08:54:25 +0000 (09:54 +0100)]
re PR middle-end/19551 (pure (complex types) function call removed as dead (LAPACK routine claic1.f bug))
* flow.c (propagate_one_insn): Formatting.
PR middle-end/19551
* flow.c (libcall_dead_p): Be more conservative if unsure.
If there are any instructions between insn and call, see if they are
all dead before saying the libcall is dead.
* gcc.c-torture/execute/20050121-1.c: New test.
* gcc.dg/20050121-2.c: New test.
Roger Sayle [Mon, 24 Jan 2005 02:28:15 +0000 (02:28 +0000)]
expmed.c (expand_mult_highpart): Make static.
* expmed.c (expand_mult_highpart): Make static. Change type of
constant multiplier argument from unsigned HOST_WIDE_INT to rtx.
(expand_divmod): Updates calls to expand_mult_highpart by using
gen_int_mode to pass a CONST_INT rtx.
* rtl.h (expand_mult_highpart): Remove prototype.
re PR fortran/19294 (intrinsic_transpose.f90 runtime crash)
2005-01-23 James A. Morrison <phython@gcc.gnu.org>
Paul Brook <paul@codesourcery.com>
PR fortran/19294
* iresolve.c (gfc_resolve_transpose): Resolve to transpose_c4 or
transpose_c8 for complex types.
libgfortran/
* Makefile.am: Add transpose_c4.c and transpose_c8.c.
* intrinsics/cshift0.c: Use separate optimized loops for complex types.
* m4/transpose.m4: Include type letter in function name.
* Makefile.in: Regenerate.
* generated/transpose_*.c: Regenerate.
Co-Authored-By: Paul Brook <paul@codesourcery.com>
From-SVN: r94116
Roger Sayle [Sun, 23 Jan 2005 15:43:56 +0000 (15:43 +0000)]
combine.c (simplify_logical): Only simplify logical expressions of the form ior(and(x,y),z) by the inverse...
* combine.c (simplify_logical): Only simplify logical expressions
of the form ior(and(x,y),z) by the inverse distributive law if the
result is cheaper than the original.
Co-Authored-By: Eric Botcazou <ebotcazou@libertysurf.fr>
From-SVN: r94114
function.c (assign_parm_setup_block): When creating a new stack slot for a parameter...
* function.c (assign_parm_setup_block): When creating a new stack slot
for a parameter, get its alignment from the parameter's DECL_ALIGN
rather than the type's TYPE_ALIGN. Make sure that the parameter
is at least word aligned.
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.
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.
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.
Mark Dettinger [Sat, 22 Jan 2005 21:57:56 +0000 (21:57 +0000)]
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.
Ulrich Weigand [Sat, 22 Jan 2005 21:50:56 +0000 (21:50 +0000)]
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.
Thomas Koenig [Sat, 22 Jan 2005 19:49:18 +0000 (19:49 +0000)]
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.
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.
Paul Brook [Sat, 22 Jan 2005 15:24:09 +0000 (15:24 +0000)]
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.
Tobias Schlüter [Sat, 22 Jan 2005 14:37:39 +0000 (15:37 +0100)]
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.
Bud Davis [Sat, 22 Jan 2005 03:51:12 +0000 (03:51 +0000)]
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.
Ian Lance Taylor [Fri, 21 Jan 2005 19:05:23 +0000 (19:05 +0000)]
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.
Roger Sayle [Fri, 21 Jan 2005 17:54:26 +0000 (17:54 +0000)]
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.
Giovanni Bajo [Fri, 21 Jan 2005 02:27:16 +0000 (02:27 +0000)]
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.
Daniel Berlin [Thu, 20 Jan 2005 20:09:22 +0000 (20:09 +0000)]
re PR debug/19124 (gcc generates incorrect dwarf2 debug info)
2005-01-20 Daniel Berlin <dberlin@dberlin.org>
Fix PR debug/19124
* dwarf2out.c (concat_loc_descriptor): We don't know we can use
fbreg, so we have to assume we can't.
(loc_descriptor_from_tree_1): Ditto.
(containing_function_has_frame_base): New function.
(add_location_or_const_value_attribute): Use it.
Also try to generate a frame_base from a single element location
list.