Roger Sayle [Sat, 11 Nov 2006 01:47:18 +0000 (01:47 +0000)]
tree.c (build_int_cst_wide): Add an assertion (gcc_unreachable) when attempting to build INTEGER_CSTs of...
* tree.c (build_int_cst_wide): Add an assertion (gcc_unreachable)
when attempting to build INTEGER_CSTs of non-integral types.
* expmed.c (make_tree): Use the correct type, i.e. the inner
type, when constructing the individual elements of a CONST_VECTOR.
Paul Thomas [Fri, 10 Nov 2006 21:06:42 +0000 (21:06 +0000)]
re PR fortran/29758 (Runtime segfault in RESHAPE with insufficient elements in SOURCE)
2006-11-10 Paul Thomas <pault@gcc.gnu.org>
PR fortran/29758
* check.c (gfc_check_reshape): Check that there are enough
elements in the source array as to be able to fill an array
defined by shape, when pad is absent.
2006-11-10 Paul Thomas <pault@gcc.gnu.org>
PR fortran/29758
* gfortran.dg/reshape_source_size_1.f90: New test.
Frank Ch. Eigler [Fri, 10 Nov 2006 18:42:28 +0000 (18:42 +0000)]
re PR libmudflap/28578 (A most simple multithreaded program (practically any multithreaded one) causes mudflap violation)
2006-11-10 Frank Ch. Eigler <fche@redhat.com>
PR libmudflap/28578
* mf-hooks1.c (__mf_0fn_malloc): Make the bootstrap buffers
static but not function scope static.
(free): Skip deallocation attempts for objects placed into
bootstrap buffers.
* testsuite/libmudflap.cth/pass59-frag.c: New test.
M libmudflap/mf-hooks1.c
M libmudflap/ChangeLog
A libmudflap/testsuite/libmudflap.cth/pass59-frag.c
testsuite:
* gcc.dg/torture/builtin-math-2.c: Test builtin fma.
* gcc.dg/torture/builtin-math-3.c (CKSGN_F, CKSGN, CKSGN_L):
New macros. Use them in exact tests.
(TESTIT3): New macro.
Add tests for fmin, fmax and fma.
Paul Thomas [Thu, 9 Nov 2006 20:22:19 +0000 (20:22 +0000)]
re PR fortran/29744 (Type renaming crashes gfortran with excessive memory usage)
2006-11-09 Paul Thomas <pault@gcc.gnu.org>
PR fortran/29744
* trans-types.c (gfc_get_derived_type): Ensure that the
proc_name namespace is not the same as the owner namespace and
that identical derived types in the same namespace share the
same backend_decl.
2006-11-09 Paul Thomas <pault@gcc.gnu.org>
PR fortran/29744
* gfortran.dg/used_types_12.f90: New test.
* gcc.dg/fold-eqandshift-1.c (test5): Uncomment function.
(test6): Ditto.
(dg-final): Add scan-tree-dump-times patterns for test5 and test6.
* gcc.dg/fold-eqandshift-3.c: New test case.
Paul Thomas [Thu, 9 Nov 2006 18:42:28 +0000 (18:42 +0000)]
re PR fortran/29699 (ICE in trans-decl.c)
2006-11-09 Paul Thomas <pault@gcc.gnu.org>
PR fortran/29699
* trans-array.c (structure_alloc_comps): Detect pointers to
arrays and use indirect reference to declaration.
* resolve.c (resolve_fl_variable): Tidy up condition.
(resolve_symbol): The same and only add initialization code if
the symbol is referenced.
* trans-decl.c (gfc_trans_deferred_vars): Call gfc_trans_
deferred_array before gfc_trans_auto_array_allocation.
PR fortran/21730
* symbol.c (check_done): Remove.
(gfc_add_attribute): Remove reference to check_done and remove
the argument attr_intent.
(gfc_add_allocatable, gfc_add_dimension, gfc_add_external,
gfc_add_intrinsic, gfc_add_optional, gfc_add_pointer,
gfc_add_cray_pointer, gfc_add_cray_pointee, gfc_add_result,
gfc_add_target, gfc_add_in_common, gfc_add_elemental,
gfc_add_pure, gfc_add_recursive, gfc_add_procedure,
gfc_add_type): Remove references to check_done.
* decl.c (attr_decl1): Eliminate third argument in call to
gfc_add_attribute.
* gfortran.h : Change prototype for gfc_add_attribute.
2006-11-09 Paul Thomas <pault@gcc.gnu.org>
PR fortran/29699
* gfortran.dg/alloc_comp_auto_array_1.f90: New test.
PR fortran/21730
* gfortran.dg/change_symbol_attributes_1.f90: New test.
Brooks Moses [Thu, 9 Nov 2006 06:53:05 +0000 (06:53 +0000)]
lang.opt: Add -fmax-errors= option.
* lang.opt: Add -fmax-errors= option.
* gfortran.h (gfc_option_t): Add max_errors element.
* options.c (gfc_init_options): Set max_errors default value
to 25.
(gfc_handle_options): Assign -fmax_errors value to
gfc_option.max_errors.
* error.c (gfc_increment_error_count): New function, which
also checks whether the error count exceeds max_errors.
(gfc_warning): Use it.
(gfc_warning_now): Use it.
(gfc_notify_std): Use it.
(gfc_error): Use it.
(gfc_error_now): Use it.
(gfc_error_check): Use it.
Zdenek Dvorak [Thu, 9 Nov 2006 00:09:43 +0000 (01:09 +0100)]
re PR tree-optimization/29738 (Missed constant propagation into loops)
PR tree-optimization/29738
* tree-ssa-ccp.c: Remove UNKNOWN_VAL from comments.
(ccp_lattice_t): Remove UNKNOWN_VAL.
(dump_lattice_value, ccp_lattice_meet, ccp_visit_phi_node):
Do not handle UNKNOWN_VAL.
(get_default_value): Set initial value of virtual operands to
VARYING.
(get_value): Always use get_default_value on uninitialized
operands.
(set_value_varying, surely_varying_stmt_p): New functions.
(set_lattice_value): Do not pass argument to get_value.
Do not handle UNKNOWN_VAL.
(likely_value): Follow the semantics described in the comment.
(ccp_initialize): Use surely_varying_stmt_p. Do not mark
phi nodes DONT_SIMULATE_AGAIN.
(ccp_fold): Do not pass argument to get_value.
(fold_const_aggregate_ref, visit_assignment): Ditto. Do not
handle UNKNOWN_VAL.
* gcc.dg/tree-ssa/ssa-ccp-14.c: New test.
* gcc.dg/tree-ssa/ssa-ccp-15.c: New test.
Vladimir Prus [Wed, 8 Nov 2006 18:16:27 +0000 (18:16 +0000)]
pex-win32.c (no_suffixes): Remove.
2006-11-08 Vladimir Prus <vladimir@codesourcery.com>
* pex-win32.c (no_suffixes): Remove.
(std_suffixes): Add "" as first element.
(find_executable): Remove detection of already-present
extension. Try all suffixes in std_suffixes.
Roger Sayle [Wed, 8 Nov 2006 17:39:35 +0000 (17:39 +0000)]
tree-ssa-propagate.c (set_rhs): Restructure validity tests as a test for inclusion rather than as a test for...
* tree-ssa-propagate.c (set_rhs): Restructure validity tests as a
test for inclusion rather than as a test for exclusion.
* tree-ssa-ccp.c (fold_stmt_r) <COND_EXPR>: Use set_rhs to modify
the condition after calling fold_binary.
* fold-const.c (fold_inf_compare): Remove in_gimple_form check.
(fold_binary) <LT_EXPR, GT_EXPR, LE_EXPR, GE_EXPR>: Likewise.
* builtins.c (fold_builtin_isascii): Likewise.
(fold_builtin_isdigit): Likewise.
* tree-vect-transform.c (vectorizable_type_demotion): New function.
(vect_transform_stmt): Add case for type_demotion_vec_info_type.
(vect_analyze_operations): Call vectorizable_type_demotion.
* tree-vectorizer.h (type_demotion_vec_info_type): New enum
stmt_vec_info_type value.
(vectorizable_type_demotion): New function declaration.
* tree-vect-generic.c (expand_vector_operations_1): Consider correct
mode.
* tree.def (VEC_PACK_MOD_EXPR, VEC_PACK_SAT_EXPR): New tree-codes.
* expr.c (expand_expr_real_1): Add case for VEC_PACK_MOD_EXPR and
VEC_PACK_SAT_EXPR.
* tree-iniline.c (estimate_num_insns_1): Likewise.
* tree-pretty-print.c (dump_generic_node, op_prio): Likewise.
* optabs.c (optab_for_tree_code): Likewise.
* optabs.c (expand_binop): In case of vec_pack_*_optabs the mode
compared against the predicate of the result is not 'mode' (the input
to the function) but a mode with half the size of 'mode'.
(init_optab): Initialize new optabs.
* optabs.h (OTI_vec_pack_mod, OTI_vec_pack_ssat, OTI_vec_pack_usat):
New optab indices.
(vec_pack_mod_optab, vec_pack_ssat_optab, vec_pack_usat_optab): New
optabs.
* genopinit.c (vec_pack_mod_optab, vec_pack_ssat_optab):
(vec_pack_usat_optab): Initialize new optabs.
* doc/md.texi (vec_pack_mod, vec_pack_ssat, vec_pack_usat): New.
* config/rs6000/altivec.md (vec_pack_mod_v8hi, vec_pack_mod_v4si): New.
* tree-vect-transform.c (vectorizable_reduction): Support multiple
datatypes.
(vect_transform_stmt): Removed redundant code.
2006-11-08 Dorit Nuzman <dorit@il.ibm.com>
* tree-vect-transform.c (vectorizable_operation): Support multiple
datatypes.
2006-11-08 Dorit Nuzman <dorit@il.ibm.com>
* tree-vect-transform.c (vect_align_data_ref): Removed.
(vect_create_data_ref_ptr): Added additional argument - ptr_incr.
Updated function documentation. Return the increment stmt in ptr_incr.
(bump_vector_ptr): New function.
(vect_get_vec_def_for_stmt_copy): New function.
(vect_finish_stmt_generation): Create a stmt_info to newly created
vector stmts.
(vect_setup_realignment): Call vect_create_data_ref_ptr with additional
argument.
(vectorizable_reduction, vectorizable_assignment): Not supported yet if
VF is greater than the number of elements that can fit in one vector
word.
(vectorizable_operation, vectorizable_condition): Likewise.
(vectorizable_store, vectorizable_load): Support the case that the VF
is greater than the number of elements that can fit in one vector word.
(vect_transform_loop): Don't fail in case of multiple data-types.
* tree-vect-analyze.c (vect_determine_vectorization_factor): Don't fail
in case of multiple data-types; the smallest type determines the VF.
(vect_analyze_data_ref_dependence): Don't record datarefs as same_align
if they are of different sizes.
(vect_update_misalignment_for_peel): Compare misalignments in terms of
number of elements rather than number of bytes.
(vect_enhance_data_refs_alignment): Fix/Add dump printouts.
(vect_can_advance_ivs_p): Fix a dump printout
Steve Ellcey [Tue, 7 Nov 2006 19:14:27 +0000 (19:14 +0000)]
re PR other/25028 (TImode-to-floating conversions broken)
PR other/25028
* config/ia64/t-hpux (LIB1ASMFUNCS): Filter out _fixtfdi,
_fixunstfdi, and _floatditf
* gcc.dg/torture/fp-int-convert-float128-timode.c: Do not XFAIL
on HP-UX.
Paul Thomas [Tue, 7 Nov 2006 15:17:17 +0000 (15:17 +0000)]
re PR fortran/29539 (ICE in variable_decl)
2006-11-07 Paul Thomas <pault@gcc.gnu.org>
PR fortran/29539
PR fortran/29634
* decl.c (variable_decl): Add test for presence of proc_name.
* error.c (gfc_error_flag_test): New function.
* gfortran.h : Prototype for gfc_error_flag_test.
2006-11-07 Paul Thomas <pault@gcc.gnu.org>
PR fortran/29539
* gfortran.dg/gfortran.dg/blockdata_3.f90: New test.
PR fortran/29634
* gfortran.dg/gfortran.dg/derived_function_interface_1.f90: New
test.
David Ung [Tue, 7 Nov 2006 14:28:08 +0000 (14:28 +0000)]
mips.c (mips_rtx_cost_optimize_size): New table of costs when optimizing for size.
* config/mips/mips.c (mips_rtx_cost_optimize_size): New table of
costs when optimizing for size.
(override_options): Use mips_rtx_cost_optimize_size table for cost
calculations.
Janis Johnson [Tue, 7 Nov 2006 00:08:32 +0000 (00:08 +0000)]
sourcebuild.texi (Test Directives): Add output-exists and output-exists-not.
gcc/
2006-11-06 Janis Johnson <janis187@us.ibm.com>
* gcc/doc/sourcebuild.texi (Test Directives): Add output-exists
and output-exists-not.
gcc/testsuite/
2006-11-06 Janis Johnson <janis187@us.ibm.com
Bernhard Fischer <aldot@gcc.gnu.org>
* lib/gcc-dg.exp (output-exists): New proc.
(output-exists-not): New proc.
* gcc.test-framework/test-framework.awk: Support new directives.
* gcc.test-framework/dg-outexistsnot-exp-F.c: New test.
* gcc.test-framework/dg-outexistsnot-exp-P.c: New test.
* gcc.test-framework/dg-outexists-exp-F.c: New test.
* gcc.test-framework/dg-outexists-exp-XP.c: New test.
* gcc.test-framework/dg-outexistsnot-exp-XF.c: New test.
* gcc.test-framework/dg-outexists-exp-P.c: New test.
From Herman ten Brugge <hermantenbrugge@home.nl>:
* mf-runtime.c (__mf_uncache_object): Optimize the code so that
small and large objects are handled a lot faster.
* configure.ac (__libc_freeres): Look for it.
* mf-impl.h (call_libc_freeres): New configuration flag.
* mf-runtime.c (__mf_set_default_options): Set it by default.
(__mfu_report): Call it if needed.
(__mfu_unregister): Remove "unaccessed registered object" warning.
* configure, config.h.in: Regenerated.
PR fortran/21061
* error.c (gfc_warning): If warnings_are_errors then treat
warnings as errors with respect to the exit code.
(gfc_notify_std): Ditto.
(gfc_warning_now): Ditto.
Paul Thomas [Sun, 5 Nov 2006 06:27:48 +0000 (06:27 +0000)]
2006-11-05 Francois-Xavier Coudert <fxcoudert@gcc.gnu,org>
Paul Thomas <pault@gcc.gnu.org>
PR fortran/24518
* trans-intrinsic.c (gfc_conv_intrinsic_mod): Use built_in fmod
for both MOD and MODULO, if it is available.
PR fortran/29565
* trans-expr.c (gfc_conv_aliased_arg): For an INTENT(OUT), save
the declarations from the unused loops by merging the block
scope for each; this ensures that the temporary is declared.
2006-11-05 Paul Thomas <pault@gcc.gnu.org>
PR fortran/29565
* gfortran.dg/gfortran.dg/aliasing_dummy_3.f90: New test.
Brooks Moses [Sun, 5 Nov 2006 00:28:08 +0000 (00:28 +0000)]
error.c (show_locus): Add trailing colon in error messages.
* fortran/error.c (show_locus): Add trailing colon in error messages.
(error_print): Avoid leading space in error lines.
* testsuite/lib/gfortran-dg.exp (gfortran-dg-test): Adjust pattern
for matching error messages.
Uros Bizjak [Sat, 4 Nov 2006 23:12:16 +0000 (00:12 +0100)]
re PR target/26915 (missed sized opt returning -1.0)
PR target/26915
* config/i386/i386.c (standard_80387_constant_p): Treat -0.0 and -1.0
as a valid 80387 constant.
(standard_80387_constant_opcode): Return "#" for -0.0 and -1.0.
* config/i386/i386.md (unnamed splitter): Split the load of
constant -0.0 or -1.0 into the load of 0.0 or 1.0, followed
by negation.
testsuite/ChangeLog:
PR target/26915
* gcc.target/i386/387-12.c: New test.
~
Paolo Bonzini [Sat, 4 Nov 2006 08:36:45 +0000 (08:36 +0000)]
fwprop.c: New file.
2006-11-03 Paolo Bonzini <bonzini@gnu.org>
Steven Bosscher <stevenb.gcc@gmail.com>
* fwprop.c: New file.
* Makefile.in: Add fwprop.o.
* tree-pass.h (pass_rtl_fwprop, pass_rtl_fwprop_with_addr): New.
* passes.c (init_optimization_passes): Schedule forward propagation.
* rtlanal.c (loc_mentioned_in_p): Support NULL value of the second
parameter.
* timevar.def (TV_FWPROP): New.
* common.opt (-fforward-propagate): New.
* opts.c (decode_options): Enable forward propagation at -O2.
* gcse.c (one_cprop_pass): Do not run local cprop unless touching jumps.
* cse.c (fold_rtx_subreg, fold_rtx_mem, fold_rtx_mem_1, find_best_addr,
canon_for_address, table_size): Remove.
(new_basic_block, insert, remove_from_table): Remove references to
table_size.
(fold_rtx): Process SUBREGs and MEMs with equiv_constant, make
simplification loop more straightforward by not calling fold_rtx
recursively.
(equiv_constant): Move here a small part of fold_rtx_subreg,
do not call fold_rtx. Call avoid_constant_pool_reference
to process MEMs.
* recog.c (canonicalize_change_group): New.
* recog.h (canonicalize_change_group): New.
Roger Sayle [Sat, 4 Nov 2006 00:51:51 +0000 (00:51 +0000)]
call.c (build_op_delete_call): Test user-visible type against size_type_node...
* call.c (build_op_delete_call): Test user-visible type against
size_type_node, instead of against the internal type, sizetype.
* class.c (type_requires_array_cookie): Likewise.
* mangle.c (write_builtin_type) <INTEGER_TYPE>: Remove special
handling of TYPE_IS_SIZETYPE.
* typeck.c (type_after_usual_arithmetic_conversions): Remove
special case handling of TYPE_IS_SIZETYPE.
(comptypes): Likewise.
Steven Bosscher [Fri, 3 Nov 2006 22:12:37 +0000 (22:12 +0000)]
tree-dump.c (dump_enable_all): Rename local variable ir_type to avoid name conflicts.
* tree-dump.c (dump_enable_all): Rename local variable
ir_type to avoid name conflicts.
* cfgloopmanip.c (lv_adjust_loop_entry_edge): Check for IR_GIMPLE
instead of using ir_type().
* profile.c (tree_register_profile_hooks): Likewise.
* value-prof.c (tree_register_value_prof_hooks): Likewise.
* basic-block.h (struct edge_def): Likewise.
* config/arm/arm.c (legitimize_pic_address): Likewise.
* coretypes.h (ir_type): New enum of all intermediate languages
used in GCC.
* cfghooks.c (ir_type): Rename to...
(current_ir_type): ...this. Distinguish between cfgrtl and
cfglayout mode when the current IR is RTL. Return enum ir_type.
* cfghooks.h (ir_type): Replace with current_ir_type prototype.
Paul Brook [Fri, 3 Nov 2006 17:49:43 +0000 (17:49 +0000)]
arm.c (arm_file_start): New function.
2006-11-03 Paul Brook <paul@codesourcery.com>
gcc/
* config/arm/arm.c (arm_file_start): New function.
(TARGET_ASM_FILE_START): Define.
(arm_default_cpu): New variable.
(arm_override_options): Set arm_default_cpu.