Commit Graph

31971 Commits

Author SHA1 Message Date
Richard Henderson 24c78b3ac8 darwin.c (machopic_reloc_rw_mask): New.
* config/darwin.c (machopic_reloc_rw_mask): New.
        * config/darwin-protos.h (machopic_reloc_rw_mask): Declare.
        * config/darwin.h (TARGET_ASM_RELOC_RW_MASK): New.

From-SVN: r122846
2007-03-12 10:00:11 -07:00
Mark Mitchell 6d4817e374 cppdefault.c (cpp_EXEC_PREFIX): New variable.
* cppdefault.c (cpp_EXEC_PREFIX): New variable.
	* cppdefault.h (cpp_PREFIX): Document.
	(cpp_PREFIX_len): Likewise.
	(cpp_EXEC_PREFIX): New variable.
	* Makefile.in (PREPROCESSOR_DEFINES): Add STANDARD_EXEC_PREFIX.
	* c-incpath.c (add_standard_paths): Correct logic for relocating
	paths within prefix.

From-SVN: r122843
2007-03-12 15:59:06 +00:00
Uros Bizjak d8e3118a8b i386.md (fixuns_trunc<mode>hi2): Implement from fixuns_truncsfhi2 and fixuns_truncdfhi2 using SSEMODEF mode macro.
* config/i386/i386.md (fixuns_trunc<mode>hi2): Implement from
	fixuns_truncsfhi2 and fixuns_truncdfhi2 using SSEMODEF
	mode macro.
	(fix_trunc<mode>di_sse): Implement from fix_truncsfdi_sse and
	fix_truncdfdi_sse using SSEMODEF mode macro.
	(fix_trunc<mode>si_sse): Implement from fix_truncsfsi_sse and
	fix_truncdfsi_sse using SSEMODEF mode macro.
	(fix_trunc?f?i_sse peephole2): Implement using SSEMODEF mode macro.
	(fix_trunc?f?i_sse K8 peephole2): Fix register constraint.

From-SVN: r122839
2007-03-12 12:32:13 +01:00
Richard Sandiford 8906bbc09c config.gcc (i[4567]86-wrs-vxworks, [...]): Add elfos.h to tm_file.
gcc/
	* config.gcc (i[4567]86-wrs-vxworks, i[4567]86-wrs-vxworksae): Add
	elfos.h to tm_file.

From-SVN: r122837
2007-03-12 09:58:50 +00:00
Olga Golovanevsky d4e702949e ipa-type-escape improvements
From-SVN: r122835
2007-03-12 08:44:48 +00:00
Richard Guenther 13338552e2 re PR middle-end/31115 (libstdc++ 22_locale/num_get/get/char/2.cc 27_io/basic_ostream/inserters_arithmetic/char/6.cc)
2007-03-11  Richard Guenther  <rguenther@suse.de>

	PR tree-optimization/31115
	* tree-vrp.c (extract_range_from_binary_expr): Make sure
	the shift count is positive and non-anti-range for RSHIFT_EXPR.
	A shift count of zero is not special as with *_DIV_EXPR.
	(vrp_int_const_binop): Handle RSHIFT_EXPR for determining overflow
	direction.

	* gcc.dg/torture/pr31115.c: New testcase.

From-SVN: r122821
2007-03-11 16:08:35 +00:00
Ian Lance Taylor d7419dec45 tree-vrp.c (vrp_int_const_binop): Handle PLUS_EXPR and the *_DIV_EXPR codes correctly with overflow infinities.
* tree-vrp.c (vrp_int_const_binop): Handle PLUS_EXPR and
	the *_DIV_EXPR codes correctly with overflow infinities.

From-SVN: r122820
2007-03-11 15:53:30 +00:00
Ira Rosen e838422b9e tree-data-ref.c (analyze_offset): Add a return value (bool) to indicate success/failure of the analysis.
* tree-data-ref.c (analyze_offset): Add a return value (bool) to
	indicate success/failure of the analysis. Add negation to subtrahend
	in case of subtraction. Fail if both operands contain constants.
	(create_data_ref): Fail if analyze_offset fails.

From-SVN: r122817
2007-03-11 11:13:34 +00:00
Uros Bizjak acaaf0c621 i386.md (frndintxf2): Rename to ...
* config/i386/i386.md (frndintxf2): Rename to ...
        (rintxf2): ... this. Remove expander having same name.
        (rintsf2, rintdf2): Implement using SSEMODEF macro.
        (roundsf2, rounddf2): Ditto.
        (lrint<mode>di2, lrint<mode>si2): Implement using SSEMODEI24 macro.
        (lround<mode>di2, lround<mode>si2): Ditto.

From-SVN: r122815
2007-03-11 11:27:30 +01:00
Steven Bosscher 7984c78796 lower-subreg.c: Include except.h.
* lower-subreg.c: Include except.h.
	(decompose_multiword_subregs): Verify that the only control flow
	insns we can split are loads to multi-words pseudos.
	Handle breaking such blocks after splitting, instead of calling
	find_many_sub_basic_blocks.

	* loop-unroll.c (split_edge_and_insert): Don't set BB_SUPERBLOCK
	on the new basic block.  Add a lengthy comment explaining why we
	thought this was necessary.
	* cfglayout.c (cfg_layout_finalize): Don't break superblocks.

From-SVN: r122807
2007-03-10 23:33:40 +00:00
Mark Mitchell ed574fe919 Fix PR number.
From-SVN: r122804
2007-03-10 19:48:44 +00:00
Mark Mitchell 222725d08c re PR target/20924 (inline float divide does not set correct fpu status flags)
PR c++/20924
	* tree.c (walk_type_fields): Recurse into the element type of
	ARRAY_TYPEs if there is a pointer set.

	PR c++/20924
	* g++.dg/template/array18.C: New test.

From-SVN: r122801
2007-03-10 19:35:03 +00:00
Dirk Mueller 89132ebc4c c-common.c (warn_logical_operator): Fix condition.
2007-03-10  Dirk Mueller  <dmueller@suse.de>

       * c-common.c (warn_logical_operator): Fix condition.

From-SVN: r122800
2007-03-10 18:49:28 +00:00
Tobias Schlüter df990293b8 Fix typo in ChangeLog entry
From-SVN: r122797
2007-03-10 18:07:41 +01:00
Tobias Schlüter 4f6480020e darwin.h (DARWIN_MINVERSION_SPEC): Add missing quotation mark.
* config/i386/darwin.h (DARWIN_MINVERSION_SPEC): Add missing
quotation mark.
* config/i386/darwin.c (machopic_select_section): Remove
superfluous argument in call to categorize_decl_for_section.
Remove unused variable shlib.

From-SVN: r122796
2007-03-10 18:06:19 +01:00
Joseph Myers c9ecbf8693 configure.ac (glibc_header_dir): Set using with_build_sysroot if defined.
* configure.ac (glibc_header_dir): Set using with_build_sysroot if
	defined.
	* configure: Regenerate.

From-SVN: r122795
2007-03-10 16:43:55 +00:00
Uros Bizjak 79cd820a29 i386.md (UNSPEC_C2_FLAG): New constant.
* config/i386/i386.md (UNSPEC_C2_FLAG): New constant.
        (fpremxf4_i387, fprem1xf4_i387): Use UNSPEC_C2_FLAG.
        (fmodxf3, fmod<mode>3, remainderxf3, remainder<mode>3):
        Add LABEL_NUSES to emmitted label.
        * config/i386/i386.c (ix86_emit_fp_unordered_jump): Add
        branch probability value to emmitted jump insn.
        * reg-stack.c (subst_stack_regs_pat)[UNSPEC]: Handle UNSPEC_C2_FLAG.
        Do not check life information and do not re-arrange input operands
        for UNSPEC_FSCALE_EXP, UNSPEC_FPREM_U and UNSPEC_FPREM1_U.

From-SVN: r122793
2007-03-10 13:52:52 +01:00
Kaz Kojima 343d66ade5 sh.c (sh_insn_length_adjustment): Adjust for the change of decode_asm_operands.
* config/sh/sh.c (sh_insn_length_adjustment): Adjust for
	the change of decode_asm_operands.

From-SVN: r122792
2007-03-10 06:57:16 +00:00
Kaz Kojima 07288ab037 mode-switching.c (create_pre_exit): Skip blockage insn.
* mode-switching.c (create_pre_exit): Skip blockage insn.

From-SVN: r122791
2007-03-10 05:04:10 +00:00
Diego Novillo 706ca88ebb tree-pass.h (TODO_update_smt_usage): Remove.
* tree-pass.h (TODO_update_smt_usage): Remove.
	Update all users.
	* tree-ssa-forwprop.c (forward_propagate_addr_expr_1): Remove
	argument SOME.
	Update all users.

From-SVN: r122787
2007-03-09 20:54:13 -05:00
John David Anglin 751d985534 pa.c (attr_length_call): Revise condition for long pc-relative branch.
* pa.c (attr_length_call): Revise condition for long pc-relative branch.
	(output_call): Use "LONG_PIC_SDIFF" instruction sequence for long local
	calls on the SOM target.  Don't use "LONG_PIC_PCREL" call sequence on
	SOM target.

From-SVN: r122784
2007-03-10 01:34:23 +00:00
Geoffrey Keating 48137d59c3 gcc.c: Document %{, in big comment at top.
* gcc.c: Document %{, in big comment at top.
	(input_suffix_matches): Remove special handling for .s and
	.S.
	(input_spec_matches): New.
	(handle_braces): Handle %{,.
	(validate_switches): ',' indicates a value which is not a switch.
	* config/alpha/osf.h (ASM_FINAL_SPEC): Use %{, rather than %{.
	to detect assembler input.
	* config/i386/sol2.h (CPP_SPEC): Likewise.
	* config/rs6000/sysv4.h (ASM_SPEC): Likewise.
	* config/rs6000/vxworks.h (ASM_SPEC): Likewise.
	* config/rs6000/lynx.h (ASM_SPEC): Likewise.
	* config/rs6000/linux64.h (ASM_SPEC_COMMON): Likewise.
	* config/i386/darwin.h (DARWIN_MINVERSION_SPEC): Objective-C plus
	-m64 causes deployment target to default to 10.5.
	* config/rs6000/darwin.h (DARWIN_MINVERSION_SPEC): Likewise.

From-SVN: r122783
2007-03-10 01:03:36 +00:00
Richard Henderson 9b580a0b53 re PR target/26090 (IA-64 creates DT_TEXTREL binaries)
PR target/26090
	* target.h (targetm.asm.out.reloc_rw_mask): New.
	* target-def.h (TARGET_ASM_RELOC_RW_MASK): New.
	(TARGET_ASM_OUT): Use it.
	* targhooks.c, targhooks.h (default_reloc_rw_mask): New.
	* varasm.c (categorize_decl_for_section): Remove shlib argument;
	use the new reloc_rw_mask target hook instead.
	(default_section_type_flags_1): Merge into...
	(default_section_type_flags): ... here.
	(decl_readonly_section_1): Merge into...
	(decl_readonly_section): ... here.
	(default_elf_select_section_1): Merge into...
	(default_elf_select_section): ... here.
	(default_unique_section_1): Merge into...
	(default_unique_section): ... here.
	(compute_reloc_for_rtx_1, compute_reloc_for_rtx): New.
	(default_select_rtx_section): Use it.
	(default_elf_select_rtx_section): Likewise.
	* output.h: Update to match.
	* doc/tm.texi (TARGET_ASM_RELOC_RW_MASK): New.
	* config/alpha/alpha.c (alpha_elf_reloc_rw_mask): New.
	(TARGET_ASM_RELOC_RW_MASK): New.
	* config/i386/i386.c (x86_64_elf_select_section): Adjust call
	to categorize_decl_for_section.
	(x86_64_elf_unique_section): Likewise.
	* config/ia64/hpux.h (TARGET_ASM_SELECT_SECTION,
	TARGET_ASM_UNIQUE_SECTION, TARGET_ASM_SELECT_RTX_SECTION): Remove.
	(TARGET_ASM_RELOC_RW_MASK): New.
	* config/ia64/ia64.c (ia64_rwreloc_select_section,
	ia64_rwreloc_unique_section, ia64_rwreloc_select_rtx_section): Remove.
	(ia64_hpux_reloc_rw_mask, ia64_reloc_rw_mask): New.
	(TARGET_RWRELOC): Remove.
	(ia64_section_type_flags): Adjust call to default_section_type_flags.
	* config/ia64/sysv4.h (TARGET_ASM_RELOC_RW_MASK): New.
	* config/rs6000/rs6000.c (rs6000_elf_section_type_flags): Remove.
	(rs6000_elf_select_section, rs6000_elf_unique_section): Remove.
	(rs6000_elf_reloc_rw_mask, rs6000_xcoff_reloc_rw_mask): New.
	(rs6000_xcoff_select_section): Use decl_readonly_section.
	(rs6000_xcoff_section_type_flags): Use default_section_type_flags.
	* config/rs6000/sysv4.h (TARGET_ASM_RELOC_RW_MASK): New.
	(TARGET_ASM_SELECT_SECTION, TARGET_ASM_UNIQUE_SECTION): Remove.
	(TARGET_SECTION_TYPE_FLAGS): Remove.
	* config/rs6000/xcoff.h (TARGET_ASM_RELOC_RW_MASK): New.

From-SVN: r122781
2007-03-09 16:53:09 -08:00
Roger Sayle 23b9463ba6 fold-const.c (fold_comparison): Remove compile-time evaluation of complex constant equality/inequality...
* fold-const.c (fold_comparison): Remove compile-time evaluation of
	complex constant equality/inequality comparisons for here.
	(fold_binary) <EQ_EXPR>: Simplify complex comparisons that are
	known at compile-time or can be simplified to a scalar comparison.
	(fold_relational_const): Move compile-time evaluation of complex
	constant equality/inequality comparisons to here.

	* gcc.dg/fold-eqcmplx-1.c: New test case.

From-SVN: r122767
2007-03-09 23:09:10 +00:00
Alexandre Oliva 7cd4f641a0 Add line that went missing in the last ChangeLog entry.
From-SVN: r122761
2007-03-09 20:16:25 +00:00
Alexandre Oliva 7e7e28c7c7 re PR rtl-optimization/30643 (CSE pessimization)
gcc/ChangeLog:
PR rtl-optimization/30643
* cse.c (cse_insn): Recompute dest_hash after insert_regs for
(fold_rtx): Recurse, like before 2006-11-03.
gcc/testsuite/ChangeLog:
PR rtl-optimization/30643
* gcc.dg/pr30643.c: New.

From-SVN: r122760
2007-03-09 20:13:10 +00:00
DJ Delorie a009aafece * config/m32c/t-m32c (m32c-pragma.o): Add TM_H dependency to m32c-pragma.o
From-SVN: r122759
2007-03-09 15:08:13 -05:00
Aldy Hernandez 0f84b06679 re PR tree-optimization/30375 (tree-ssa-dse incorrectly removes struct initialization)
PR tree-optimization/30375
        * tree-ssa-dse.c (dse_possible_dead_store_p): Do not eliminate if
        LHS of statements is not the same.
        * testsuite/gcc.dg/tree-ssa/ssa-dse-10.c: New.

From-SVN: r122758
2007-03-09 20:05:08 +00:00
Chao-ying Fu 3204138527 extend.texi (MIPS DSP Built-in Functions): Document the DSP REV 2.
* doc/extend.texi (MIPS DSP Built-in Functions): Document the DSP
REV 2.
* doc/invoke.texi (-mdspr2): Document new option.
* config/mips/mips.md (UNSPEC_ABSQ_S_QB .. UNSPEC_DPSQX_SA_W_PH):
New unspec for DSP REV 2.
(<u>mulsidi3_32bit_internal): Check if !TARGET_DSPR2, because
these instructions are extended in DSP REV 2.
(mips-dspr2.md): Include.
* config/mips/mips.opt (mdspr2): New option.
* config/mips/mips.c (mips_function_type): Add MIPS_V4QI_FTYPE_V4QI,
MIPS_SI_FTYPE_SI_SI_SI, MIPS_DI_FTYPE_DI_USI_USI, MIPS_DI_FTYPE_SI_SI,
MIPS_DI_FTYPE_USI_USI, MIPS_V2HI_FTYPE_SI_SI_SI.
(override_options): Check TARGET_DSPR2 to enable MASK_DSP.
(CODE_FOR_mips_mul_ph): Define it to CODE_FOR_mulv2hi3.
(dsp_bdesc): Add DSP REV 2 builtins.  Remove 32-bit only DSP builtins.
(dsp_32only_bdesc): New description table for 32-bit only DSP REV 1
and 2 builtins.
(bdesc_map): Add one field of unsupported_target_flags.
(bdesc_arrays):  Update entries to have extra fields.  Add
dsp_32only_bdesc.
(mips_init_builtins): Initialize new function types.
Check unsupported_target_fileds to filter out builtins.
* config/mips/mips.h (TARGET_CPU_CPP_BUILTINS): Define __mips_dspr2 if
TARGET_DSPR2.
(ASM_SPEC): Pass mdspr2 to the assembler.
* config/mips/mips-dspr2.md: New file.

From-SVN: r122756
2007-03-09 19:19:44 +00:00
Sa Liu 4a71edd9b8 altivec.md: Fix vcond patterns using if_then_else.
2007-03-09  Sa Liu  <saliu@de.ibm.com>

	* config/rs6000/altivec.md: Fix vcond patterns using if_then_else.

From-SVN: r122755
2007-03-09 18:17:08 +00:00
Ian Lance Taylor 4d4362c8da opts.c (common_handle_option): Treat -Wstrict-overflow (with no argument) like -Wstrict-overflow=2.
* opts.c (common_handle_option): Treat -Wstrict-overflow (with no
	argument) like -Wstrict-overflow=2.
	* doc/invoke.texi (Warning Options): Update documentation.

From-SVN: r122753
2007-03-09 17:59:47 +00:00
Dirk Mueller 63a0874077 re PR c/17946 (wanted: warning for "a && MASK" when "a & MASK" was probably intended)
2007-03-09  Dirk Mueller  <dmueller@suse.de>

       PR c++/17946
       * doc/invoke.texi (-Wlogical-op): Document.
       * common.opt (-Wlogical-op): New.
       * c-common.h (warn_logical_operator): Declare.
       * c-common.c (warn_logical_operator): Define.
       * c-typeck.c (parser_build_binary_op): Call
       warn_logical_operator.

       * cp/call.c (build_new_op): Call warn_logical_operator.

       * testsuite/gcc.dg/Wlogical-op-1.c: New.
       * testsuite/g++.dg/warn/Wlogical-op-1.C: New.

From-SVN: r122751
2007-03-09 16:16:35 +00:00
Alexandre Oliva 0de2ae0273 rtl.h (gen_rtx_ASM_INPUT): Use "" instead of NULL file name.
* rtl.h (gen_rtx_ASM_INPUT): Use "" instead of NULL file name.
* final.c (final_scan_insn): Test for non-"" file name.

From-SVN: r122750
2007-03-09 15:10:33 +00:00
Sebastian Pop 3d8864c06f loop.texi: Document the Omega linear constraints solver.
* doc/loop.texi: Document the Omega linear constraints solver.
	* doc/invoke.texi: Document -fcheck-data-deps, omega-max-vars,
	omega-max-geqs, omega-max-eqs, omega-max-wild-cards, 
	omega-hash-table-size, omega-max-keys, and 
	omega-eliminate-redundant-constraints.
	* tree-pass.h (pass_check_data_deps): Declared.
	* omega.c: New.
	* omega.h: New.
	* timevar.def (TV_CHECK_DATA_DEPS): Declared.
	* tree-ssa-loop.c (check_data_deps, gate_check_data_deps, 
	pass_check_data_deps): New.
	* tree-data-ref.c (init_data_ref): Remove declaration.
	(dump_data_dependence_relation): Dump DDR_INNER_LOOP.
	(analyze_array): Renamed init_array_ref, move up initializations.
	(init_data_ref): Renamed init_pointer_ref.  Moved before its call.
	Removed arguments that are set to NULL.
	(analyze_indirect_ref): Correct indentation, correct call to 
	init_pointer_ref.
	(object_analysis): Call init_array_ref instead of analyze_array.
	(initialize_data_dependence_relation): Initialize DDR_INNER_LOOP.
	(access_functions_are_affine_or_constant_p): Use DR_ACCESS_FNS instead
	of DR_ACCESS_FNS_ADDR.
	(init_omega_eq_with_af, omega_extract_distance_vectors, 
	omega_setup_subscript, init_omega_for_ddr_1, init_omega_for_ddr,
	ddr_consistent_p): New.
	(compute_affine_dependence): Check consistency of ddrs when 
	flag_check_data_deps is passed.
	(analyze_all_data_dependences): Uncomment.
	(tree_check_data_deps): New.
	* tree-data-ref.h: Include omega.h.
	(DR_ACCESS_FNS_ADDR): Removed.
	(data_dependence_relation): Add inner_loop.
	(DDR_INNER_LOOP): New.
	* common.opt (fcheck-data-deps): New.
	* tree-flow.h (tree_check_data_deps): Declare.
	* Makefile.in (TREE_DATA_REF_H): Depend on omega.h.
	(OBJS-common): Depend on omega.o.
	(omega.o): Define.
	* passes.c (pass_check_data_deps): Scheduled.
	* params.def (PARAM_OMEGA_MAX_VARS, PARAM_OMEGA_MAX_GEQS, 
	PARAM_OMEGA_MAX_EQS, PARAM_OMEGA_MAX_WILD_CARDS,
	PARAM_OMEGA_HASH_TABLE_SIZE, PARAM_OMEGA_MAX_KEYS,
	PARAM_VECT_MAX_VERSION_CHECKS,
	PARAM_OMEGA_ELIMINATE_REDUNDANT_CONSTRAINTS): New.

From-SVN: r122749
2007-03-09 12:39:49 +00:00
Richard Guenther 6569e71643 re PR tree-optimization/30904 (VRP does not track values of shifts and/or bitfields?)
2007-03-09  Richard Guenther  <rguenther@suse.de>

	PR tree-optimization/30904
	PR middle-end/31058
	* tree-vrp.c (extract_range_from_binary_expr): Handle RSHIFT_EXPR
	the same way as *_DIV_EXPR.

	* gcc.dg/pr30904.c: Remove xfail.

From-SVN: r122748
2007-03-09 12:29:09 +00:00
Alexandre Oliva fb0a24601d * recog.c (decode_asm_operands): No mixed declarations and code.
From-SVN: r122746
2007-03-09 10:39:05 +00:00
Alexandre Oliva bff4b63d31 rtl.def (ASM_INPUT): Add location.
* rtl.def (ASM_INPUT): Add location.
* rtl.h (ASM_INPUT_SOURCE_LOCATION): New.
(ASM_INPUT_SOURCE_FILE, ASM_INPUT_SOURCE_LINE): New.
(decode_asm_operands): Add loc operand.
(gen_rtx_ASM_INPUT, gen_rtx_ASM_INPUT_loc): Define.
* stmt.c (expand_asm): Rename to...
(expand_asm_loc): ... this.  Add locus argument.  Pass it on to
gen_rtx_ASM_INPUT_loc.
(expand_asm_expr): Adjust.
* recog.c (decode_asm_operands): Add loc operand.
(check_asm_operands, extract_insn): Adjust.
* reload1.c (maybe_fix_stack_asms): Likewise.
* final.c (asm_insn_count): Likewise.
(final_scan_insn): Output # line before and after asm.

From-SVN: r122742
2007-03-09 07:36:43 +00:00
Daniel Berlin 1296c31f09 tree-ssa-structalias.c (variable_info): Remove finished_solution.
2007-03-09  Daniel Berlin  <dberlin@dberlin.org>

	* tree-ssa-structalias.c (variable_info): Remove
	finished_solution.
	(new_var_info): Ditto.
	(shared_bitmap_info_t): New structure.
	(shared_bitmap_table): New variable.
	(shared_bitmap_hash): New function.
	(shared_bitmap_eq): Ditto
	(shared_bitmap_lookup): Ditto.
	(shared_bitmap_add): Ditto.
	(merge_smts_into): Change to take bitmap directly.
	(find_what_p_points_to): Rewrite to use shared bitmap hashtable.
	(init_alias_vars): Init shared bitmap hashtable.
	(delete_points_to_sets): Delete shared bitmap hashtable.
	* tree-ssa-operands.c (add_virtual_operand): Partially revert the
	is_aliased removal as a change that was still necessary was
	deleted.

From-SVN: r122741
2007-03-09 07:27:44 +00:00
Uros Bizjak 84ac30cb94 i386.h (override_options): Conditionally disable x86_sahf for 64bit targets only.
* config/i386/i386.h (override_options): Conditionally disable
	x86_sahf for 64bit targets only.

From-SVN: r122740
2007-03-09 08:21:19 +01:00
Andrew Pinski ee9f69b425 re PR c/31072 ([4.2 Rgression] Wrong code for volatile var with initalization and optimization)
2007-03-08  Andrew Pinski  <andrew_pinski@playstation.sony.com>

        PR C/31072
        * c-decl.c (merge_decls): Don't call make_var_volatile.
        * varasm.c (make_var_volatile): Remove.
        * output.h (make_var_volatile): Remove.

2007-03-08  Andrew Pinski  <andrew_pinski@playstation.sony.com>

        PR C/31072
        * gcc.c-torture/execute/pr31072.c: New test.

From-SVN: r122736
2007-03-08 16:32:34 -08:00
Zdenek Dvorak 5f787cbcaf re PR tree-optimization/31085 (internal compiler error: in create_mem_ref, at tree-ssa-address.c:606)
PR tree-optimization/31085
	* tree-ssa-address.c (create_mem_ref): Fix test of type of base.

From-SVN: r122724
2007-03-08 22:36:47 +00:00
Kaveh R. Ghazi aeabd15d45 builtins.def (lceil, [...]): Mark with ATTR_CONST_NOTHROW_LIST.
* builtins.def (lceil, lceilf, lceill, lfloor, lfloorf, lfloorl,
	llceil, llceilf, llceill, llfloor, llfloorf, llfloorl): Mark with
	ATTR_CONST_NOTHROW_LIST.
	
	* fold-const.c (tree_expr_nonnegative_warnv_p): Handle
	FIX_TRUNC_EXPR.

testsuite:
	* gcc.dg/builtins-55.c: Test *lceil* and *lfloor*.
	* gcc.dg/torture/builtin-attr-1.c: Likewise.
	* gcc.dg/torture/builtin-convert-1.c: Likewise.  Also test *lrint* and *lround*.
	* gcc.dg/torture/builtin-convert-2.c: Test ceil->lceil and floor->lfloor.
	* gcc.dg/torture/builtin-convert-3.c: Test *lceil* and *lfloor*.
	* gcc.dg/torture/builtin-integral-1.c: Likewise.
	* gcc.dg/torture/builtin-minmax-1.c: Likewise.  Also test *lrint*
	and *lround*.  Correct macro names.
	* gcc.dg/torture/builtin-nonneg-1.c: Test *lceil* and *lfloor*.
	* gcc.dg/torture/builtin-rounding-1.c: Likewise.

From-SVN: r122713
2007-03-08 21:37:28 +00:00
Diego Novillo e9dc9c4ee6 tree-ssa.texi: Remove documentation for V_MUST_DEF.
* doc/tree-ssa.texi: Remove documentation for V_MUST_DEF.

From-SVN: r122710
2007-03-08 15:51:41 -05:00
Geoffrey Keating d2328a1313 re PR objc/31013 (objc PCH is broken on powerpc-darwin again)
PR 31013
	* gccspec.c (lang_specific_driver): Do nothing when NEXT_OBJC_RUNTIME
	is declared.
	* config/darwin.h (REAL_LIBGCC_SPEC): When -fgnu-runtime is
	passed, use shared libgcc.

From-SVN: r122709
2007-03-08 19:56:37 +00:00
Roger Sayle ebb07520cd tree-eh.c (do_return_redirection): Call build_gimple_modify_stmt instead of calling build2 with a GIMPLE_MODIFY_STMT.
* tree-eh.c (do_return_redirection): Call build_gimple_modify_stmt
	instead of calling build2 with a GIMPLE_MODIFY_STMT.
	(honor_protect_cleanup_actions, lower_try_finally_switch):
	Likewise.
	* tree-if-conv.c (replace_phi_with_cond_gimple_modify_stmt,
	ifc_temp_var): Likewise.
	* tree-inline.c (setup_one_parameter): Likewise.
	* tree-mudflap.c (mf_decl_cache_locals,
	mf_build_check_statement_for): Likewise.
	* tree-nested.c (init_tmp_var, save_tmp_var,
	finalize_nesting_tree_1): Likewise.
	* tree-outof-ssa.c (insert_copy_on_edge,
	insert_backedge_copies): Likewise.
	* tree-profile.c (tree_gen_edge_profiler,
	tree_gen_ic_profiler): Likewise.
	* tree-scalar-evolution.c (scev_const_prop): Likewise.
	* tree-sra.c (sra_build_assignment): Likewise.
	* tree-ssa-loop-im.c (determine_invariantness_stmt): Likewise.
	* tree-ssa-math-opts.c (insert_reciprocals,
	execute_cse_sincos_1): Likewise.
	* tree-tailcall.c (adjust_accumulator_values,
	adjust_return_value): Likewise.
	* tree-vect-patterns.c (vect_pattern_recog_1): Likewise.
	* tree-vect-transform.c (vect_create_data_ref_ptr,
	bump_vector_ptr, vect_init_vector, get_initial_def_for_induction,
	vect_create_epilog_for_reduction, vectorizable_reduction,
	vectorizable_call, vectorizable_conversion,
	vectorizable_assignment, vectorizable_operation,
	vectorizable_type_demotion, vect_gen_widened_results_half,
	vect_permute_store_chain, vectorizable_store,
	vect_setup_realignment, vect_permute_load_chain,
	vectorizable_load, vectorizable_condition,
	vect_create_cond_for_align_checks): Likewise.
	* tree-vrp.c (build_assert_expr_for): Likewise.

From-SVN: r122707
2007-03-08 19:02:51 +00:00
Ian Lance Taylor 0c948c2746 tree-vrp.c: Include "intl.h".
./:	* tree-vrp.c: Include "intl.h".
	(usable_range_p): New static function.
	(compare_values_warnv): Don't test TYPE_OVERFLOW_UNDEFINED for
	overflowed values, juts set *strict_overflow_p.
	(compare_values): Only return -2 if one of the operands is not a
	constant.
	(compare_ranges): Call usable_range_p.
	(compare_range_with_value): Likewise.
	(vrp_evaluate_conditional_warnv): Rename from
	vrp_evaluate_conditional.  Make static.  Change all callers.
	(vrp_evaluate_conditional): New function.
	(simplify_div_or_mod_using_ranges): Issue warning about reliance
	on signed overflow.
	(simplify_abs_using_ranges): Likewise.
	(simplify_stmt_for_jump_threading): Add within_stmt parameter.
	* tree-ssa-dom.c (simplify_stmt_for_jump_threading): Add
	within_stmt parameter.
	* tree-ssa-propagate.c (fold_predicate_in): Update call to
	vrp_evaluate_conditional.
	* tree-ssa-threadedge.c
	(record_temporary_equivalences_from_stmts_at_dest): Change
	simplify parameter to take a second tree parameter.
	(simplify_control_stmt_condition): Likewise.
	(thread_across_edge): Likewise.
	* tree-flow.h (vrp_evaluate_conditional): Update declaration.
	(thread_across_edge): Likewise.
	* gcc/Makefile.in (tree-vrp.o): Depend upon intl.h.
testsuite/:
	* gcc.dg/no-strict-overflow-5.c: New test.
	* gcc.dg/no-strict-overflow-6.c: New test.
	* gcc.dg/Wstrict-overflow-11.c: New test.
	* gcc.dg/Wstrict-overflow-12.c: New test.
	* gcc.dg/Wstrict-overflow-13.c: New test.
	* gcc.dg/Wstrict-overflow-14.c: New test.
	* gcc.dg/Wstrict-overflow-15.c: New test.

From-SVN: r122706
2007-03-08 17:36:05 +00:00
Uros Bizjak 3c2d980c94 i386.h (TARGET_SAHF): New define.
* config/i386/i386.h (TARGET_SAHF): New define.
        * config/i386/i386.c (ix86_tune_features) [X86_TUNE_USE_SAHF]:
        Also enable for m_K8, m_AMDFAM10 and m_CORE2.
        (x86_sahf): New global variable.
        (override_options): Add PTA_NO_SAHF to pta_flags enum.  Recode
        pta_flags masks using shifts.  Add PTA_NO_SAHF to x86_64 and
        nocona processor flags.  Set x86_sahf when PTA_NO_SAHF is not set
        in processor flags.  Do not unconditionally disable TARGET_USE_SAHF
        for 64-bit.
        (ix86_fp_comparison_sahf_cost): Return high value for !TARGET_SAHF.
        (ix86_expand_fp_compare): Check for TARGET_CMOVE or TARGET_SAHF
        when expanding fcomi/sahf based tests.
        (ix86_emit_fp_unordered_jump): Check for TARGET_SAHF when
        expanding sahf based alternative. Emit sahf based sequence when
        optimizing for code size.
        * config/i386/i386.md (x86_sahf_1): Do not disable for
        TARGET_64BIT, enable for TARGET_SAHF.

From-SVN: r122705
2007-03-08 18:21:40 +01:00
Martin Michlmayr 068c623d02 tree-ssa-coalesce.c (fail_abnormal_edge_coalesce): Remove
spurious whitespace from error message.

From-SVN: r122690
2007-03-08 09:40:15 +00:00
Volker Reichelt 1916c916ca re PR c++/30852 (Trouble with __builtin_offsetof and volatile)
PR c++/30852
	* c-common.c (fold_offsetof_1): Handle COMPOUND_EXPR.

	* semantics.c (finish_offsetof): Handle COMPOUND_EXPR.

	* g++.dg/ext/offsetof1.C: Add cases with volatile.

From-SVN: r122686
2007-03-08 07:31:47 +00:00
Alexandre Oliva ab53bae286 c-decl.c (grokdeclarator): Disable warnings for anonymous bitfields.
gcc/ChangeLog:
* c-decl.c (grokdeclarator): Disable warnings for anonymous
bitfields.
* tree-sra.c (instantiate_element): Propagate disabled warnings
from the element itself to the created variable.
gcc/cp/ChangeLog:
* decl.c (grokdeclarator): Disable warnings for anonymous
bitfields.

From-SVN: r122684
2007-03-08 06:48:21 +00:00