* config/m68k/m68k.c (override_options): Don't override
REAL_MODE_FORMAT.
* config/m68k/m68k-modes.def (SF, DF): Define to use
motorola_single_format and motorola_double_format, resp.
* real.c (motorola_single_format): Renamed from
coldfire_single_format.
(motorola_double_format): Renamed from coldfire_double_format.
(encode_ieee_extended): Generate a proper canonical NaN image
respecting canonical_nan_lsbs_set.
(ieee_extended_motorola_format): Set canonical_nan_lsbs_set to
true.
* real.h: Adjust declarations.
Uros Bizjak [Sat, 2 Jun 2007 18:29:03 +0000 (20:29 +0200)]
revert: sse.md ("sse4_1_blendvpd"): Require "z" class XMM register for operand[3].
Revert:
2007-06-02 Uros Bizjak <ubizjak@gmail.com>
* config/i386/sse.md ("sse4_1_blendvpd"): Require "z" class XMM
register for operand[3]. Adjust asm template.
("sse4_1_blendvpd"): Ditto.
("sse4_1_pblendvb"): Ditto.
* config/i386/i386.c (ix86_expand_sse_4_operands_builtin): Do not
force operands[3] into xmm0 register for variable blend instructions.
Uros Bizjak [Sat, 2 Jun 2007 12:49:07 +0000 (14:49 +0200)]
i386.md ("sse4_1_blendvpd"): Require "z" class XMM register for operand[3].
* config/i386/i386.md ("sse4_1_blendvpd"): Require "z" class XMM
register for operand[3]. Adjust asm template.
("sse4_1_blendvpd"): Ditto.
("sse4_1_pblendvb"): Ditto.
* config/i386/i386.c (ix86_expand_sse_4_operands_builtin): Call
safe_vector_operand() if input operand is VECTOR_MODE_P operand. Do not
force operands[3] into xmm0 register for variable blend instructions.
(ix86_expand_sse_pcmpestr): Do not check operands for
"register_operand", when insn operand predicate is "register_operand".
(ix86_expand_sse_pcmpistr): Ditto.
tree-vrp.c (compare_name_with_value): Always set used_strict_overflow if we get a result from the variable itself.
./: * tree-vrp.c (compare_name_with_value): Always set
used_strict_overflow if we get a result from the variable itself.
testsuite/:
* gcc.dg/Wstrict-overflow-17.c: New test.
Mark Mitchell [Fri, 1 Jun 2007 00:44:36 +0000 (00:44 +0000)]
decl.c (get_atexit_fn_ptr_type): New function.
* decl.c (get_atexit_fn_ptr_type): New function.
(get_atexit_node): Use it.
(start_cleanup_fn): Likewise.
(register_dtor_fn): Use the object's destructor, instead of a
separate cleanup function, where possible.
* cp-tree.h (CPTI_ATEXIT_FN_PTR_TYPE): New enumerator.
(atexit_fn_ptr_type_node): New macro.
* decl2.c (build_cleanup): Use build_address.
* g++.dg/init/cleanup3.C: New test.
* include/c_global/cinttypes: Include tr1_impl/cinttypes.
* include/c_global/cstdlib: Likewise for cstdlib.
* include/c_global/cstdio: Likewise for cstdio.
* include/c_global/cctype: Likewise for cctype.
* include/c_global/cmath: Likewise for cmath.
* include/c_global/cfenv: Likewise for cfenv.
* include/c_global/cwchar: Likewise for cwchar.
* include/c_global/cstdint: Likewise for cstdint.
* include/c_global/cwctype: Likewise for cwctype.
* include/tr1/cinttypes: Likewise for cinttypes.
* include/tr1/cstdlib: Likewise for cstdlib.
* include/tr1/cstdio: Likewise for cstdio.
* include/tr1/cctype: Likewise for cctype.
* include/tr1/cmath: Likewise for cmath.
* include/tr1/cfenv: Likewise for cfenv.
* include/tr1/cwchar: Likewise for cwchar.
* include/tr1/cstdint: Likewise for cstdint.
* include/tr1/cwctype: Likewise for cwctype.
* include/tr1/functional_hash.h: Likewise for functional_hash.
* include/std/tuple: Include tr1_impl/tuple.
* include/std/utility: Likewise for utility.
* include/std/type_traits: Likewise for type_traits.
(is_pod): Just forward to __is_pod.
(has_trivial_default_constructor): Just forward to
__has_trivial_constructor.
(has_trivial_copy_constructor): Just forward to __has_trivial_copy.
(has_trivial_assign): Just forward to __has_trivial_assign.
(has_trivial_destructor): Just forward to __has_trivial_destructor.
(has_nothrow_default_constructor): Just forward to
__has_nothrow_constructor.
(has_nothrow_copy_constructor): Just forward to __has_nothrow_copy.
(has_nothrow_assign): Just forward to __has_nothrow_assign.
(is_base_of): Just forward to __is_base_of.
(is_signed, is_unsigned): Implement according to the C++0x
specifications.
* include/std/memory: Likewise for memory.
* include/std/regex: Likewise for regex.
* include/std/random: Likewise for random.
* include/std/unordered_map: Likewise for unordered_map.
* include/std/unordered_set: Likewise for unordered_set.
* include/std/functional: Likewise for functional.
* include/std/complex: Likewise for complex.
* include/std/array: Likewise for array.
* include/tr1/tuple: Likewise for tuple.
* include/tr1/utility: Likewise for utility.
* include/tr1/type_traits: Likewise for type_traits
* include/tr1/memory: Likewise for memory.
* include/tr1/regex: Likewise for regex.
* include/tr1/random: Likewise for random.
* include/tr1/unordered_map: Likewise for unordered_map.
* include/tr1/unordered_set: Likewise for unordered_set.
* include/tr1/functional: Likewise for functional.
* include/tr1/complex: Likewise for complex.
* include/tr1/array: Likewise for array.
Richard Guenther [Thu, 31 May 2007 21:14:52 +0000 (21:14 +0000)]
trans-expr.c (gfc_conv_expr_op): Use zero constant that matches the lse type.
2007-05-31 Richard Guenther <rguenther@suse.de>
* trans-expr.c (gfc_conv_expr_op): Use zero constant
that matches the lse type.
(gfc_trans_string_copy): Use sizetype zero constant.
* intrinsic.c (add_functions): The sizeof intrinsic has
index type result.
* trans-types.c (gfc_get_dtype): Convert size to index
type before shifting.
* trans-array.c (gfc_trans_array_constructor_value): Use
index type for offset computation.
* trans-intrinsic.c (gfc_conv_associated): Use correct type
for zero constant.
Daniel Berlin [Thu, 31 May 2007 20:58:29 +0000 (20:58 +0000)]
in gcc/ 2007-05-31 Daniel Berlin <dberlin@dberlin.org>
in gcc/
2007-05-31 Daniel Berlin <dberlin@dberlin.org>
* c-typeck.c (build_indirect_ref): Include type in error message.
(build_binary_op): Pass types to binary_op_error.
* c-common.c (binary_op_error): Take two type arguments, print out
types with error.
* c-common.h (binary_op_error): Update prototype.
In gcc/cp
2007-05-31 Daniel Berlin <dberlin@dberlin.org>
* typeck.c (build_binary_op): Include types in error.
Zdenek Dvorak [Thu, 31 May 2007 16:27:05 +0000 (18:27 +0200)]
re PR tree-optimization/32160 (ICE with -O3 in verify_ssa)
PR tree-optimization/32160
* tree-predcom.c (predcom_tmp_var): New function. Mark created
variable as gimple reg.
(initialize_root_vars, initialize_root_vars_lm): Use predcom_tmp_var.
Paul Thomas [Thu, 31 May 2007 07:45:50 +0000 (07:45 +0000)]
re PR fortran/32103 (Module with equivalence draws "unsatisfied reference")
2007-05-31 Paul Thomas <pault@gcc.gnu.org>
PR fortran/32103
* module.c (mio_symtree_ref): If an equivalence group member
is not used, give it a hidden symbol and set the pointer_info.
(load_equiv): Only free the equivalence if none of the members
are used.
2007-05-31 Paul Thomas <pault@gcc.gnu.org>
PR fortran/32103
* gfortran.dg/module_equivalence_3.f90: New test.
Russell Yanofsky [Thu, 31 May 2007 01:18:22 +0000 (01:18 +0000)]
re PR c++/7412 ([DR 106] References to references)
2007-05-30 Russell Yanofsky <russ@yanofsky.org>
Douglas Gregor <doug.gregor@gmail.com>
Pedro Lamarao <pedro.lamarao@mndfck.org>
Howard Hinnant <howard.hinnant@gmail.com>
2007-05-30 Russell Yanofsky <russ@yanofsky.org>
Douglas Gregor <doug.gregor@gmail.com>
Pedro Lamarao <pedro.lamarao@mndfck.org>
Howard Hinnant <howard.hinnant@gmail.com>
PR c++/7412
PR c++/29939
* typeck.c (comptypes): Don't consider rvalue and lvalue
reference types to be equivalent.
(check_return_expr): Move from certain lvalues when returning
them.
* decl.c (grokdeclarator): Implement reference collapsing.
(copy_fn_p): Don't consider constructors taking rvalue references
to be copy constructors.
(move_fn_p): New.
* call.c (conversion): New "rvaluedness_matches_p" member.
(convert_class_to_reference): Require reference type as first
parameter instead of base type.
(reference_binding): Add logic to handle rvalue references.
(implicit_conversion): Update inaccurate comment.
(convert_like_real): Disable creation of temporaries that are
impossible to initialize for types with move constructors.
(build_over_call): Elide move constructors when possible.
(maybe_handle_implicit_object): Set "rvaluedness_matches_p".
(maybe_handle_ref_bind): Return conversion instead of type node.
(compare_ics): Add logic to use "rvaluedness_matches_p" values to
determine preferred conversion sequences.
* cp-tree.h (TYPE_REF_IS_RVALUE): New.
(LOOKUP_PREFER_RVALUE): New.
(DECL_MOVE_CONSTRUCTOR_P): New.
(struct cp_declarator): Add "reference" member for reference
types, with new "rvalue_ref" flag.
(cp_build_reference_type): Declare.
(move_fn_p): Declare.
* error.c (dump_type_prefix): Format rvalue reference types
correctly in error messages.
* except.c (build_throw): Move from certain lvalues when
throwing.
* mangle.c (write_type): Mangle rvalue references differently
than regular references.
* parser.c (make_reference_declarator): Add boolean parameter for
rvalue references.
(cp_parser_make_indirect_declarator): New.
(cp_parser_new_declarator_opt): Call
cp_parser_make_indirect_declarator.
(cp_parser_conversion_declarator_opt): Ditto.
(cp_parser_declarator): Ditto.
(cp_parser_ptr_operator): Parse "&&" tokens into rvalue reference
declarators.
* pt.c (tsubst): Implement reference collapsing.
(maybe_adjust_types_for_deduction): Implement special template
parameter deduction rule for rvalue references.
(type_unification_real): Update calls to
maybe_adjust_types_for_deduction.
(try_one_overload): Ditto.
(unify_pack_expansion): Ditto.
* tree.c (lvalue_p_1): Handle rvalue reference types.
(cp_build_reference_type): New.
config.gcc (arm-wrs-vxworks): Remove dbxelf.h from tm_file.
gcc/
* config.gcc (arm-wrs-vxworks): Remove dbxelf.h from tm_file.
Add vx-common.h. Include vxworks.h between vx-common.h and
arm/vxworks.h.
* config/vx-common.h (DWARF2_UNWIND_INFO): Undefine before
redefining.
* config/vxworks.h (TARGET_ASM_CONSTRUCTOR): Likewise.
(TARGET_ASM_DESTRUCTOR): Likewise.
* config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Check arm_arch_xscale
instead of arm_is_xscale. Use VXWORKS_OS_CPP_BUILTINS.
(OVERRIDE_OPTIONS, SUBTARGET_CPP_SPEC): Define.
(CC1_SPEC): Add -tstrongarm. Line up backslashes.
(VXWORKS_ENDIAN_SPEC): Define.
(ASM_SPEC): Add VXWORKS_ENDIAN_SPEC.
(LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Redefine to their
VXWORKS_* equivalents.
(LINK_SPEC): Likewise, but add VXWORKS_ENDIAN_SPEC.
(ASM_FILE_START): Delete.
(TARGET_VERSION): Reformat.
(FPUTYPE_DEFAULT, FUNCTION_PROFILER): Define.
(DEFAULT_STRUCTURE_SIZE_BOUNDARY): Define.
* config/arm/t-vxworks (LIB1ASMSRC, LIB1ASMFUNCS): Define.
(FPBIT, DPBIT): Define.
(fp-bit.c, dp-bit.c): New rules.
(MULTILIB_OPTIONS): Add strongarm, -mrtp and -mrtp/-fPIC multilibs.
(MULTILIB_MATCHES, MULTILIB_EXCEPTIONS): Define.
* config/arm/arm-protos.h (arm_emit_call_insn): Declare.
* config/arm/arm.h: Include vxworks-dummy.h.
* config/arm/arm.c (arm_elf_asm_constructor, arm_elf_asm_destructor):
Mark with ATTRIBUTE_UNUSED.
(arm_override_options): Do not allow VxWorks RTP PIC to be used
for Thumb. Force r9 to be the PIC register for VxWorks RTPs and
make it incompatible with -msingle-pic-base.
(arm_function_ok_for_sibcall): Return false for calls that might
go through a VxWorks PIC PLT entry.
(require_pic_register): New function, split out from...
(legitimize_pic_address): ...here. Do not use GOTOFF accesses
for VxWorks RTPs.
(arm_load_pic_register): Handle the VxWorks RTP initialization
sequence. Use pic_reg as a shorthand for cfun->machine->pic_reg.
(arm_emit_call_insn): New function.
(arm_assemble_integer): Do not use GOTOFF accesses for VxWorks RTP.
* config/arm/arm.md (UNSPEC_PIC_OFFSET): New unspec number.
(pic_offset_arm): New pattern.
(call, call_value): Use arm_emit_call_insn.
(call_internal, call_value_internal): New expanders.
* config/arm/lib1funcs.asm (__PLT__): Define to empty for
VxWorks unless __PIC__.
Richard Guenther [Wed, 30 May 2007 14:11:06 +0000 (14:11 +0000)]
re PR middle-end/32152 (omp lowering creates mismatched types)
2007-05-30 Richard Guenther <rguenther@suse.de>
PR middle-end/32152
* gimplify.c (gimplify_omp_atomic_pipeline): Use correct
types for comparison.
* fold-const.c (fold_comparison): Call maybe_canonicalize_comparison
with original typed arguments.
* config/i386/i386.c (ix86_gimplify_va_arg): Fix type mismatches.
Zdenek Dvorak [Wed, 30 May 2007 13:29:51 +0000 (15:29 +0200)]
tree-scalar-evolution.c (scev_const_prop): Do not create labels.
* tree-scalar-evolution.c (scev_const_prop): Do not create labels.
* tree-ssa-sink.c (statement_sink_location): Return basic block and
bsi of the location where statements should be inserted.
(sink_code_in_bb): Take bsi from statement_sink_location.
* lambda-code.c (lambda_loopnest_to_gcc_loopnest): Use bsi_after_labels
instead of bsi_start.
* tree-profile.c (tree_gen_ic_func_profiler): Pass BSI_NEW_STMT to
bsi_insert_after.
* tree-cfg.c (bsi_move_after): Pass BSI_NEW_STMT to bsi_insert_after.
(bsi_move_before): Document inconsistency with bsi_move_after.
(tree_redirect_edge_and_branch): Do not create labels if not necessary.
Uros Bizjak [Wed, 30 May 2007 11:24:32 +0000 (13:24 +0200)]
i386.h (TARGET_ABM): New define.
* config/i386/i386.h (TARGET_ABM): New define.
(TARGET_POPCNT): Ditto.
(TARGET_64BIT, TARGET_MMX, TARGET_3DNOW, TARGET_3DNOW_A, TARGET_SSE*):
New temporary defines to redefine from OPTION_ISA_* defines.
(MASK_64BIT, MASK_MMX, MASK_3DNOW, MASK_3DNOW_A, MASK_SSE*):
New temporary defines to redefine from OPTION_MASK_ISA_* defines.
(ix86_isa_flags): New extern int declaration.
(TARGET_SUBTARGET_DEFAULT): New define.
(TARGET_SUBTARGET_ISA_DEFAULT): Ditto.
(TARGET_SUBTARGET32_DEFAULT): Ditto.
(TARGET_SUBTARGET32_ISA_DEFAULT): Ditto.
(TARGET_SUBTARGET64_ISA_DEFAULT): Ditto.
* config/i386/unix.h: Undef TARGET_SUBTARGET_DEFAULT before define.
* config/i386/darwin.h: Change TARGET_64BIT define to
OPTION_ISA_64BIT.
* config/i386/i386.opt (m3dnowa): Define as undocumented option
using existing "ix86_isa_flags" varible.
(m32, m64): Use existing "ix86_isa_flags" variable.
(mmmx, m3dnow): Ditto.
(msse, msse2, msse3, mssse3, msse4.1, msse4a): Ditto.
(mabm): Define as non-negative option using "x86_abm" variable.
(mpopcnt): Define as non-negative option using "x86_popcnt" variable.
* config/i386/i386.c (ix86_arch_features) [X86_ARCH_CMOVE]:
Rewrite feature test bitmap.
(ix86_isa_flags): New initialized global int varible.
(ix86_isa_flags_explicit): New static int variable.
(ix86_handle_option): Set "ix86_isa_flags_explicit" when mmmx, m3dnow,
msse, msse2, msse3, msse4.1 and msse4a option is processed. Change
i86_isa_flags and ix86_isa_flags_explicit, not target_flags and
target_flags_explicit.
(override_options): Remove "target_enable" and "target_disable" fields
from "struct ptt". Update processor_target_table accordingly. Remove
PTA_PREFETCH_SSE from processor_alias_table entry if PTE_SSE is
defined and rearrange PTA_* bits. Use "ix86_isa_flags" instead of
"target_flags" and "ix86_isa_flags_explicit" instead of
"target_flags_explicit" when masked with MASK_64BIT, MASK_MMX,
MASK_3DNOW, MASK_3DNOW_A or MASK_SSE*. Set "x86_abm" to true when
PTA_ABM is set in processor_alias_table flags entry. Set "x86_popcnt"
to true when either of PTA_POPCNT or PTA_ABM is set in
processor_alias_table flags entry. Set "x86_prefetch_sse" to true
when either of PTA_PREFETCH_SSE or PTA_SSE is set in
processor_alias_table flags entry. Remove handling of
"target_enable" and "target_disable" fields of processor_target_table.
Mask "target_flags" with TARGET_SUBTARGET32_DEFAULT for 32-bit
targets or with TARGET_SUBTARGET64_DEFAULT for 64-bit targets.
Mask "ix86_isa_flags" with TARGET_SUBTARGET32_ISA_DEFAULT for 32-bit
targets or with TARGET_SUBTARGET64_ISA_DEFAULT for 64-bit targets.
(def_builtin): Mask "mask" variable with "ix86_isa_flags", not
"target_flags".
(TARGET_DEFAULT_TARGET_FLAGS): Do not include TARGET_64BIT_DEFAULT.
Hui-May Chang [Tue, 29 May 2007 22:49:42 +0000 (22:49 +0000)]
i386.c (ix86_function_regparm): Added checking of ix86_force_align_arg_pointer to determine the number of...
* config/i386/i386.c (ix86_function_regparm): Added checking of
ix86_force_align_arg_pointer to determine the number of
register parameters.
* gcc.target/i386/stack-realign.c: New.
Andrew Pinski [Tue, 29 May 2007 00:25:25 +0000 (17:25 -0700)]
[multiple changes]
2007-05-28 Andrew Pinski <Andrew_pinski@playstation.sony.com>
PR c/31339
* c-typeck.c (build_unary_op <case PREINCREMENT_EXPR,
case POSTINCREMENT_EXPR, case PREDECREMENT_EXPR,
case POSTDECREMENT_EXPR>): Return the error_mark_node
if either the real or imaginary parts would an
error_mark_node.
2007-05-28 Andrew Pinski <Andrew_pinski@playstation.sony.com>
PR c++/31339
* typeck.c (build_unary_op <case PREINCREMENT_EXPR,
case POSTINCREMENT_EXPR, case PREDECREMENT_EXPR,
case POSTDECREMENT_EXPR>): Return the error_mark_node
if either the real or imaginary parts would an
error_mark_node.
2007-05-28 Andrew Pinski <andrew_pinski@playstation.sony.com>
PR c/31339
* gcc.dg/boolcomplex-1.c: New test.
PR c++/31339
* g++.dg/ext/boolcomplex-1.c: New test