2006-10-31 Robert Dewar <dewar@adacore.com>
Bob Duff <duff@adacore.com>
Ed Schonberg <schonberg@adacore.com>
* sem_res.adb (Resolve_Unary_Op): Add warning for use of unary minus
with multiplying operator.
(Expected_Type_Is_Any_Real): New function to determine from the Parent
pointer whether the context expects "any real type".
(Resolve_Arithmetic_Op): Do not give an error on calls to the
universal_fixed "*" and "/" operators when they are used in a context
that expects any real type. Also set the type of the node to
Universal_Real in this case, because downstream processing requires it
(mainly static expression evaluation).
Reword some continuation messages
Add some \\ sequences to continuation messages
(Resolve_Call): Refine infinite recursion case. The test has been
sharpened to eliminate some false positives.
Check for Current_Task usage now includes entry barrier, and is now a
warning, not an error.
(Resolve): If the call is ambiguous, indicate whether an interpretation
is an inherited operation.
(Check_Aggr): When resolving aggregates, skip associations with a box,
which are priori correct, and will be replaced by an actual default
expression in the course of expansion.
(Resolve_Type_Conversion): Add missing support for conversion from
a class-wide interface to a tagged type. Minor code cleanup.
(Valid_Tagged_Converion): Add support for abstact interface type
conversions.
(Resolve_Selected_Component): Call Generate_Reference here rather than
during analysis, and use May_Be_Lvalue to distinguish read/write.
(Valid_Array_Conversion): New procedure, abstracted from
Valid_Conversion, to incorporate accessibility checks for arrays of
anonymous access types.
(Valid_Conversion): For a conversion to a numeric type occurring in an
instance or inlined body, no need to check that the operand type is
numeric, since this has been checked during analysis of the template.
Remove legacy test for scope name Unchecked_Conversion.
* sem_res.ads: Minor reformatting
* a-except.adb, a-except-2005.adb: Turn off subprogram ordering
(PE_Current_Task_In_Entry_Body): New exception code
(SE_Restriction_Violation): Removed, not used
* a-except.ads: Update comments.
* types.h, types.ads: Add definition for Validity_Check
(PE_Current_Task_In_Entry_Body): New exception code
(SE_Restriction_Violation): Removed, not used
From-SVN: r118232
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