aboutsummaryrefslogtreecommitdiff
path: root/gcc
AgeCommit message (Collapse)AuthorFilesLines
2005-05-11arm.md (negsf2, negdf2): Permit these expands when compiling for VFP.Richard Earnshaw4-10/+11
* arm.md (negsf2, negdf2): Permit these expands when compiling for VFP. * gcc.dg/arm-vfp1.c: Revert last change. From-SVN: r99569
2005-05-11re PR middle-end/19807 (fold does not fold &a[4]-1)Richard Guenther5-29/+102
2005-05-11 Richard Guenther <rguenth@gcc.gnu.org> PR middle-end/19807 PR tree-optimization/19639 * fold-const.c (try_move_mult_to_index): Handle INTEGER_CST and generic summands for char* as s * delta, too, folding &a[i] CODE x to &a[i CODE x/s]. Use tree_int_cst_equal for comparison of steps. Convert types for index addition. (fold_binary): Adjust the callers to always dispatch to try_move_mult_to_index. * tree-ssa-propagate.c (set_rhs): Avoid setting rhs to expr with non-gimple ARRAY_REF offset. * g++.dg/tree-ssa/pr19807.C: New testcase. From-SVN: r99568
2005-05-11fold-const.c (fold_indirect_ref_1): Avoid removing NOP_EXPRs with type ↵Richard Guenther2-1/+6
qualifiers like const. 2005-05-11 Richard Guenther <rguenth@gcc.gnu.org> * fold-const.c (fold_indirect_ref_1): Avoid removing NOP_EXPRs with type qualifiers like const. From-SVN: r99566
2005-05-11re PR c/21502 (small data relocation mismatch)Richard Henderson3-6/+56
PR c/21502 * c-decl.c (finish_decl): Propagate the completed array type of a global variable into the binding. From-SVN: r99563
2005-05-11re PR libfortran/21471 ('POSITION = "APPEND"' doesn't seem to work)Francois-Xavier Coudert2-0/+41
PR libfortran/21471 * open.c (new_unit): Take care of the case where POSITION_APPEND is specified (sseek to the end, and set u>-endfile). * gfortran.dg/append-1.f90: New test. From-SVN: r99560
2005-05-11* Makefile.in (gtype-desc.o, build/genautomata.o)Matt Kraai2-3/+9
(build/varray.o): Depend on $(VARRAY_H). From-SVN: r99559
2005-05-10tree-optimize.c (init_tree_optimization_passes): Re-organize optimization ↵Diego Novillo12-30/+61
passes to do an initial batch of scalar cleanups. * tree-optimize.c (init_tree_optimization_passes): Re-organize optimization passes to do an initial batch of scalar cleanups. testsuite/ChangeLog * gcc.dg/pr18501.c: XFAIL. * gcc.dg/tree-ssa/loop-4.c: Fix expected pattern. * gcc.dg/tree-ssa/pr20913.c: Change to link-time test. * gcc.dg/tree-ssa/ssa-ccp-2.c: Change to a .optimized scan. * gcc.dg/tree-ssa/ssa-ccp-7.c: Likewise. * gcc.dg/tree-ssa/ssa-ccp-9.c: Likewise. * gcc.dg/tree-ssa/ssa-dom-ccp-1.c: Likewise. * gcc.dg/tree-ssa/ssa-pre-7.c: Change to a .fre scan. * gcc.dg/tree-ssa/ssa-pre-8.c: Likewise. From-SVN: r99558
2005-05-11Daily bump.GCC Administrator1-1/+1
[[Split portion of a mixed commit.]] From-SVN: r99553.2
2005-05-10read-rtl.c (struct macro_traverse_data): Define.Ian Lance Taylor3-49/+204
* read-rtl.c (struct macro_traverse_data): Define. (map_attr_string): New static function, broken out of apply_macro_to_string. (mode_attr_index, apply_mode_maps): New static functions. (apply_macro_to_string): Call map_attr_string. (apply_macro_to_rtx): Add mode_maps and infile parameters. Change all callers. (apply_macro_traverse): Expect data to point to a struct macro_traverse_data. (read_rtx): Add mode_maps local variable. Use mode_traverse_data to pass data through htab_traverse. (read_rtx_1): Add mode_maps parameter. Change all callers. Handle mode names which are attribute strings. * doc/md.texi (Substitutions): Rename from String Substitutions. Change references. Document using attributes as modes. From-SVN: r99548
2005-05-10tree-cfg.c (tree_duplicate_sese_region): Update profile.Zdenek Dvorak4-23/+23
* tree-cfg.c (tree_duplicate_sese_region): Update profile. * tree-optimize.c (init_tree_optimization_passes) Swap pass_ch and pass_profile. * tree-ssa-loop-ch.c (copy_loop_headers): Do not update profile here. Remove rewrite_into_loop_closed_ssa call. From-SVN: r99547
2005-05-11* gfortran.dg/return_1.f90: Fix dg annotation.Tobias Schlüter2-1/+3
From-SVN: r99546
2005-05-11Fix previous buggy checkin to invoke.texi.Tobias Schlüter1-2/+2
From-SVN: r99545
2005-05-11re PR fortran/20178 (COMPLEX function returns incompatible with g77)Tobias Schlüter12-32/+305
gcc/fortran/ PR fortran/20178 * gfortran.h (gfc_option): Add flag_f2c. * invoke.texi: Document '-ff2c' command line option. Adapt documentation for '-fno-second-underscore' and '-fno-underscoring'. * lang.opt (ff2c): New entry. * options.c (gfc-init_options): Set default calling convention to -fno-f2c. Mark -fsecond-underscore unset. (gfc_post_options): Set -fsecond-underscore if not explicitly set by user. (handle_options): Set gfc_option.flag_f2c according to requested calling convention. * trans-decl.c (gfc_get_extern_function_decl): Use special f2c intrinsics where necessary. (gfc_trans_deferred_vars): Change todo error to assertion. * trans-expr.c (gfc_conv_variable): Dereference access to hidden result argument. (gfc_conv_function_call): Add hidden result argument to argument list if f2c calling conventions requested. Slightly restructure tests. Convert result of default REAL function to requested type if f2c calling conventions are used. Dereference COMPLEX result if f2c cc are used. * trans-types.c (gfc_sym_type): Return double for default REAL function if f2c cc are used. (gfc_return_by_reference): Slightly restructure logic. Return COMPLEX by reference depending on calling conventions. (gfc_get_function_type): Correctly make hidden result argument a pass-by-reference argument for COMPLEX. Remove old code which does this for derived types. libgfortran/ PR fortran/20178 * Makefile.am (gfor_specific_src): Add 'intrinsics/f2c_intrinsics.F90' to dependencies. * Makefile.in: Regenerate. * intrinsics/f2c_specific.F90: New file. gcc/testsuite/ PR fortran/20178 * gfortran.dg/f2c_1.f90, gfortran.dg/f2c_2.f90, gfortran.dg/f2c_3.f90: New tests. From-SVN: r99544
2005-05-10s390.c: (s390_const_double_ok_for_constraint_p): New function.Adrian Straetling5-13/+58
2005-05-10 Adrian Straetling <straetling@de.ibm.com> * config/s390/s390.c: (s390_const_double_ok_for_constraint_p): New function. (legitimate_reload_constant_p): Add check for const double zero. * config/s390/s390.md: Add comment for constraint letter 'G'. ("*movdf_64", "*movdf_31", "movsf"): Add constraint and proper attributes for new case. * config/s390/s390.h: (CONST_DOUBLE_OK_FOR_CONSTRAINT_P): Define it as s390_const_double_ok_for_constraint_p. * config/s390/s390-protos.h (s390_const_double_ok_for_constraint_p): Add prototype. From-SVN: r99541
2005-05-10re PR tree-optimization/21170 (Comments still mention rewrite_ssa_into_ssa.)Kazu Hirata3-3/+9
PR tree-optimization/21170 * tree-ssa-dom.c, tree-ssa-threadupdate.c: Replace rewrite_ssa_into_ssa in comments with update_ssa. From-SVN: r99540
2005-05-10tree-ssa-loop-im.c: Include hashtab.h.Zdenek Dvorak2-368/+284
* tree-ssa-loop-im.c: Include hashtab.h. (struct mem_ref_loc): New. (struct mem_ref): Describe the set of references with the same shape. (max_stmt_uid, get_stmt_uid, record_mem_ref, free_mem_refs, maybe_queue_var, fem_single_reachable_address, for_each_memref, single_reachable_address, is_call_clobbered_ref, determine_lsm_reg): Removed. (record_mem_ref_loc, free_mem_ref_locs, determine_lsm_ref, hoist_memory_reference, memref_hash, memref_eq, memref_del, gather_mem_refs_stmt, gather_mem_refs, find_more_ref_vops): New functions. (rewrite_mem_refs, schedule_sm): Use mem_ref_loc list. (determine_lsm_loop): Rewritten. (determine_lsm): Do not set stmt uids. From-SVN: r99539
2005-05-10s390.md: Add comment lines for 'f' and 't' constraint letters.Adrian Straetling2-0/+7
2005-05-10 Adrian Straetling <straetling@de.ibm.com> * config/s390/s390.md: Add comment lines for 'f' and 't' constraint letters. From-SVN: r99538
2005-05-10s390.md: ("anddi3","andsi3","andhi3","andqi3"): Merge.Adrian Straetling2-95/+30
2005-05-10 Adrian Straetling <straetling@de.ibm.com> * config/s390/s390.md: ("anddi3","andsi3","andhi3","andqi3"): Merge. ("iordi3", "iorsi3", "iorhi3", "iorqi3"): Merge. ("xordi3", "xorsi3", "xorhi3", "xorqi3"): Merge. From-SVN: r99537
2005-05-10tree-ssa-dom.c (dom_opt_finalize_block): Do not call thread_across_edge for ↵Jeff Law4-12/+21
any abnormal edges. * tree-ssa-dom.c (dom_opt_finalize_block): Do not call thread_across_edge for any abnormal edges. * gcc.c-torture/compile/20050510-1.c: New test. From-SVN: r99536
2005-05-10* gcc.dg/arm-vfp1.c: Remove test for fnegs.Mark Mitchell2-1/+12
From-SVN: r99528
2005-05-10ia64.c (ia64_expand_atomic_op): New.Richard Henderson4-36/+219
* config/ia64/ia64.c (ia64_expand_atomic_op): New. * config/ia64/ia64-protos.h: Declare it. * config/ia64/sync.md (I124MODE, FETCHOP, fetchop_name): New. (sync_add<I48MODE>, sync_old_add<I48MODE>): Remove. (sync_<FETCHOP><IMODE>, sync_nand<IMODE>): New. (sync_old_<FETCHOP><IMODE>, sync_old_nand<IMODE>): New. (sync_new_<FETCHOP><IMODE>, sync_new_nand<IMODE>): New. (cmpxchg_rel_<I124MODE>): Split from cmpxchg_acq_<IMODE>. Zero extend result; use release semantics. (cmpxchg_rel_di): Rename from cmpxchg_acq_<IMODE>; use release. (sync_val_compare_and_swap_<IMODE>): Update to match. From-SVN: r99527
2005-05-10* gcc.dg/const-elim-1.c: Remove xfail for xtensa-*-*.Bob Wilson2-2/+6
From-SVN: r99526
2005-05-10optabs.c (expand_compare_and_swap_loop): Don't clobber old value before ↵Richard Henderson2-9/+22
comparing it for success. * optabs.c (expand_compare_and_swap_loop): Don't clobber old value before comparing it for success. From-SVN: r99525
2005-05-10sync.md (sync_add<I48MODE>): Fix arguments for no return value pattern.Richard Henderson2-7/+14
* config/ia64/sync.md (sync_add<I48MODE>): Fix arguments for no return value pattern. From-SVN: r99524
2005-05-10libgcov.c (create_file_directory): New function.Grigory Zagorodnev5-13/+181
* libgcov.c (create_file_directory): New function. Create directory for the given file name. (gcov_max_filename): New static var. Keeps size of the longest file name. (gcov_exit): Always try to create directory for output file. Relocate each filename basing on environment vars. (__gcov_init): Remember the longest file name. * tsystem.h: include filenames.h to get IS_DIR_SEPARATOR * doc/gcov.texi (Cross-profiling): New node documenting cross-profiling management. * doc/invoke.texi (-fprofile-arcs): Add xref to cross-profiling. From-SVN: r99523
2005-05-10sparc.c (mem_min_alignment): Do not rely on MEM_ALIGN if ↵Eric Botcazou2-1/+7
TARGET_UNALIGNED_DOUBLES. * config/sparc/sparc.c (mem_min_alignment): Do not rely on MEM_ALIGN if TARGET_UNALIGNED_DOUBLES. From-SVN: r99521
2005-05-10lib1funcs.asm (__udivsi3, __divsi3): Rearrange special case code to avoid ↵Bob Wilson2-31/+28
one move instruction. * config/xtensa/lib1funcs.asm (__udivsi3, __divsi3): Rearrange special case code to avoid one move instruction. (__umodsi3, __modsi3): Merge duplicated code sequences. From-SVN: r99520
2005-05-10tree-data-ref.c (analyze_array_indexes, [...]): Use VEC instead of VARRAY.Kazu Hirata3-14/+21
* tree-data-ref.c (analyze_array_indexes, analyze_array, init_data_ref, access_functions_are_affine_or_constant_p, free_data_refs): Use VEC instead of VARRAY. * tree-data-ref.h (data_reference): Change the type of access_fns to VEC(tree,gc)*. (DR_ACCESS_FN, DR_NUM_DIMENSIONS): Use VEC instead of VARRAY. From-SVN: r99517
2005-05-1024k.md, [...]: Fix comment typos.Kazu Hirata7-15/+21
* config/mips/24k.md, config/sh/divtab.c, config/sh/sh.c, config/sh/sh.md, config/sh/superh.h: Fix comment typos. * doc/invoke.texi: Fix typos. From-SVN: r99516
2005-05-10re PR c++/17913 (ICE jumping into statement expression)Gabor Loki5-7/+59
2005-05-10 Gabor Loki <loki@gcc.gnu.org> PR c/17913 * c-typeck.c (build_conditional_expr): Remove reducing cond_expr. * fold-const.c (fold): Expand the condition of reducing cond_expr. (contains_label_1, contains_label_p): New functions for checking labels in a sub-tree. testsuite: 2005-05-10 Gabor Loki <loki@gcc.gnu.org> PR c/17913 * gcc.c-torture/compile/pr17913.c: Computed jump test for PR17913 From-SVN: r99514
2005-05-10re PR java/21436 (imports not remembered for previously compiled files)Paolo Bonzini4-24/+66
gcc/java: 2005-05-10 Paolo Bonzini <bonzini@gnu.org> PR java/21436 * class.c (maybe_layout_super_class): Look for imports in this_class. * parse.h (ctxp_for_generation_last): New. (do_resolve_class): Add a parameter. * parse.y (ctxp_for_generation_last): New. (java_pop_parser_context): Add at end of list. (find_in_imports, find_in_imports_on_demand): Look in ctxp if the TYPE_IMPORT_LIST or respectively the TYPE_IMPORT_DEMAND_LIST of the given type are NULL. (do_resolve_class): Look into the imports of the new second parameter. Adjust recursive calls. (resolve_class, resolve_inner_class, find_as_inner_class): Adjust calls to do_resolve_class. (create_class): Set the TYPE_IMPORT_LIST and TYPE_IMPORT_DEMAND_LIST. (java_complete_class): Do not do that here. libjava: 2005-05-10 Paolo Bonzini <bonzini@gnu.org> PR java/21436 * testsuite/libjava.jacks/jacks.xfail: Adjust. From-SVN: r99513
2005-05-10re PR c/21342 (some incompatible external declarations not diagnosed)Joseph Myers8-3/+131
PR c/21342 * c-decl.c (pushdecl): When there is a declaration in the current scope and the declarations are external linkage, check for compatibility with the type in the external scope and update the type in the external scope with the composite type information. Do not form a composite type of the new type and the visible type if they are incompatible. testsuite: * gcc.dg/redecl-11.c, gcc.dg/redecl-12.c, gcc.dg/redecl-13.c, gcc.dg/redecl-14.c, gcc.dg/redecl-15.c: New tests. From-SVN: r99510
2005-05-10crtstuff.c: Revert part of 2005-05-08 Change.Nathan Sidwell2-0/+8
* crtstuff.c: Revert part of 2005-05-08 Change. (IN_LIBGCC2): Define. From-SVN: r99509
2005-05-10sparc.c (fp_sethi_p): Test !SPARC_SIMM13_P and remove redundant test.Eric Botcazou4-291/+146
* config/sparc/sparc.c (fp_sethi_p): Test !SPARC_SIMM13_P and remove redundant test. (fp_mov_p): Accept 0. (fp_high_losum_p): Remove redundant test. * config/sparc/predicates.md (const_high_operand): Explicitly test (not small_int_operand). (fp_const_high_losum_operand): New. * config/sparc/sparc.md (movsi_insn): Do not emit 'clr'. Reorder. (movdi_insn_sp32_v9): Use canonical predicates. (movdi_insn_sp32): Test !TARGET_V9 instead of !TARGET_ARCH64. (movdi_insn_sp64_novis): Delete. (movdi_insn_sp64_vis): Rename into movdi_insn_sp64. (movsf_insn_novis): Delete. (movsf_insn_vis): Rename into movsf_insn. (movsf_no_f_insn): Rename into movsf_insn_no_fpu. (movsf_lo_sum): Use fp_const_high_losum_operand. (movsf_high): Likewise. (movsf_high_losum splitter): Likewise. (mov<V32:mode> expander): Use register_or_zero_operand. (mov<V64:mode> expander): Likewise. (movdf_insn_sp32): Use register_or_zero_operand. (movdf_no_e_insn_sp32): Use register_or_zero_operand. Rename into movdf_insn_sp32_no_fpu. (movdf_no_e_insn_v9_sp32): Use register_or_zero_operand. Rename into movdf_insn_sp32_v9_no_fpu. (movdf_insn_v9only_novis): Delete. (movdf_insn_v9only_vis): Rename into movdf_insn_sp32_v9. (movdf_insn_sp64_novis): Delete. (movdf_insn_sp64_vis): Rename into movdf_insn_sp64. (movdf_no_e_insn_sp64): Use register_or_zero_operand. Rename into movdf_insn_sp64_no_fpu. (movtf expander): Use register_or_zero_operand. (movtf_insn_sp32): Delete. (movtf_insn_vis_sp32): Use register_or_zero_operand. Rename into movtf_insn_sp32. (movtf_no_e_insn_sp32): Use register_or_zero_operand. Rename into movtf_insn_sp32_no_fpu. (movtf_insn_hq_sp64): Delete. (movtf_insn_hq_vis_sp64): Use register_or_zero_operand. Rename into movtf_insn_sp64_hq. (movtf_insn_sp64): Delete. (movtf_insn_vis_sp64): Use register_or_zero_operand. Rename into movtf_insn_sp64. (movtf_no_e_insn_sp64): Use register_or_zero_operand. Rename into movtf_insn_sp64_no_fpu. From-SVN: r99506
2005-05-10stormy16.c (xstormy16_emit_cbranch): Use gcc_assert and gcc_unreachable as ↵Nathan Sidwell2-55/+49
appropriate. * config/stormy16/stormy16.c (xstormy16_emit_cbranch): Use gcc_assert and gcc_unreachable as appropriate. (xstormy16_split_cbranch, xstormy16_output_cbranch_hi, xstormy16_output_cbranch_si, xstormy16_split_move, xstormy16_initial_elimination_offset, xstormy16_encode_section_info, xstormy16_print_operand_address, xstormy16_expand_call, xstormy16_expand_arith, xstormy16_output_shift, xstormy16_init_builtins): Likewise. From-SVN: r99505
2005-05-10typeck.c (build_unary_op): Do not resort to address arithmetic when taking ↵Mark Mitchell2-8/+8
the address of a COMPONENT_REF. * typeck.c (build_unary_op): Do not resort to address arithmetic when taking the address of a COMPONENT_REF. From-SVN: r99503
2005-05-10tree-outof-ssa.c (_elim_graph): Change the type of nodes and const_copies to ↵Kazu Hirata2-19/+30
VEC(tree,heap)*. * tree-outof-ssa.c (_elim_graph): Change the type of nodes and const_copies to VEC(tree,heap)*. (new_elim_graph, delete_elim_graph, elim_graph_size, elim_graph_add_node, eliminate_build, eliminate_phi): Use VEC instead of VARRAY. From-SVN: r99497
2005-05-10* gcc.dg/debug/pr16676.c: New test.Ben Elliston2-0/+10
From-SVN: r99496
2005-05-10re PR testsuite/21443 (Most testcases with -fdump-tree-store_ccp aren't ↵Kazu Hirata10-9/+20
actually testing CCP itself.) PR testsuite/21443 * gcc.dg/tree-ssa/20030731-2.c, gcc.dg/tree-ssa/20030917-1.c, gcc.dg/tree-ssa/20030917-3.c, gcc.dg/tree-ssa/ssa-ccp-1.c, gcc.dg/tree-ssa/ssa-ccp-2.c, gcc.dg/tree-ssa/ssa-ccp-3.c, gcc.dg/tree-ssa/ssa-ccp-7.c, gcc.dg/tree-ssa/ssa-ccp-9.c: Change -O1 to -O2. * gcc.dg/tree-ssa/20040721-1.c: Change -O1 to -O2. Add -fno-tree-dominator-opts. From-SVN: r99493
2005-05-10re PR other/21052 (Example does not compile in user docs, type attributes, ↵Joseph Myers2-1/+6
packed) PR other/21052 * doc/extend.texi (Type Attributes): Correct example syntax. From-SVN: r99485
2005-05-10Daily bump.GCC Administrator1-1/+1
[[Split portion of a mixed commit.]] From-SVN: r99483.2
2005-05-10re PR c/21160 (documentation for -Wuninitialized out of date)Joseph Myers2-5/+12
PR c/21160 * doc/invoke.texi (-Wuninitialized): Update documentation. From-SVN: r99478
2005-05-09* arm.c (const_ok_for_arm): Use a faster algorithm.Richard Earnshaw2-13/+22
From-SVN: r99476
2005-05-09re PR target/21477 (adddi3 becomes external reference rather than ↵David Edelsohn2-1/+10
instruction on powerpc64) PR target/21477 * config/rs6000/rs6000.md (add_op2): New. (add<mode>3): Use it. From-SVN: r99475
2005-05-09arm.c (arm_gen_constant): Add new heuristic for generating constant integers ↵Richard Earnshaw1-0/+35
that can be expressed as the... * arm.c (arm_gen_constant): Add new heuristic for generating constant integers that can be expressed as the difference of two valid immediates. From-SVN: r99474
2005-05-09Revert previous (not the patch described).Richard Earnshaw1-18/+13
From-SVN: r99473
2005-05-09arm.c (arm_gen_constant): Add new heuristic for generating constant integers ↵Richard Earnshaw2-13/+24
that can be expressed as the... * arm.c (arm_gen_constant): Add new heuristic for generating constant integers that can be expressed as the difference of two valid immediates. From-SVN: r99472
2005-05-09c-tree.h (parser_build_unary_op): New prototype.Roger Sayle4-53/+53
* c-tree.h (parser_build_unary_op): New prototype. * c-typeck.c (parser_build_unary_op): New function to construct a unary operation in the C parser. * c-parser.c (c_parser_unary_expression): Use the new function parser_build_unary_op when appropriate. From-SVN: r99471
2005-05-09re PR target/18655 (Incorrect data in .debug_frame section for PowerPC)Mark Mitchell2-2/+10
PR 18655 * dwarf2out.c (output_call_frame_info): Use DWARF2_FRAME_REG_OUT before outputting DWARF_FRAME_RETURN_COLUMN. From-SVN: r99470
2005-05-09match.c (gfc_match_return): Only require space after keyword when it is ↵Tobias Schlüter5-9/+42
obligatory. fortran/ * match.c (gfc_match_return): Only require space after keyword when it is obligatory. Only give stdwarn to after matching is successful. * dump-parse-tree.c (gfc_show_symbol): Deal with alternate returns. testsuite/ * gfortran.dg/return_1.f90: New test. From-SVN: r99467