2006-10-31 Paul Thomas <pault@gcc.gnu.org>
PR fortran/29387
* trans-intrinsic.c (gfc_conv_intrinsic_len): Rearrange to have
a specific case for EXPR_VARIABLE and, in default, build an ss
to call gfc_conv_expr_descriptor for array expressions..
PR fortran/29490
* trans-expr.c (gfc_set_interface_mapping_bounds): In the case
that GFC_TYPE_ARRAY_LBOUND is not available, use descriptor
values for it and GFC_TYPE_ARRAY_UBOUND.
PR fortran/29641
* trans-types.c (gfc_get_derived_type): If the derived type
namespace has neither a parent nor a proc_name, set NULL for
the search namespace.
2006-10-31 Paul Thomas <pault@gcc.gnu.org>
PR fortran/29387
* gfortran.dg/intrinsic_actual_2.f90: New test.
PR fortran/29490
* gfortran.dg/actual_array_interface_1.f90: New test.
PR fortran/29641
* gfortran.dg/used_types_11.f90: New test.
From-SVN: r118220
* recog.c (store_data_bypass_p): Add support to allow IN_INSN to
be a PARALLEL containing sets. Return false when out_pat is not
a PARALLEL insn.
From-SVN: r118199
2006-10-30 Andrew Pinski <pinskia@gmail.com>
PR fortran/29410
* trans-intrinsic.c (gfc_conv_intrinsic_array_transfer):
Change over to create VIEW_CONVERT_EXPR instead of using an
ADDR_EXPR, a cast and then an indirect reference
2006-10-30 Andrew Pinski <pinskia@gmail.com>
PR Fortran/29410
* gfortran.fortran-torture/execute/transfer1.f90: New test.
From-SVN: r118186
PR tree-optimization/29637
* tree.c (make_vector_type): Don't recurse if TYPE_MAIN_VARIANT
of the innertype is the innertype itself.
* gcc.dg/pr29637.c: New test.
From-SVN: r118175
* builtins.c (fold_builtin_hypot): Rearrange recursive
transformation before others, and also do ABS_EXPR. When
necessary, check flag_unsafe_math_optimizations. When necessary,
add fabs.
testsuite:
* gcc.dg/builtins-20.c: Add more hypot tests.
From-SVN: r118160
2006-10-29 Paolo Carlini <pcarlini@suse.de>
* src/debug.cc (_Safe_sequence_base::_M_revalidate_singular): Fix
pasto, advance __iter only once per iteration.
From-SVN: r118159
* fold-const.c (fold_comparison): Fold ~X op ~Y as Y op X.
Fold ~X op C as X op' ~C, where op' is the swapped comparison.
(fold_binary): ~X eq/ne C is now handled in fold_comparison.
Fold -X eq/ne -Y as X eq/ne Y.
* gcc.dg/fold-compare-1.c: New test case.
From-SVN: r118158
gcc/
* config/mips/mips.md (mul<mode>3): Check ISA_HAS_MUL3 rather than
GENERATE_MULT3_<MODE>. Restrict the test to SImode. Use ISA_HAS_MUL3
rather than GENERATE_MULT3_SI in the various define_peephole2s.
(mulsi3_mult3): Depend on ISA_HAS_MUL3 rather than GENERATE_MULT3_SI.
Use an inclusive test for "mult" rather than "mul".
(rotr<mode>3): Depend on ISA_HAS_ROR.
* config/mips/mips.h (GENERATE_MULT3_SI): Delete in favor of
ISA_HAS_MUL3.
(GENERATE_MULT3_DI): Delete.
(ISA_HAS_64BIT_REGS): Use consistent formatting.
(ISA_HAS_MUL3): New macro.
(ISA_HAS_CONDMOVE, ISA_HAS_8CC): Use consistent formatting.
(ISA_HAS_FP4, ISA_HAS_MADD_MSUB, ISA_HAS_NMADD_NMSUB): Likewise.
(ISA_HAS_CLZ_CLO): Likewise.
(ISA_HAS_DCLZ_DCLO): Delete.
(ISA_HAS_MULHI, ISA_HAS_MULS, ISA_HAS_MSAC): Require !TARGET_MIPS16.
(ISA_HAS_MACC): Require !TARGET_MIPS16 for all ISAs, not just
the VR4120 and VR4130.
(ISA_HAS_MACCHI): Use consistent formatting.
(ISA_HAS_ROTR_SI, ISA_HAS_ROTR_DI): Delete in favor of...
(ISA_HAS_ROR): ...this new macro.
(ISA_HAS_PREFETCH, ISA_HAS_PREFETCHX): Use consistent formatting.
(ISA_HAS_SEB_SEH, ISA_HAS_EXT_INS): Likewise.
(ISA_HAS_LOAD_DELAY): Use ISA_MIPS1.
From-SVN: r118153
PR tree-optimization/15458
* fold-const.c (fold_binary): Optimize ~X ^ C as X ^ ~C, where C
is a constant.
* gcc.dg/fold-xornot-1.c: New test case.
From-SVN: r118152
2006-10-29 Richard Guenther <rguenther@suse.de>
* config/i386/i386-protos.h (ix86_expand_trunc): Declare.
(ix86_expand_truncdf_32): Likewise.
* config/i386/i386.c (ix86_expand_trunc): New function expanding
trunc inline for SSE math and -fno-trapping-math and if not
optimizing for size.
(ix86_expand_truncdf_32): Same for DFmode on 32bit archs.
* config/i386/i386.md (btruncsf2, btruncdf2): Adjust expanders
for expanding btrunc inline for SSE math.
* gcc.target/i386/math-torture/trunc.c: New testcase.
From-SVN: r118148
2006-10-29 Richard Guenther <rguenther@suse.de>
* config/i386/i386-protos.h (ix86_expand_round): Declare.
(ix86_expand_rounddf_32): Likewise.
* config/i386/i386.c (ix86_expand_round): New function expanding
round inline for SSE math and -fno-trapping-math and if not
optimizing for size.
(ix86_expand_rounddf_32): Same for DFmode on 32bit archs.
* config/i386/i386.md (rounddf2, roundsf2): New pattern expanding
round via ix86_expand_round.
* gcc.target/i386/math-torture/round.c: New testcase.
From-SVN: r118146
2006-10-29 Richard Guenther <rguenther@suse.de>
* config/i386/i386-protos.h (ix86_expand_floorceil): Declare.
(ix86_expand_floorceildf_32): Likewise.
* config/i386/i386.c (ix86_expand_sse_compare_mask): New
static helper function.
(ix86_expand_floorceil): Expander for floor and ceil to SSE
math.
(ix86_expand_floorceildf_32): Same for DFmode on 32bit archs.
* config/i386/i386.md (floordf2): Adjust to enable floor
expansion via ix86_expand_floorceil if TARGET_SSE_MATH and
-fno-trapping-math is enabled and if not optimizing for size.
(floorsf2, ceildf2, ceilsf2): Likewise.
* config/i386/sse.md (sse_maskcmpsf3): New insn.
(sse2_maskcmpdf3): Likewise.
* gcc.target/i386/math-torture/ceil.c: New testcase.
* gcc.target/i386/math-torture/floor.c: Likewise.
From-SVN: r118145
2006-10-29 Richard Guenther <rguenther@suse.de>
* builtins.c (expand_builtin_mathfn): Expand nearbyint as
rint in case -fno-trapping-math is enabled.
* config/i386/i386-protos.h (ix86_expand_rint): Declare.
* config/i386/i386.c (ix86_gen_TWO52): New static helper function.
(ix86_expand_sse_fabs): Likewise.
(ix86_expand_rint): New function expanding rint to x87 or SSE math.
* config/i386/i386.md (rintdf2): Enable for SSE math if
-fno-trapping-math is enabled, use ix86_expand_rint for expansion.
(rintsf2): Likewise.
* gcc.target/i386/math-torture/rint.c: New testcase.
* gcc.target/i386/math-torture/nearbyint.c: Likewise.
From-SVN: r118144